Skip to content

Added framework for WNTR extensions#554

Merged
kaklise merged 9 commits intoUSEPA:mainfrom
kaklise:extensions
Mar 23, 2026
Merged

Added framework for WNTR extensions#554
kaklise merged 9 commits intoUSEPA:mainfrom
kaklise:extensions

Conversation

@kaklise
Copy link
Copy Markdown
Collaborator

@kaklise kaklise commented Mar 16, 2026

Summary

The following PR adds a framework for WNTR extensions. WNTR extensions are intended to house beta and self-contained functionality that adds to WNTR, but is currently not part of core WNTR development. The extensions should be designed for a wide audience. This PR include a very simple "Hello World" example extension that uses the intended file structure. More information is included in the Contributing section of the WNTR documentation.

Tests and documentation

The hello world extension includes a simple test and documentation. The Contributing section of the documentation was updated to document the file structure for extension source code, documentation, and testing.

Acknowledgement

By contributing to this software project, I acknowledge that I have reviewed the software quality assurance guidelines and that my contributions are submitted under the Revised BSD License.

@kaklise kaklise requested a review from kbonney March 16, 2026 21:15
@coveralls
Copy link
Copy Markdown

coveralls commented Mar 16, 2026

Coverage Status

coverage: 85.755% (+4.2%) from 81.528%
when pulling a9e6e97 on kaklise:extensions
into 387cce4 on USEPA:main.

Copy link
Copy Markdown
Collaborator

@kbonney kbonney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, the design is clean and the separation of extensions from core is well thought out. The file structure conventions are documented clearly and the example "hello_world" extensions provides a good example for developers working on extensions.

Several minor issues need to be resolved before merging:

  • We need to decide and document how extensions should handle additional requirements.
  • Syntax error in coverage run --source=wntr --omit=$OMIT -m pytest -m "not time_consuming" -m "not extensions" --doctest-modules --doctest-glob="*.rst" wntr, duplicate -m flags override rather than combine.
  • Any doctests added by an extension's documentation will run along with core WNTR. I assume we don't want this to be the case so we should add --ignore=wntr/extensions to the pytest invocations in our CI/CD for core WNTR.

The latter two points are simple fixes that I can address. The first point may require some discussion. Two potential options are to specify extras_require options for each extension in setup.py or to have a requirements.txt file in each extensions src folder.

@kbonney
Copy link
Copy Markdown
Collaborator

kbonney commented Mar 20, 2026

We will move forward with the extras_require approach to extension dependencies. As part of this approach, I added an update to move requirements.txt optional, test, and documentation dependencies to extras_require fields. I also added some draft text in the developer docs about requirements.

@kaklise kaklise merged commit 1d304a6 into USEPA:main Mar 23, 2026
87 of 88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants