Skip to content

Address Zenodo publish review feedback (PR #37) - #40

Closed
brunomartinsmv wants to merge 1 commit into
mainfrom
cursor/zenodo-review-fixes-5eda
Closed

Address Zenodo publish review feedback (PR #37)#40
brunomartinsmv wants to merge 1 commit into
mainfrom
cursor/zenodo-review-fixes-5eda

Conversation

@brunomartinsmv

Copy link
Copy Markdown
Owner

Summary

Follow-up to the automated review of PR #37. The blocking issue (missing scripts/publish_zenodo_release.py) was already resolved in PR #38; this PR addresses the remaining review items.

Changes

  • Workflow checkout fix: workflow_dispatch now checks out the requested release tag (github.event.inputs.tag) instead of the default branch.
  • Secret guard: explicit step fails with ::error:: when ZENODO_ACCESS_TOKEN is not configured (using env var check, since secrets cannot be referenced in if conditionals).
  • Dynamic CHANGELOG anchor: _changelog_section_anchor() parses CHANGELOG.md for the version date instead of hardcoding 200---2026-07-12.
  • Tests: six unit tests with unittest.mock covering CHANGELOG parsing, metadata generation, token validation, the full publish flow, and HTTP error handling.
  • .zenodo.json: removed empty "orcid": "" field.

Notes

  • The --deposition-id 18615164 value should still be confirmed in the Zenodo dashboard before the first automated publish (record ID vs. latest deposition ID).
  • After merging, update DOIs in README.md, CITATION.cff, and docs/reproducibility.md when a new Zenodo version is published.

Test plan

  • python -m pytest tests/test_publish_zenodo_release.py -v
  • python -m ruff check scripts/publish_zenodo_release.py tests/test_publish_zenodo_release.py
Open in Web Open in Cursor 

- Checkout the release tag in workflow_dispatch (not default branch)
- Fail early with a clear error when ZENODO_ACCESS_TOKEN is missing
- Derive CHANGELOG anchor from tag/version instead of hardcoding
- Add mocked HTTP tests for the publish script
- Remove empty ORCID field from .zenodo.json

Co-authored-by: Bruno <brunomartinsmv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants