smart-data-models / data-models

Data Models in common use based on real world use-cases. These definitions underpin a digital market of interoperable and replicable smart solutions.
https://smartdatamodels.org/
112 stars 56 forks source link

fix: remove builtins - only externals #38

Closed auphofBSF closed 1 year ago

auphofBSF commented 1 year ago

fix: poetry install issue as show in PR #37

INSTALL_REQUIRES should not be builtins

Additionally 2 new dependencies are listed validate and datetime and don't appear to be used, the source code for validate is only available as a tar package and no maintenance visible on pypa

albertoabellagarcia commented 1 year ago

Regarding validate, we were doing some tests about creating a function (or class) to validate payloads according to the schemas. Validate was one option but certainly, there could be others It was not included yet and maybe in the first official version it will not be there.

auphofBSF commented 1 year ago

I thought that there may be some intention like this. I am using the schema.json to automatically build 2 sets of python classes

-1 a pydantic model automatically generated , these automatically have validation derived from schema.json -2 a further ORM enriched instance of the model for rich database persistence and functionality. -3 all of this generation to be derived from schema.json and a minimal configuration dataset

The idea that an example from a Data Model can be parsed, validated and regenerated from the type1 pydantic model and then be able to persisted/queried by the ORM enriched object against any database backend and back to the type1 object (Full roundtrip). I have this functioning on a few data-models and utilizing pysmartdatamodels I am about to test against a larger set that we are interested in . I don't see why we will not be able to contribute this