njcuk9999 / apero-drs

A PipelinE to Reduce Observations - The DRS for SPIRou (CFHT)
MIT License
12 stars 0 forks source link

Prompts during install when passing in command args #743

Closed cusher closed 6 months ago

cusher commented 6 months ago

When attempting to do an automated install (i.e. passing in all arguments through the command line) on version 0.7.288, we get the following prompts:

Path '/h/spdrs/apero/data/default/script_test' does not exist. Create?

Passing in the --datadir and --always_create=True

Do you want to add all groups to the config file?

Not sure how to pass this in, or what would be the suggested default

njcuk9999 commented 6 months ago

This should be an easy fix, I can probably assume that if someone is using the command line just to add all the config groups to the config file (it makes no difference other than having more constants to look through in the user_constants.ini file)

njcuk9999 commented 6 months ago

So v0.7.289-live is not ready for use yet but @cusher could you test it with command line arguments?

It works for me with the following:

python install.py          \
          --name="spirou_test"    \
          --config="/scratch2/spirou/drs-settings/"    \
          --instrument="SPIROU"    \
          --rawdir="/scratch2/spirou/drs-data/spirou_test/raw"    \
          --tmpdir="/scratch2/spirou/drs-data/spirou_test/tmp"    \
          --reddir="/scratch2/spirou/drs-data/spirou_test/red"    \
          --outdir="/scratch2/spirou/drs-data/spirou_test/out"    \
          --calibdir="/scratch2/spirou/drs-data/spirou_test/calib"    \
          --telludir="/scratch2/spirou/drs-data/spirou_test/tellu"    \
          --plotdir="/scratch2/spirou/drs-data/spirou_test/plot"    \
          --rundir="/scratch2/spirou/drs-data/spirou_test/run"    \
          --assetsdir="/scratch2/spirou/drs-data/spirou_test/asset"    \
          --logdir="/scratch2/spirou/drs-data/spirou_test/msg"    \
          --otherdir="/scratch2/spirou/drs-data/spirou_test/other" \
          --lbldir="/scratch2/spirou/drs-data/spirou_test/lbl" \
          --always_create=True    \
          --plotmode=0    \
          --clean=True    \
          --clean_no_warning=True \
          --database_mode=2    \
          --database_host="cosmos.astro.umontreal.ca"    \
          --database_user="spirou"    \
          --database_pass="Covid19!"    \
          --database_name="spirou"    \
          --calibtable="spirou_test"    \
          --tellutable="spirou_test"    \
          --findextable="spirou_test"    \
          --logtable="spirou_test"    \
          --astromtable="spirou_test"    \
          --rejecttable="spirou_test"    \
          --langtable="spirou_test" 

Obviously you'll have to update the paths and database stuff