-
Notifications
You must be signed in to change notification settings - Fork 11
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
Original filenames methods #216
Original filenames methods #216
Conversation
Codecov Report
@@ Coverage Diff @@
## master #216 +/- ##
==========================================
+ Coverage 87.55% 87.64% +0.09%
==========================================
Files 122 123 +1
Lines 12470 12608 +138
==========================================
+ Hits 10917 11049 +132
- Misses 1553 1559 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
OK - finished adding the bits I realised were missing! |
cfdm/data/data.py
Outdated
|
||
define: (sequence of) `str`, optional | ||
Set these original file names, removing any already | ||
stored. |
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.
Something to indicate explicitly that only one of the three keyword parameters can/should be set, i.e. not any two or all three, might be useful, even if it should be clear enough from the descriptions.
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.
I'm happy leaving this to be trapped in the code:
raise ValueError(
"Can't set the 'define' and 'update' parameters "
"at the same time"
raise ValueError(
"Can't set the 'clear' parameter with either of the "
"'define' and 'update' parameters"
)
Is that OK with you? Happy to doc it if you prefer.
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.
I'm inclined to say I think it should also be documented, even if that is to very concisely indicate as such, but it's your call!
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.
OK - will do. I'll hold off implementing it until we're agreed on where we stand on NCAS-CMS/cf-python#448 (comment)
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.
(To finalise the review started last week, with inline comments as raised above.)
Overall, I agree with the approach proposed in #215 to deal with the underlying deficiencies discussed in NCAS-CMS/cf-python#365, as applied here. It seems like a sensible way to deal with the issue at hand. However, I did have some questions regarding the approach so please see NCAS-CMS/cf-python#448 (comment).
As for the implementation, there are quite a few minor docs issues e.g. typos, as raised (and expected given the nature of the various new methods added and adaptations to the rest of the code required!), but otherwise it is sound (assuming the question referenced above is addressed), with an especially good job on the new tests which are nice and rigorous.
Please merge when ready. Thanks.
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Change of tackFollowing a discussion with @sadielbartholomew on question raised at NCAS-CMS/cf-python#448, the code has been refactored such that:
Ready for a new review! |
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.
The changelog needs updating on account of the new approach in #216 (comment) as raised inline, but overall the new commits adapt the PR to implement that precise approach, and do so in a very elegant manner (nice use of a new mixin class)! 💯 Thanks and please merge when ready.
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Co-authored-by: Sadie L. Bartholomew <[email protected]>
Fixes #215