Closed rossjjennings closed 1 year ago
The test failure doesn't seem to be related to this PR specifically. It looks like it's failing to download some packages related to Ghostscript.
OK, I think I fixed the previous failure, which was related to a missing "apt-get update" in GitHub Actions. The new failure is legitimately a problem with my changes.
It turned out I had to change the par-directory
and tim-directory
specified in PINT Pal's test config files. These were "wrong" before this change, too, but previously it didn't matter because they were overridden by run_notebook()
anyway.
Thanks for taking care of this Ross, and for having a look, Joe.
This makes the path handling in the notebook runner a bit more flexible, in a way that should make it possible to do notebook autoruns for IPTA DR3 and other future datasets where we use pint_pal as a standalone package. None of the changes should affect the way we had been doing notebook autoruns for the NANOGrav 15-year dataset.
Specifically, the changes are:
run_in_subdir()
, which contained substitutions specific to the 15-year process notebook as well as functionality to create a new subdirectory and run the notebook in it, has been eliminated. The 15-year-specific substitutions have been moved totest_run_notebook()
, and the subdirectory functionality has been moved torun_notebook()
, which I renamedrun_template_notebook()
.run_template_notebook()
no longer overrides thetim-directory
andpar-directory
specified in config files. Instead, if they are not absolute paths, it treats them as relative to the parent directory of the directory containing the config file, which is a convention we have continued to adhere to for IPTA DR3.run_template_notebook()
can now accept relative paths for thetemplate_nb
andconfig_file
arguments, in addition to absolute paths. Fortemplate_nb
, the path is treated as relative to thepint_pal/nb_templates
directory, while forconfig_file
, it is treated as relative to the current working directory.