Skip to content

Update mate2 - #4

Open
julesghub wants to merge 3 commits into
mainfrom
update-mate2
Open

Update mate2#4
julesghub wants to merge 3 commits into
mainfrom
update-mate2

Conversation

@julesghub

@julesghub julesghub commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Changes for M@TE2.

Now model repos will do the update_doi.py step slightly differently.
No longer is the .website_material/ directory used or updated.

A description of the changes made.

file_utils.py — create_or_update_json_entry now:

  • resolves entities by full @id or its last path segment (so model_code_inputs matches http://example.org/base/model_code_inputs)
  • matches the root token ./ to the root Dataset (id ./ or a Dataset whose id ends in /)
  • raises KeyError instead of silently print+return, so failures are explicit

parse_utils.py:

  • new _find_root_entity() used by both format_citation and ro_crate_to_cff (handles the http://example.org/base/ root, not just ./)
  • guarded ro_crate_to_cff against empty identifier → no more IndexError mid-script

update_doi.py:

  • retargeted the model entity writes to the real model_code_inputs / model_output_data, as best-effort (warning, not fatal, if absent)
  • root identifier + creditText writes now actually land

@julesghub
julesghub marked this pull request as ready for review August 6, 2026 21:46
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