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

Add Custom Errors #384

Merged
merged 21 commits into from
Sep 15, 2022
Merged

Add Custom Errors #384

merged 21 commits into from
Sep 15, 2022

Conversation

PythonFZ
Copy link
Member

@PythonFZ PythonFZ commented Sep 14, 2022

  • Add two new Exceptions which will be raised when trying to access data, which is not available or if the graph does not exist.

    class DataNotAvailableError(asyncio.InvalidStateError):
    """Access Data that is not available
    Trying to access e.g. zn.outs that are not computed yet will raise this error
    """
    class GraphNotAvailableError(Exception):
    """DVC Graph is not written yet
    Trying to access graph features such as zn.params or dvc.outs which are not available
    """

  • Use dvc stage add followed by dvc repro instead of dvc run

  • Update __repr__ to be more descriptive

  • Add Tests and fix Test normal class behaviour #386

  • Some smaller bugfix that came up when adding the errors.

@PythonFZ PythonFZ linked an issue Sep 14, 2022 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Sep 14, 2022

Codecov Report

Merging #384 (73e8755) into main (9ae3161) will decrease coverage by 0.17%.
The diff coverage is 96.96%.

@@            Coverage Diff             @@
##             main     #384      +/-   ##
==========================================
- Coverage   96.74%   96.57%   -0.18%     
==========================================
  Files          34       34              
  Lines        1506     1546      +40     
  Branches      631      650      +19     
==========================================
+ Hits         1457     1493      +36     
- Misses         49       53       +4     
Flag Coverage Δ
fulltest 96.18% <96.96%> (-0.17%) ⬇️
unittests 72.04% <57.81%> (-0.40%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
zntrack/zn/plots.py 100.00% <ø> (ø)
zntrack/core/dvcgraph.py 96.69% <90.90%> (-0.76%) ⬇️
zntrack/__init__.py 100.00% <100.00%> (ø)
zntrack/core/base.py 99.20% <100.00%> (+0.03%) ⬆️
zntrack/core/functions/decorator.py 96.96% <100.00%> (+0.06%) ⬆️
zntrack/core/zntrackoption.py 93.97% <100.00%> (-1.80%) ⬇️
zntrack/utils/config.py 100.00% <100.00%> (ø)
zntrack/utils/exceptions.py 100.00% <100.00%> (ø)
zntrack/utils/file_io.py 100.00% <100.00%> (ø)
zntrack/utils/utils.py 91.81% <100.00%> (ø)
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@PythonFZ PythonFZ linked an issue Sep 15, 2022 that may be closed by this pull request
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.

Test normal class behaviour Custom Errors
1 participant