Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a GitHub Action to automatically update the data files #80

Open
namurphy opened this issue Oct 12, 2022 · 5 comments
Open

Create a GitHub Action to automatically update the data files #80

namurphy opened this issue Oct 12, 2022 · 5 comments
Labels
Code Improvement For general improvements to the codebase without adding new features. Infrastructure Issues related to packaging or the CI

Comments

@namurphy
Copy link
Contributor

namurphy commented Oct 12, 2022

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,

  • Look for any updates to the contamination data file
  • If there were any updates:
    • Create a new branch
    • Replace the old data file with the new data file
    • Run tests
    • If tests pass:
      • Merge the new branch into 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.

@namurphy
Copy link
Contributor Author

Looks like there's a GitHub Action to automatically download date from a URL. This might be what we need.

@joyvelasquez joyvelasquez added enhancement New feature or request Code Improvement For general improvements to the codebase without adding new features. labels Feb 8, 2024
@joyvelasquez
Copy link
Contributor

joyvelasquez commented Feb 8, 2024

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.

joyvelasquez added a commit to joyvelasquez/xrtpy that referenced this issue Feb 8, 2024
Create a GitHub Action to automatically update the data files,address issue HinodeXRT#80
@joyvelasquez
Copy link
Contributor

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.

@namurphy
Copy link
Contributor Author

namurphy commented Feb 9, 2024

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.

@namurphy
Copy link
Contributor Author

namurphy commented Feb 9, 2024

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.

@wtbarnes wtbarnes added Infrastructure Issues related to packaging or the CI and removed enhancement New feature or request labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement For general improvements to the codebase without adding new features. Infrastructure Issues related to packaging or the CI
Projects
None yet
Development

No branches or pull requests

3 participants