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

DM-42446: Implement minor fixes and improvements to Python syntax #40

Merged
merged 2 commits into from Feb 15, 2024

Conversation

JeremyMcCormick
Copy link
Collaborator

@JeremyMcCormick JeremyMcCormick commented Feb 15, 2024

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 the require_description flag is turned on.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (12de453) 93.35% compared to head (5f0c332) 93.36%.

Files Patch % Lines
tests/test_cli.py 40.00% 2 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@andy-slac andy-slac left a 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.

cli, ["validate", "--require-description", TEST_YAML], catch_exceptions=False
)
except Exception as e:
print(e)
Copy link
Contributor

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.

Copy link
Collaborator Author

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.
@JeremyMcCormick JeremyMcCormick merged commit 32cef69 into main Feb 15, 2024
9 of 10 checks passed
@JeremyMcCormick JeremyMcCormick deleted the tickets/DM-42446-andys-review branch February 15, 2024 21:37
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

2 participants