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

Always commit citation cache #287

Open
vincerubinetti opened this issue Oct 15, 2024 · 0 comments
Open

Always commit citation cache #287

vincerubinetti opened this issue Oct 15, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@vincerubinetti
Copy link
Collaborator

The citation process automatically caches network requests (immediately, at a per-request level) and stores them in _cite/.cache/cache.db. However, when running the citation process on GitHub Actions, changes to this .db file go away after each run unless explicitly kept. If you look at update-citations.yaml, the "commit updated citations" step happens after running the main cite.py script. If the cite script fails for any reason (e.g. some sources couldn't be cited), it will skip all the remaining steps of the job, and the work that was actually successful and cached in that workflow run will be lost. As such, we should add a "Commit cache" step immediately after the cite script step, which uses stefanzweifel/git-auto-commit-action@v5 but only commits cache.db, and always runs even if the cite script step fails. Make use of always() and/or continue-on-error.

@vincerubinetti vincerubinetti added the enhancement New feature or request label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant