Re: Creating demo instances
"John P. Rouillard" <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi JohnL In message <[email protected]>, John Kristensen writes: >I recently discovered that creating a demo roundup instance may behave >differently depending on if the user invokes `python demo.py` or >`roundup-demo`, and this has the potential to cause problems. The >general summary of the problem (and a bit more context behind starting >this conversation) can be found at: > > https://github.com/roundup-tracker/roundup/pull/2#issuecomment-786433320 > >This raises the question, what is the "correct" way to create a demo >instance? > >The `doc/features.txt` mentions running `python demo.py` to get "instant >gratification" while `dov/installation.txt` mentions both `demo.py` and >`roundup-demo`. > >I'm thinking we should probably standard on a canonical method for >creating demo instances and update the docs accordingly. > >My suggestion would be to standardise on `roundup-demo` as this is >really the only viable way to create a new demo instance after doing a >`pip install roundup` (the alternative is to change into the >`<venv>/lib/python3.X/site-packages/roundup` directory and then run >`python demo.py`). > >Any thoughts? Is your suggestion to have them run: python ./roundup_demo.py for instant gratifaction rather than: python ./demo.py I would prefer not to see: python roundup/scripts/roundup_demo.py as either of the first two are faster and simpler if it is not installed. (While typing this I ended up with rondup/scripts/roundup_demo.py.) What I don't understand is why demo.py is: #!/usr/bin/env python import sys import roundup from roundup.demo import main sys.exit(main()) but roundup/scripts/roundup_demo.py is considerably longer and parses args, asks for directory etc. In theory demo.py could be: #! /bin/sh python3 roundup/scripts/roundup_demo.py "$@" s=$? if [ $s -eq 127 ]; # python3 not found echo "python3 not found trying any python in path" python roundup/scripts/roundup_demo.py "$@" s=$? fi exit $s granted this leaves out the windows folks but.... I would like to get this sorted as I have a beta release coming up in early June. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions.