Closed auphofBSF closed 2 years ago
Hi, thanks for the contribution. The changes look go to me. I agree, moving the pysmartdatamodels into its own repo would make sense. The lifecycle management should be easier and more clear. @albertoabellagarcia what do you think about that?
Change Proposal - (WIP for review/suggestions/discussion)
Whilst I am integrating aspects of the SmartDataModels into some of our applications, I see there being great benefit to enhancing the work in various scripts particularly
pysmartdatamodels
. This PR is there for discussion and suggestions. Possibly thepysmartdatamodels
should be its own repo withinSmart-data-models
rather than a folder within this repodata-models
Demonstration of functionality can be found in https://colab.research.google.com/drive/1D8jZ6-sOGCksAtJ6NUHv9yk6ONvjKJBc?usp=sharing
1) move setup.py towards compatibility with current package managers, fix issues and moves towards PEP621 covering PEP517 and PEP518, tested against pip 21.x and poetry 1.2.1 2) introduce a CLI that essential automatically exports functions that were available in an easy to use CLI
pysmartdatamodel_cli --help
3) setup a pytest framework✅installing this with
poetry
usingpoetry add ......
works now as expected , including in--editable
mode ✅installing this withpip install .......
breaking changes
the pysmartdatamodels.py is turned into a module with all the functions copied across into
pysmartdatamodels/commands.py
. Only minor alterations are the relocation of theofficial_list_data_models.json
into a folderpysmartdatamodel/model-assets/
and the change of https://github.com/smart-data-models/data-models/blob/cb958f2a1a81256f4b400163fd5427688289b479/pysmartdatamodels/pysmartdatamodels.py#L326validate_data_model_schema(schemaUrl)
tovalidate_data_model_schema(schema_url)
for some reason the CLI auto generator does not want to recognizeschemaUrl