Skip to content

Conversation

@ml-evs
Copy link
Member

@ml-evs ml-evs commented Oct 20, 2024

This is continuing @JPBergsma's work from #1698, and transplanting it on the v1.x branch. This is the first OPTIMADE v1.2 field to be added, following additions to the specification primarily introduced in Materials-Consortia/OPTIMADE#463.

JPBergsma added 30 commits July 6, 2023 17:14
JPBergsma and others added 20 commits October 2, 2023 18:21
update description property_metadata field

Co-authored-by: Matthew Evans <[email protected]>
removed duplicate requirement
* Use Python 3.9 as the 'base' CI version for linting

* Update pre-commit hooks

* Run `pyupgrade --py39-plus` to upgrade legacy annotations

* Add `--exit-non-zero-on-fix` for ruff

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Use f-string over format

Co-authored-by: Casper Welzel Andersen <[email protected]>

---------

Co-authored-by: Casper Welzel Andersen <[email protected]>
@ml-evs ml-evs added the OPTIMADE v1.2 This label describes actions that have to be taken to be complient with OPTIMADE 1.2 label Oct 20, 2024
@ml-evs ml-evs requested a review from CasperWA as a code owner October 20, 2024 12:53
@ml-evs ml-evs added the skip_changelog Use this label to omit this PR/issue from the CHANGELOG. label Oct 20, 2024
@ml-evs ml-evs changed the base branch from main to ml-evs/add-meta October 20, 2024 13:02
@ml-evs ml-evs merged commit 469a565 into ml-evs/add-meta Oct 20, 2024
5 of 9 checks passed
@ml-evs ml-evs deleted the ml-evs/add-meta-to-entries branch October 20, 2024 13:02
ml-evs added a commit that referenced this pull request Oct 28, 2024
* Addded meta field to entry model

* Added validator for meta field.

* Update pyyaml version in requirements.txt

* Update requirements.txt

* Update requirements.txt

* Remove test structures to get an idea of what triggers yaml import error on github.

* Readding meta field to test_good_structures.

* Readding meta field to test_structures.json.

* Added handling None for property_metadata to validator + small correctionds.

* Added test for validator per entry meta field.

* Added test for presence metadata field in test_structures.py.

* Remove metadata fields when the fields that they belong to are not returned.

* add extra test for bad prefix.

* Test if dependancy conflict causes error.

* Revert "Test if dependancy conflict causes error."

This reverts commit 6251e48.

* Revert "Revert "Test if dependancy conflict causes error.""

This reverts commit bf9692a.

* correct version httpx.

* commenting out validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue Github.

* Slowly reassembling validator to see if this resolves issue Github.

* Slowly reassembling validator to see if this resolves issue Github..

* Slowly reassembling validator to see if this resolves issue Github..

* Placed yaml import in try except block.

* Added more cases to test data and added bugfix for removing associated metadata when a field is excluded.

* Removed seemingly unneccesary mypy ignore exception statement.

* remove change in version pyyaml in requirements.txt.

* correct spelling mistake

* moved starts_with_supported_prefix and check_starts_with_supported_prefix functions to BaseresouceMapper.

* Expanded docstring check_starts_with_supported_prefix

* Expanded docstring check_starts_with_supported_prefix

* Added return type for  starts_with_supported_prefix and check_starts_with_supported_prefix.

* Added return type for  starts_with_supported_prefix and check_starts_with_supported_prefix.

* Adjusted validators baseed on suggestion Matthew.

Co-authored-by: ml-evs [email protected]

* small corrections validators.

* small correction in removing unrequested metadata.

* Added spaces before values 'exmpl_originates_from _project'.

* update openapijson

* update openapijson

* update openapijson

* use lstrip instead of manually removing / one at a time.

* Update optimade/models/entries.py

update description property_metadata field

Co-authored-by: Matthew Evans <[email protected]>

* Update description per entry meta datafield.

* update openapijson.

* try to see if moving yaml is still necessary.

* Revert "try to see if moving yaml is still necessary."

This reverts commit 68f14d3.

* Added supported_prefixes field to config.py

