-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from sot/complete-events
Make kadi events complete from start of mission
- Loading branch information
Showing
2 changed files
with
32 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
################################################################# | ||
# From scratch | ||
# Events from scratch | ||
################################################################# | ||
|
||
cd ~/git/kadi | ||
export KADI=$PWD | ||
rm -f events3.db3 cmds.h5 cmds.pkl | ||
rm -f events3.db3 | ||
rm -rf kadi/events/migrations | ||
./manage.py makemigrations events | ||
./manage.py migrate | ||
|
||
# First line is just to see that every model works. One can just drop the | ||
# --stop=2000:001 if you are sure it will work. | ||
kadi_update_events --start=1999:240 --stop=2000:001 | ||
kadi_update_events --start=2000:001 | ||
kadi_update_cmds --start=2000:001 | ||
# Note: use kadi_update_events for the installed version. | ||
python -m kadi.update_events --start=1999:001 --stop=2000:001 | ||
python -m kadi.update_events --start=2000:001 | ||
|
||
################################################################# | ||
# Re-build single table | ||
# Re-build single events table | ||
################################################################# | ||
|
||
% export KADI=$PWD | ||
% cp /proj/sot/ska/data/kadi/events.db3 ./ | ||
% python -m kadi.update_events --start=1999:001 --model=CAP --delete-from-start | ||
|
||
################# Historical note about running in a test env ################# | ||
# | ||
# This is not applicable after PR #190. | ||
# | ||
# For commands one MUST do this in a dedicated test env because the pickling | ||
# of UpdatedDict does not work. That object gets a module of __main__ but for | ||
# production it must be kadi.update_cmds. See e.g. | ||
# https://www.stefaanlippens.net/python-pickling-and-dealing-with-attributeerror- | ||
# module-object-has-no-attribute-thing.html | ||
pip install . # to a TEST env!! (Maybe with -e for editable install?) | ||
################################################################# | ||
# Commands from scratch | ||
################################################################# | ||
|
||
cd ~/git/kadi | ||
export KADI=$PWD | ||
rm -f cmds.h5 cmds.pkl | ||
|
||
# Note: use kadi_update_events for the installed version. | ||
python -m kadi.update_cmds --start=2000:001 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters