HERA-Team / hera_notebook_templates

Repository for HERA analysis / real-time pipeline notebooks and related support code
MIT License
0 stars 0 forks source link

tests: add file_calibration run-through test #34

Closed steven-murray closed 1 year ago

steven-murray commented 1 year ago

This adds a small test file and runs testing on the file_calibration notebook. We can add other notebooks as well with a similar framework, if deemed necessary.

There are two downsides to the current setup, as I see it:

  1. It is not testing the abscal because there are no model files. We could add downsampled files to the repo, not sure how big they'd be. Or we can run this action on eg. enterprise at ASU, similar to how we do vis_cpu (for which we need GPU's). I can set that up if we think that's a better way.
  2. The way that the package is setup makes it "easy" to just git pull the repo and re-run the updated notebooks without installing the package itself. This means that any updated dependencies that might be reflected in the pyproject.toml in the lastest commit would not be installed in the user's env, which can cause the notebooks to break (especially with the rapid and entwined development going on in hera_qm and hera_cal). That is, if you update the notebook to do something cool and new, and tell me to update, then I go do a git pull and re-run my makeflow that points to the local copy of the repo, it will get the updated notebook, but not the updated dependencies. The better way to do this, IMHO, would be to include the notebooks/ directory inside the package itself, and include a CLI script (or scripts) that get installed that execute the notebooks. Then the common usage when you want to update and run the notebook would be to install the newest version of the package from github with pip, and then run the script, eg. heranb run file_calibration.

Doing both of these things would be a much more robust way of ensuring that this test actually tests what we'll be running (either on site or at NRAO)

review-notebook-app[bot] commented 1 year ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

steven-murray commented 1 year ago

@jsdillon this is passing tests. The only comment that may be unresolved is the one about phs_sol, which I can't think of a better way to do.