SAGUARO-MMA / saguaro_tom

A Target and Observation Manager for SAGUARO
0 stars 0 forks source link

Package sassy_src for use with saguaro-tom #2

Closed griffin-h closed 2 years ago

griffin-h commented 2 years ago

We need the sassy_src module to be available to the TOM so that it can communicate with the catalogs that @pndaly has ingested in the database on SASSyII. @pndaly thinks the easiest way is to separate out the models subdirectory into its own GitHub repository. Then we can pip install from there via the TOM requirements file.

pndaly commented 2 years ago

OK, I made a good start on this so check it out. On sassy2 in /home/phil_daly/sassy_q3c_models is the code that handles all the current databases we support plus a code for generic psql testing. Not really much different from /home/phil_daly/SASSyII/sassy_src/models but removed from that code tree.

Whilst investigating Jillian's other issue, I created (in the same directory) catalogs_problem1.py and catalogs_problem2.py which are the same code except for:

  1. importing from sassy_q3c_models instead of sassy_src.models;
  2. importing milliquas_q3c and asassn_q3c in a different order;

You should be able to run this OK. You will need to export the database credentials (remember we don't like user/pass data on public github repositories if possible):

% export DB_HOST='localhost'; export DB_PORT=5432; export DB_USER='sassy'; export DB_NAME='sassy'; export DB_PASS='SASSy_520' % PYTHONPATH=/home/phil_daly python3 catalogs_problem1.py --verbose % PYTHONPATH=/home/phil_daly python3 catalogs_problem2.py --verbose

They should produce the same out. If I create the setup.py and install it, we should be able to get rid of the PYTHONPATH part. Before that, try the above to make sure it works for you.

pndaly commented 2 years ago

There is now a repository https://github.com/SAGUARO-MMA/sassy_q3c_models ... I need to get this put on sassy2 and correct the issue with GWGC. If you have a conda environment, however, feel free to test it:

% git clone https://github.com/SAGUARO-MMA/sassy_q3c_models.git % cd sassy_q3c_models % python3 -m pip install -r requirements.txt % python3 setup.py install

pndaly commented 2 years ago

Have completed the update/upgrade of gwgc_q3c so RA agrees between astropy/simbad2k and local copy. Unless someone hollers, I shall close this issue early next week.