chandra-mta / MTA

0 stars 0 forks source link

Acis focal fix #14

Closed william-aaron-CFA closed 8 months ago

william-aaron-CFA commented 11 months ago

This PR addressed Issues #6, #7, #8, #10 focused on the set of ACIS focal processing scripts. To summarize, these changes include an inclusion of lock files to prevent race conditions in processing the ACIS Focal data, as well as converting the running python environment to Ska3/flight. We also remove the necessity of importing the mta_common_functions module in favor of using python built-ins. In order to better test changes to our scripts, this PR also includes a test of testing scripts using pytest to individually test each function in the common running.

TESTING:

  1. Fetch the ACIS_Focal_fix git branch
  2. Navigate to the test of test scripts located in ACIS_ft/test/
  3. To run all tests automatically, Engage the ska3/flight environment and run the python pytest package: /proj/sot/ska3/flight/bin/skare /proj/sot/ska3/flight/bin/python pytest -v
  4. If you'd prefer to run the test of each script one at a time, include the name of the testing script after the pytest call. If you'd prefer to only run a test on one specific function from a script, further include the -k option followed by the name of the test of the function you are focusing on. For example: /proj/sot/ska3/flight/bin/skare /proj/sot/ska3/flight/bin/python pytest -v test_update_base_data.py -k test_create_out_name
  5. Change directory into the ACIS_ft/test/outTest directory to view any created files typical of this set of scripts, as well as checking examples of created plots, plus examples of create html pages.