Skip to content

Myst yml metadata fallback - #13

Open
agahkarakuzu wants to merge 8 commits into
mainfrom
myst-yml-metadata-fallback
Open

Myst yml metadata fallback#13
agahkarakuzu wants to merge 8 commits into
mainfrom
myst-yml-metadata-fallback

Conversation

@agahkarakuzu

Copy link
Copy Markdown
Member

Make zenodo endpoints use bibliographic metadata from myst.yml when paper.md frontmatter (JOSS style) is missing.

Relates to neurolibre/inara#2.

Agah added 8 commits August 2, 2026 22:13
…iations

An unquoted `date: 2024-01-15` in myst.yml -- the MyST-canonical form -- is
parsed by yaml.safe_load into a datetime.date, copied into the paper metadata,
and handed to a Celery task whose payload is serialized as JSON. That raised
inside a Flask route with no handler: HTTP 500, no GitHub comment, no buckets.
Map a non-string date to its string form.

A front-matter key that is present but empty (None, "", [], {}) now counts as
absent, for both the scalar fills and the authors/affiliations pair check, so a
paper.md that merely lists the keys no longer defeats the fallback.

A bare string is accepted where MyST accepts one: an author entry becomes a
named author with no affiliations, an affiliation entry becomes an affiliation
named after the string with no id, and either still holds its index position --
matching inara's Lua filter, so a PDF and a Zenodo record cannot credit
different institutions. A scalar `affiliations:` value is one entry rather than
one per character.

In the deposit task, drop the dead affiliation_mapping line that indexed
data['affiliations'] unguarded, and pass data.get('affiliations') or [] so
authors-without-affiliations metadata resolves every author to None instead of
raising KeyError. An affiliation index the list does not define now logs a
warning naming the author rather than silently recording no institution.

Claude-Session: https://claude.ai/code/session_01YFCLUc1iAr5jjjuUTMMEB8
Uncalled, and its 3001-3099 range never covered the content server's 3100-3200.

Claude-Session: https://claude.ai/code/session_016qxMAGM5tpB5okf7hJJgJW
Hooks celeryd_after_setup so it runs once per node, before tasks are consumed.

Claude-Session: https://claude.ai/code/session_016qxMAGM5tpB5okf7hJJgJW
Re-adds the DOCKER-USER rule after docker.service on every boot; idempotent so
restarts cannot stack duplicates.

Claude-Session: https://claude.ai/code/session_016qxMAGM5tpB5okf7hJJgJW
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.

1 participant