-
Notifications
You must be signed in to change notification settings - Fork 13
Fix Sample option NFiles for Dataset
#425
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.0_develop #425 +/- ##
===============================================
+ Coverage 80.59% 80.62% +0.02%
===============================================
Files 26 26
Lines 1340 1342 +2
===============================================
+ Hits 1080 1082 +2
Misses 260 260
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
servicex/databinder_models.py
Outdated
| def dataset_identifier(self) -> DataSetIdentifier: | ||
| if self.Dataset: | ||
| return self.Dataset | ||
| if isinstance(self.Dataset, RucioDatasetIdentifier): |
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.
isinstance is usually a code smell? Can this be done with inheritance?
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.
@BenGalewsky - Better now? :)
| def dataset_identifier(self) -> DataSetIdentifier: | ||
| if self.Dataset: | ||
| if self.NFiles: | ||
| self.Dataset.num_files = self.NFiles |
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 cleaned up some redundant code. Looks good to me
NFilesis properly propagated forRucioDIDbut not for Rucio dataset defined viaDataset. e.g.Dataset: servicex.dataset.Rucio("mc20_13TeV:EXAMPLE_DID")