Open namurphy opened 2 years ago
Looks like there's a GitHub Action to automatically download date from a URL. This might be what we need.
This look like fun! I'm going to start working on this issue to the update the xrt_contam_on_ccd.geny file, which is updated monthly.
Hi @namurphy, what is the best way to test the new GitHub Action I created? Can you guide me towards methods/information on how to verify if it's working as expected? New YAML file: joyvelasquez-check_contamination_data_github_action.
That is a really good question! I don't know of a good way to test GitHub Actions automatically. In the on:
section, I often put an option for workflow_dispatch
. This means that if you go to the "Actions" tab on a repository, then you can run (i.e., run) the workflow. After I merge the pull request containing the GitHub Action, I run the action via workflow dispatch, and see if it works or not.
We could also add a pre-commit hook to check GitHub workflows. It doesn't tell us whether the workflow is working correctly, but rather that the way it is set up is valid.
The contamination data files are updated monthly, and we ran into an error for 0.1.0 where we forgot to update it (#74).
One possibility to address this would be to create a GitHub Action that looks for an update to the contamination data file, creates a new branch if there has been an update,
main
We'd also want to do this for, e.g., the
v0.2.x
branch, which we'll create for the next release. In that case, we automate a monthly patch release when the file is updated.A big caveat for this is if getting the contamination data file requires using IDL. I don't think we'd be able to do a GitHub Action in that case, but we might be able to write a script so that we could do this with a single command.
Ideally, in the longer term, we'd create a way to separate the data files from the code repo, and then have the code check and download updated data, if necessary. Given constraints on the time we'd have to implement this, however, a GitHub Action like this would probably suffice.