Skip to content

Conversation

@kyungeonchoi
Copy link
Contributor

  • Sample option NFiles is properly propagated for RucioDID but not for Rucio dataset defined via Dataset. e.g. Dataset: servicex.dataset.Rucio("mc20_13TeV:EXAMPLE_DID")
  • This PR fixes this and includes a test

@kyungeonchoi kyungeonchoi requested a review from ponyisi August 21, 2024 14:42
@codecov
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.62%. Comparing base (9853def) to head (e851123).
Report is 6 commits behind head on 3.0_develop.

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              
Flag Coverage Δ
unittests 80.62% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

def dataset_identifier(self) -> DataSetIdentifier:
if self.Dataset:
return self.Dataset
if isinstance(self.Dataset, RucioDatasetIdentifier):
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BenGalewsky - Better now? :)

@BenGalewsky BenGalewsky self-requested a review August 22, 2024 02:44
def dataset_identifier(self) -> DataSetIdentifier:
if self.Dataset:
if self.NFiles:
self.Dataset.num_files = self.NFiles
Copy link
Contributor

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

@kyungeonchoi kyungeonchoi merged commit 8d44977 into 3.0_develop Aug 22, 2024
@kyungeonchoi kyungeonchoi deleted the fix_nfiles_for_dataset branch August 22, 2024 04:03
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.

3 participants