-
Notifications
You must be signed in to change notification settings - Fork 0
Data Source factory upgrade (develop edition)
#36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update the DataSource factory - should be a SOFT7Instance factory instead with proper validation of property metadata and more.
Add pytest and pytest-cov dependencies, along with a new `testing` installable extra.
Remove tests for the now re-written SOFT7EntityPropertyType (previously an Enum, now just a Literal collection with an associated mapping).
Satisfy mypy
Also, rename create_entity() to create_datasource(). Ensure the create_datasource() function returns an instantiated model.
This can now be used in both the SOFT7DataSource model as well as the new DataSourceDimensions model. Add `requests-mock` dependency. Consider using "python" backend for OTELib instead to avoid mocking requests. Remove all filterwarnings from pytest config.
New test using python otelib backend.
Added test for serializing
All the serialization tests (including JSON Schema) must be extended to ensure not just that it _can_ be serialized, but that the content is also what would be expected.
Implemented as a pydantic model_serializer in "wrap" mode. Temporarily changed the otelib dependency to point to a git branch on GitHub that implements migration to pydantic v2.
Make the namespace an AnyUrl.
Quick (but proper) solutions to ever so slightly decrease the number of uncovered lines.
Specifically, move all the "helper"/utility functionalities from `datasource_factory.py` to a new `soft7_instance.py` under pydantic_models.
Run hooks on all files, upgrading them accordingly.
Make factory functions importable from `s7.factories` as `create_*`, where * matches the name of any `*_factory.py` file in the folder.
Split ruff hook for core code base code and non-core.
Started to flesh out an OTEAPI function strategy plugin for converting between a parsed data source to a SOFT7 Entity instance.
Missing finalizing example in notebook.
There is a design issue here with nested entities that should be fixable in a more elegant way
Need to fix setting ClassVar on EntityInstance and the validator for the same.
|
According to this run the updates provided by EMMC-ASBL/oteapi-core#496 indeed fixes the previous issue found for pytests with Python 3.12. |
Cacheing currently happens in two places/levels: - For the OTEAPI pipeline. - For each of the attributes retrieved in a DataSource instance.
Treesarj
previously approved these changes
Jul 9, 2024
Ensure Literal is importable for all supported Python versions
Finalize all "negative" tests as well for the function. Reorganize code to utilize existing utility functions and functionality.
For more information, see https://pre-commit.ci
Update parse_input_entity() as well as tests. Missing updating parse_input_configs() as well as tests.
Treesarj
approved these changes
Jul 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to #20, but targeting
develop.Finalization: