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

Exceptions #381

Merged
merged 21 commits into from
Mar 11, 2024
Merged

Exceptions #381

merged 21 commits into from
Mar 11, 2024

Conversation

dbhart
Copy link
Collaborator

@dbhart dbhart commented Sep 16, 2023

Summary

Provides updated EpanetException class and subclasses that allow for cleaner error reporting during IO.

@coveralls
Copy link

coveralls commented Sep 16, 2023

Coverage Status

coverage: 86.717% (-0.06%) from 86.774%
when pulling 806b04e on dbhart:exceptions
into f07682b on USEPA:main.

@dbhart
Copy link
Collaborator Author

dbhart commented Oct 16, 2023

@kbonney I see you also have a PR in to do some work on Exceptions. I know that the request with MSX was that we somehow use the same error codes as EPANET does in wntr.epanet.msx.io, and I started setting that up for wntr.epanet.io also, but I think we did this in parallel and should try to merge our approaches. :-)

@kbonney
Copy link
Collaborator

kbonney commented Oct 17, 2023

Thanks for bringing this to my attention @dbhart. I think we can stick with what you've proposed here and I can adjust the contents of #374 to fit within that framework.

@dbhart
Copy link
Collaborator Author

dbhart commented Oct 23, 2023

Trim down (remove Enum) and create some tests

wntr/epanet/toolkit.py Show resolved Hide resolved
wntr/epanet/toolkit.py Outdated Show resolved Hide resolved
wntr/epanet/toolkit.py Show resolved Hide resolved
wntr/epanet/toolkit.py Show resolved Hide resolved
wntr/epanet/toolkit.py Outdated Show resolved Hide resolved
wntr/epanet/toolkit.py Outdated Show resolved Hide resolved
wntr/epanet/toolkit.py Outdated Show resolved Hide resolved
wntr/epanet/exceptions.py Show resolved Hide resolved
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@kaklise added tests for exceptions

@dbhart
Copy link
Collaborator Author

dbhart commented Nov 17, 2023

Added documentation file, links to it, tests, and the files are now all up to date.

@dbhart
Copy link
Collaborator Author

dbhart commented Dec 18, 2023

Todo to finish this PR:

  • Get rid of errors.rst file
  • Finish testing
    • Break an INP file (disconnected node)
    • Write test to call toolkit and get an error
  • Remove *_control from toolkit

@kaklise kaklise merged commit e8d907f into USEPA:main Mar 11, 2024
38 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.

4 participants