Add list-owned: enumerate every concept/DOI the account owns#13
Merged
Conversation
New read-only discovery command that answers 'which repos are tracked in Zenodo' without a hand-rolled API call. Paginates /deposit/depositions, dedupes to the latest version per concept, and maps each to its source GitHub repo (from the isSupplementTo related-identifier). Table or --json; --repo-only filter. - api.py: owned_records_all() (paginated) + repo_from_related() helper. - cli.py: cmd_list_owned + subparser. - tests: repo_from_related parsing (tree/tag, .git, deep paths, no-github). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V5Ku5TpTMg7Ac3V3pMamyb
jcschaff
added a commit
that referenced
this pull request
Jul 3, 2026
…imits - Add the two previously-undocumented commands: list-owned (#13) and bootstrap. - Reword check-drift to describe the membership semantics from this branch. - Add an API gotcha: the public records API is 30 req/min and caps size at 25, so query one tag rather than enumerating all versions tokenlessly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BZx7w9BexQc9wWU5JoHYaF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new read-only discovery command:
It answers the recurring question "which repos are actually tracked in Zenodo under this account?" — authoritatively, from Zenodo itself, rather than from a hand-maintained list (
monitored.json, which drifts).Why
Enumerating tracked concepts came up while scoping a release-backfill task. There was no first-class way to do it, and the deposit API has gotchas (pagination, concept-vs-version dedup) worth encoding once in the CLI instead of hand-rolling.
How
api.owned_records_all()— paginates/deposit/depositions(the existingowned_records()only took the first page).api.repo_from_related()— extractsowner/repofrom theisSupplementTogithub.com related-identifier the archiver sets on every version.cli.cmd_list_owned— dedupes depositions to the latest version per concept, maps each to its repo, and prints a table or--json;--repo-onlyfilters to GitHub-linked records.Tests
tests/test_repo_from_related.pycovers tree/tag URLs,.gitsuffixes, deep paths (release URLs), picking the github link among other relations, and no-github/empty cases. Full suite: 20/20 green (stdlibunittest).Example (this account)
12 concepts, all GitHub-linked — e.g.
virtualcell/vcell(Virtual Cell 8.0),virtualcell/pyvcell,virtualcell/vcell-solvers,cam-center/SpringSaLaD, and the biosimulations/biosimulators family.🤖 Generated with Claude Code
https://claude.ai/code/session_01V5Ku5TpTMg7Ac3V3pMamyb