-
Notifications
You must be signed in to change notification settings - Fork 37
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
Ensemble.files refactor #746
base: smartsim-refactor
Are you sure you want to change the base?
Ensemble.files refactor #746
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## smartsim-refactor #746 +/- ##
=====================================================
+ Coverage 40.45% 47.79% +7.33%
=====================================================
Files 110 109 -1
Lines 7326 6576 -750
=====================================================
+ Hits 2964 3143 +179
+ Misses 4362 3433 -929
|
Question for @juliaputko ! In application.py you placed the TODO about 2 months ago in the remove dead attrs in application PR, is this safe to remove now?
|
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.
lookin great! You can also add a '''match="error message"''' to pytest to make sure you are failing on the right valueerror/type error that you are expecting. Up to you!
:param tag: Tag to use for find and replacement | ||
""" | ||
self.operations.append( | ||
EnsembleConfigureOperation(src, file_parameters, dest, tag) |
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.
can we change the order of these so that it matches the configure method?
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.
also I dont know if file_parameters is the best name for what is going in? This is a mapping of the items that need to be found and replaced right?
@@ -424,8 +431,8 @@ def build_jobs(self, settings: LaunchSettings) -> tuple[Job, ...]: | |||
:raises TypeError: if the ids argument is not type LaunchSettings | |||
:raises ValueError: if the LaunchSettings provided are empty | |||
""" | |||
if not isinstance(settings, LaunchSettings): | |||
raise TypeError("ids argument was not of type LaunchSettings") | |||
# if not isinstance(settings, LaunchSettings): |
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.
remove commented lines?
|
||
pytestmark = pytest.mark.group_a | ||
|
||
# TODO missing test for _filter |
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.
address todo?
Attaching files to an Application and Ensemble has been refactored.
There is now two operations files, an operations.py file that holds the tools to attach files to an Application and an ensemble_operations.py file that holds the tools to attach files to an Ensemble. These two operation files are covered in individual test files: test_operations.py and test_ensemble_operations.py.
Additionally, building the file operation commands in the Generator has been refactored to support the removal of EntityFiles and replacement of the operations.FileSysOpSet. Tests for generator.py have been updated in test_generator.py.
Additionally, the function Ensemble._create_applications has been reworked to support the new Ensemble.files type.
Files to investigate:
smartsim/generation/operations/ensemble_operations.py
smartsim/generation/operations/operations.py
smartsim/generation/operations/utils/helpers.py
smartsim/builders/ensemble.py
smartsim/entity/application.py