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
DM-42446: Implement minor fixes and improvements to Python syntax #40
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #40 +/- ##
=======================================
Coverage 93.35% 93.36%
=======================================
Files 20 20
Lines 2092 2110 +18
Branches 420 425 +5
=======================================
+ Hits 1953 1970 +17
- Misses 80 81 +1
Partials 59 59 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, one minor comment.
tests/test_cli.py
Outdated
cli, ["validate", "--require-description", TEST_YAML], catch_exceptions=False | ||
) | ||
except Exception as e: | ||
print(e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, you probably want to rethrow the exception here, so that test fails. Schema.require_description(False)
should go into finally
then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. I've made the change as you suggested.
This make changes suggested in review comments here: #31 (review) The PR was closed and merged before the review occurred, so this is being done on a separate branch.
This adds some tests for checking descriptions when the require_description flag is on for the default model.
ddb8412
to
5f0c332
Compare
This make changes suggested in review comments here. The original PR was closed and merged before the second review occurred, so this is being done on a separate branch. All comments on the original PR should be resolved.
I made an additional change which was adding
from __future__ import annotations
to all of the Python files where it was missing.I also added a few more simple tests in
test_datamodel.py
that check for various errors on the description field when therequire_description
flag is turned on.