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

Validate all errors v2 #156

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dmartin35
Copy link
Collaborator

@Lawouach

this is similar purpose as the previous PR, to validate all experiment file syntax and report all at once. This internal is though different.

This is mode advanced refactoring, that would be useful to display more information to the user than the error string. We could output the message, the field in error, the value being validated, as well as a path/location within the object structure.

This is done internally by Validation objects that shall be created by all validation functions, to append errors with all possible arguments, and return the list of errors. An error is now a dict with defined structure.

This PR is intended to be reviewed and chosen between the other one #155, before we continue any further

still to be done, is to add the path/location of each error.

David Martin and others added 2 commits December 18, 2019 12:04
@dmartin35 dmartin35 force-pushed the validate-all-errors-v2 branch from 9123381 to 94cb7bc Compare December 27, 2019 10:30
…t (to provide more feedback rather than simple msg)

Signed-off-by: David Martin <[email protected]>
@dmartin35 dmartin35 force-pushed the validate-all-errors-v2 branch from 94cb7bc to bd14964 Compare December 27, 2019 11:21
@codecov-io
Copy link

codecov-io commented Dec 27, 2019

Codecov Report

Merging #156 into master will increase coverage by 0.53%.
The diff coverage is 85.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
+ Coverage   86.41%   86.95%   +0.53%     
==========================================
  Files          23       24       +1     
  Lines        1627     1717      +90     
==========================================
+ Hits         1406     1493      +87     
- Misses        221      224       +3
Impacted Files Coverage Δ
chaoslib/provider/process.py 92.3% <100%> (+0.81%) ⬆️
chaoslib/exceptions.py 100% <100%> (ø) ⬆️
chaoslib/control/python.py 87.64% <100%> (+0.43%) ⬆️
chaoslib/extension.py 85.45% <100%> (+1.14%) ⬆️
chaoslib/validation.py 100% <100%> (ø)
chaoslib/types.py 100% <100%> (ø) ⬆️
chaoslib/control/__init__.py 86.88% <41.66%> (-0.27%) ⬇️
chaoslib/activity.py 88.73% <71.42%> (+1.14%) ⬆️
chaoslib/hypothesis.py 88.73% <81.39%> (+0.29%) ⬆️
chaoslib/experiment.py 91.09% <84%> (-0.62%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44c3bf7...bd14964. Read the comment docs.

@Lawouach Lawouach added the viewed Issue has been viewed but not agreed upon yet label Apr 9, 2020
@Lawouach Lawouach marked this pull request as draft July 6, 2020 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
viewed Issue has been viewed but not agreed upon yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants