Skip to content

Comments

DM-53958: changes for matching on a Nodeset#47

Merged
daues merged 4 commits intomainfrom
tickets/DM-53958
Feb 6, 2026
Merged

DM-53958: changes for matching on a Nodeset#47
daues merged 4 commits intomainfrom
tickets/DM-53958

Conversation

@daues
Copy link
Contributor

@daues daues commented Feb 3, 2026

No description provided.

@codecov
Copy link

codecov bot commented Feb 3, 2026

Codecov Report

❌ Patch coverage is 16.66667% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 35.68%. Comparing base (ffcb6cb) to head (3457d5a).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
python/lsst/ctrl/execute/slurmPlugin.py 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   36.18%   35.68%   -0.50%     
==========================================
  Files          14       14              
  Lines         702      723      +21     
  Branches       66       71       +5     
==========================================
+ Hits          254      258       +4     
- Misses        439      456      +17     
  Partials        9        9              

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

Copy link

@MichelleGower MichelleGower left a comment

Choose a reason for hiding this comment

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

Some suggestions. Underscore doesn't have to be added, but strongly recommend increasing the unit testing. Merge approved.

if anodeset is None:
jobname = f"glide_{auser}"
else:
jobname = f"{anodeset}glide_{auser}"

Choose a reason for hiding this comment

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

I would have put an underscore between anodeset and "glide".

if anodeset is None:
full_constraint += " && (JobNodeset is None)"
else:
full_constraint += f" && {jnodeset}"

Choose a reason for hiding this comment

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

Since jnodeset isn't used until this line, I would either move the assignment (from line 349) to this else block or just eliminate jnodeset variable and put value directly into the full_constraint string (similar to the None above).

if anodeset is None:
jobname = f"{auser}_{shash}"
else:
jobname = f"{anodeset}{auser}_{shash}"

Choose a reason for hiding this comment

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

Similar comment about putting an underscore after anodeset

if anodeset is None:
jobname = f"glide_{auser}"
else:
jobname = f"{anodeset}glide_{auser}"

Choose a reason for hiding this comment

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

Same underscore comment.

Also wondering if could simplify all the code if anodeset gets set to empty string instead of None.

self.assertEqual(minautocpus, 15)
self.assertEqual(cpus, 12)
self.assertEqual(nodes, 64)
self.assertEqual(nodeset, "DRP")

Choose a reason for hiding this comment

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

I think making this test2 (leaving test1 as is without nodeset given but adding a check that it is None) would improve the test coverage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it makes sense to go this test2 route. In order to assign --nodeset in the test, and check it vis getNodeset at the end, the entire coding/setup that is there in test1 has to be duplicated in test2. It will be the same test with a different line or two, that can be just as easily checked within test1 itself. Even if it makes the robot print a 'better number' this is no way to spend our time/resources.

@daues daues merged commit 56af205 into main Feb 6, 2026
15 of 17 checks passed
@daues daues deleted the tickets/DM-53958 branch February 6, 2026 14:59
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.

2 participants