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

Refactor exception types #307

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Refactor exception types #307

merged 1 commit into from
Jun 12, 2023

Conversation

michael-nml
Copy link
Collaborator

This PR has two purposes:

  • Introduction of a new NannyMLException type to serve as base class for all NannyML exceptions. It's intended to easily allow capturing exceptions generated by NannyML, while ignoring others.
  • Fixing a bug introduced in commit fe92481b389ae2b0ed32d2804cadadc573807567 which caused InvalidArgumentsException to be incorrectly translated to CalculatorException.

@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Patch coverage: 84.53% and project coverage change: +0.06 🎉

Comparison is base (ce4fc18) 83.16% compared to head (a207ae7) 83.22%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #307      +/-   ##
==========================================
+ Coverage   83.16%   83.22%   +0.06%     
==========================================
  Files          82       82              
  Lines        6408     6428      +20     
  Branches      971      972       +1     
==========================================
+ Hits         5329     5350      +21     
+ Misses        819      814       -5     
- Partials      260      264       +4     
Impacted Files Coverage Δ
nannyml/io/base.py 51.25% <ø> (ø)
nannyml/io/db/database_writer.py 83.67% <ø> (ø)
nannyml/io/db/mappers.py 90.65% <ø> (ø)
nannyml/io/file_reader.py 37.03% <ø> (ø)
nannyml/io/file_writer.py 96.15% <ø> (ø)
nannyml/io/pickle_file_writer.py 90.00% <ø> (ø)
nannyml/io/raw_files_writer.py 75.00% <ø> (ø)
nannyml/io/store/base.py 45.16% <ø> (ø)
nannyml/io/store/file_store.py 28.57% <ø> (ø)
nannyml/io/store/serializers.py 48.88% <0.00%> (ø)
... and 14 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@michael-nml michael-nml merged commit b8c49e6 into main Jun 12, 2023
6 of 7 checks passed
@michael-nml michael-nml deleted the fix/error-handling branch June 12, 2023 13:45
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.

None yet

1 participant