Skip to content

Conversation

@sdruskat
Copy link
Contributor

@sdruskat sdruskat commented Oct 2, 2025

This PR adds explanatory documentation of the public API.
It complements #432

@sdruskat sdruskat mentioned this pull request Oct 2, 2025
1 task
@sdruskat
Copy link
Contributor Author

@SKernchen Please review changes and approve as you see fit.
As warnings are treated as errors in the action workflow, and there are some outdated imports due to refactoring in progress, I suggest running poetry run taask docs-live locally to check.

@sdruskat sdruskat requested a review from SKernchen October 17, 2025 07:52
Copy link
Contributor

@SKernchen SKernchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like the improvements. My suggestion is showing a more complex example. If we keep the short version, we should mention that "bar" is the expected name.


#### Model instances in different types of plugin

You can extend `hermes` with plugins for three different commands: `harvest`, `curate`, `deposit`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So "process plugins" and "post-process plugins" won't exist any more? This should (also) be mentioned in some architectural doc rather than in a side note here. As far as I can tell it is not mentioned anywhere else yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made an issue for that #447 . In the parent issue it is also described.


The complex data structure of JSON-LD is internally constructed in the `hermes` data
model, and to make it possible to work with only the data that is important - the actual terms
and their values - the internal data model types provide a function `.to_python()`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's all Python though 👀 Would .to_dict() be a better name?

Copy link
Collaborator

@notactuallyfinn notactuallyfinn Oct 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think .to_native() or .to_native_python() would be even better, since ld_dict is also a dict and this function also exists for ld_list.
But all suggestions do not mention that the structure is simplified in the process (similar, but not synonymous with compacting the expanded JSON-LD value).

@sdruskat
Copy link
Contributor Author

Thanks for all of your comments. I'll address them after my holidays.

@sdruskat sdruskat marked this pull request as draft October 26, 2025 16:20
@SKernchen SKernchen marked this pull request as ready for review January 13, 2026 10:34
@SKernchen SKernchen merged commit 8ace58c into refactor/423-implement-public-api Jan 13, 2026
3 of 5 checks passed
@SKernchen SKernchen deleted the refactor/423-implement-public-api+docs branch January 13, 2026 10:49
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.

5 participants