You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor JSON struct for robust metadata handling (#140)
* Create a Manifest Pydantic model to hold the respective
JSON structure (=manifest.py)
=> This refactoring of mainly the store_productdocset_json
function leverages Pydantic models to create a more robust,
clear, and maintainable data pipeline.
* Catch Pydantic validation errors & JSON decoding errors
* Introduce `*_segment` methods in Doctype model
* Adjust LifecycleFlag and lifecycle.py:
* Fix type warnings
* Use `__missing__` to make it possible to delegate a
string to LifecycleFlag
* Introduce `upython` in `devel/activate-aliases.sh`
* Simplify DocumentFormat
* Correct datemodified field, add tests
* Remove field_validator for lifecycle
This is already covered in #113
Refactor JSON structure for robust metadata handling in ``docserv.cli.cmd_metadata.metaprocess:store_productdocset_json``. Introduce Pydantic :class:`~docbuild.models.manifest.Manifest` model to encapsulate document metadata, enhancing validation and serialization.
0 commit comments