The entrypoints should now expose a submodule/script with a __hydromt_eps__.
Since this is more specific than the python all variable it poses less restrictions on the package structure.
The __hydromt_eps__ should be a list of strings with names of classes that are exposed.
The name of each class is first taken from the name attribute and otherwise the class name itself from __name__.
Note that both Driver and Model have a name attribute, ModelComponent does not (yet) have this attribute.
In addition I added a check to make sure the exposed classes are nonabstract subclasses of the base class that is associated with each entrypoint group.
Each entrypoint group now has it's own class to avoid code duplication.
General Checklist
[x] Updated tests or added new tests
[x] Branch is up to date with main
[x] Tests & pre-commit hooks pass
[ ] Updated documentation
[x] Updated changelog.rst
Data/Catalog checklist
[ ] data/catalogs/predefined_catalogs.yml has not been modified.
[ ] None of the old data_catalog.yml files have been chagned
[ ] data/chagnelog.rst has been updated
[ ] new file uses LF line endings (done automatically if you used update_versions.py)
[ ] New file has been tested locally
[ ] Tests have been added using the new file in the test suite
Additional Notes (optional)
Add any additional notes or information that may be helpful.
Issue addressed
Fixes #958 Fixes #960
Explanation
The entrypoints should now expose a submodule/script with a
__hydromt_eps__
. Since this is more specific than the python all variable it poses less restrictions on the package structure. The__hydromt_eps__
should be a list of strings with names of classes that are exposed. The name of each class is first taken from thename
attribute and otherwise the class name itself from__name__
. Note that bothDriver
andModel
have aname
attribute,ModelComponent
does not (yet) have this attribute. In addition I added a check to make sure the exposed classes are nonabstract subclasses of the base class that is associated with each entrypoint group. Each entrypoint group now has it's own class to avoid code duplication.General Checklist
main
Data/Catalog checklist
data/catalogs/predefined_catalogs.yml
has not been modified.data_catalog.yml
files have been chagneddata/chagnelog.rst
has been updatedLF
line endings (done automatically if you usedupdate_versions.py
)Additional Notes (optional)
Add any additional notes or information that may be helpful.