Skip to content
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

removal of dependency datamodel-code-generator #1367

Closed
ricardogsilva opened this issue Oct 4, 2023 · 1 comment
Closed

removal of dependency datamodel-code-generator #1367

ricardogsilva opened this issue Oct 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ricardogsilva
Copy link
Member

Pygeoapi currently has a dev dependency on datamodel-code-generator. This third-party dependency is never used by pygeoapi at runtime. Moreover, it was only used when autogenerating the models in pygeoapi/models/cql.py.
Since its creation, this file that contains the autogenerated models has even had some manual modifications, meaning it has diverged from the automated generation process - thus making it harder to ever regenerate it, if needed.

Keeping the dependency on datamodel-code-generator also has the downside that it actually prevents pygeoapi from moving to a newer version of the jsonschema package[1] - due to this dependency, pygeoapi's jsonschema is stuck at v4.17.3, and this is the last version to support Python 3.7, which pygeoapi still aims to support (however, check #1360 for more info).

As such, I am proposing that datamodel-code-generator be removed from pygeoapi's requirements-dev.txt file.

[1] - datamodel-code-generator depends on openapi-schema-validator and on openapi-spec-validator, both of which are not used by pygeoapi, and both of which mandate jsonschema < 4.18.0. The current version of jsonschema` is v4.19.1

@ricardogsilva
Copy link
Member Author

Completed by merging #1370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant