Fixes for kadi update_cmds to run correctly on Py3. Also includes minor flake8 fixes. Just one non-trivial fix related to the diffing and a bytes/unicode issue. (str() of a bytestring gives b'blah' not blah.)
Testing
On HEAD (kady) in ska3/flight
ska # LEGACY ska
cd ~/tmp/kadi-test
python /proj/sot/ska/share/update_cmds.py --start=2015:001 --stop=2015:030
# Creates local cmds.h5 and cmds.pkl for the date range using the Ska2-flight kadi.
Edit write_cmds.py to comment out writing the events and fix a Py3-compatibility
problem (os.path cannot take None in Py3)
rm cmds.*
./update_cmds.py --start=2015:001 --stop=2015:030 --mp-dir ~/ska/data/mpcrit1/mplogs
python write_cmds.py --start=2014:001 --stop=2016:001
# Creates cmds.txt which is a plain-text version of the commands
mkdir cmds-ska2
cd cmds-ska2
scp 'kady:tmp/kadi-test/cmds.*' ./
python ../write_cmds.py --start=2014:001 --stop=2016:001
diff cmds.txt ../cmds.txt
# Compare cmds from local branch to ska2-flight version
# ** NO DIFF **
This is tested (and the testing documented) to my satisfaction, so merging. Not clear yet if this will go as a release or if we should bundle #143 (which is a much bigger change and requires django 2.2).
Fixes for kadi update_cmds to run correctly on Py3. Also includes minor flake8 fixes. Just one non-trivial fix related to the diffing and a bytes/unicode issue. (str() of a bytestring gives
b'blah'
notblah
.)Testing
On HEAD (kady) in ska3/flight
On local machine (MacOS) in py3-compat branch
write_cmds.py
to comment out writing the events and fix a Py3-compatibility problem (os.path cannot take None in Py3)