* Update requirements-client.txt (#1813)

removed duplicate requirement

* Modernize all Python 3.8 annotations (#1815)

* Use Python 3.9 as the 'base' CI version for linting

* Update pre-commit hooks

* Run `pyupgrade --py39-plus` to upgrade legacy annotations

* Add `--exit-non-zero-on-fix` for ruff

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Use f-string over format

Co-authored-by: Casper Welzel Andersen <[email protected]>

---------

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Update pydantic validators and model configs for 2024

* Remove validation of 'supported prefix' in lieu of just checking leading underscores

---------

Co-authored-by: Johan Bergsma <[email protected]>
Co-authored-by: Casper Welzel Andersen <[email protected]>
ml-evs added a commit that referenced this pull request Feb 7, 2025
* Addded meta field to entry model

* Added validator for meta field.

* Update pyyaml version in requirements.txt

* Update requirements.txt

* Update requirements.txt

* Remove test structures to get an idea of what triggers yaml import error on github.

* Readding meta field to test_good_structures.

* Readding meta field to test_structures.json.

* Added handling None for property_metadata to validator + small correctionds.

* Added test for validator per entry meta field.

* Added test for presence metadata field in test_structures.py.

* Remove metadata fields when the fields that they belong to are not returned.

* add extra test for bad prefix.

* Test if dependancy conflict causes error.

* Revert "Test if dependancy conflict causes error."

This reverts commit 6251e48.

* Revert "Revert "Test if dependancy conflict causes error.""

This reverts commit bf9692a.

* correct version httpx.

* commenting out validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue Github.

* Slowly reassembling validator to see if this resolves issue Github.

* Slowly reassembling validator to see if this resolves issue Github..

* Slowly reassembling validator to see if this resolves issue Github..

* Placed yaml import in try except block.

* Added more cases to test data and added bugfix for removing associated metadata when a field is excluded.

* Removed seemingly unneccesary mypy ignore exception statement.

* remove change in version pyyaml in requirements.txt.

* correct spelling mistake

* moved starts_with_supported_prefix and check_starts_with_supported_prefix functions to BaseresouceMapper.

* Expanded docstring check_starts_with_supported_prefix

* Expanded docstring check_starts_with_supported_prefix

* Added return type for  starts_with_supported_prefix and check_starts_with_supported_prefix.

* Added return type for  starts_with_supported_prefix and check_starts_with_supported_prefix.

* Adjusted validators baseed on suggestion Matthew.

Co-authored-by: ml-evs [email protected]

* small corrections validators.

* small correction in removing unrequested metadata.

* Added spaces before values 'exmpl_originates_from _project'.

* update openapijson

* update openapijson

* update openapijson

* use lstrip instead of manually removing / one at a time.

* Update optimade/models/entries.py

update description property_metadata field

Co-authored-by: Matthew Evans <[email protected]>

* Update description per entry meta datafield.

* update openapijson.

* try to see if moving yaml is still necessary.

* Revert "try to see if moving yaml is still necessary."

This reverts commit 68f14d3.

* Added supported_prefixes field to config.py

* Update requirements-client.txt (#1813)

removed duplicate requirement

* Modernize all Python 3.8 annotations (#1815)

* Use Python 3.9 as the 'base' CI version for linting

* Update pre-commit hooks

* Run `pyupgrade --py39-plus` to upgrade legacy annotations

* Add `--exit-non-zero-on-fix` for ruff

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Use f-string over format

Co-authored-by: Casper Welzel Andersen <[email protected]>

---------

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Update pydantic validators and model configs for 2024

* Remove validation of 'supported prefix' in lieu of just checking leading underscores

---------

Co-authored-by: Johan Bergsma <[email protected]>
Co-authored-by: Casper Welzel Andersen <[email protected]>
ml-evs added a commit that referenced this pull request Mar 8, 2025
* Addded meta field to entry model

* Added validator for meta field.

* Update pyyaml version in requirements.txt

* Update requirements.txt

* Update requirements.txt

* Remove test structures to get an idea of what triggers yaml import error on github.

* Readding meta field to test_good_structures.

* Readding meta field to test_structures.json.

* Added handling None for property_metadata to validator + small correctionds.

* Added test for validator per entry meta field.

* Added test for presence metadata field in test_structures.py.

* Remove metadata fields when the fields that they belong to are not returned.

* add extra test for bad prefix.

* Test if dependancy conflict causes error.

* Revert "Test if dependancy conflict causes error."

This reverts commit 6251e48.

* Revert "Revert "Test if dependancy conflict causes error.""

This reverts commit bf9692a.

* correct version httpx.

* commenting out validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue github.

* Slowly reassembling validator to see if this resolves issue Github.

* Slowly reassembling validator to see if this resolves issue Github.

* Slowly reassembling validator to see if this resolves issue Github..

* Slowly reassembling validator to see if this resolves issue Github..

* Placed yaml import in try except block.

* Added more cases to test data and added bugfix for removing associated metadata when a field is excluded.

* Removed seemingly unneccesary mypy ignore exception statement.

* remove change in version pyyaml in requirements.txt.

* correct spelling mistake

* moved starts_with_supported_prefix and check_starts_with_supported_prefix functions to BaseresouceMapper.

* Expanded docstring check_starts_with_supported_prefix

* Expanded docstring check_starts_with_supported_prefix

* Added return type for  starts_with_supported_prefix and check_starts_with_supported_prefix.

* Added return type for  starts_with_supported_prefix and check_starts_with_supported_prefix.

* Adjusted validators baseed on suggestion Matthew.

Co-authored-by: ml-evs [email protected]

* small corrections validators.

* small correction in removing unrequested metadata.

* Added spaces before values 'exmpl_originates_from _project'.

* update openapijson

* update openapijson

* update openapijson

* use lstrip instead of manually removing / one at a time.

* Update optimade/models/entries.py

update description property_metadata field

Co-authored-by: Matthew Evans <[email protected]>

* Update description per entry meta datafield.

* update openapijson.

* try to see if moving yaml is still necessary.

* Revert "try to see if moving yaml is still necessary."

This reverts commit 68f14d3.

* Added supported_prefixes field to config.py

* Update requirements-client.txt (#1813)

removed duplicate requirement

* Modernize all Python 3.8 annotations (#1815)

* Use Python 3.9 as the 'base' CI version for linting

* Update pre-commit hooks

* Run `pyupgrade --py39-plus` to upgrade legacy annotations

* Add `--exit-non-zero-on-fix` for ruff

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Use f-string over format

Co-authored-by: Casper Welzel Andersen <[email protected]>

---------

Co-authored-by: Casper Welzel Andersen <[email protected]>

* Update pydantic validators and model configs for 2024

* Remove validation of 'supported prefix' in lieu of just checking leading underscores

---------

Co-authored-by: Johan Bergsma <[email protected]>
Co-authored-by: Casper Welzel Andersen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OPTIMADE v1.2 This label describes actions that have to be taken to be complient with OPTIMADE 1.2 skip_changelog Use this label to omit this PR/issue from the CHANGELOG.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants