Skip to content
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

Ewm9401 force use of mantidsnapper #555

Merged
merged 8 commits into from
Feb 28, 2025

Conversation

dlcaballero16
Copy link
Collaborator

Description of work

This adds a rule to ruff that checks if mantid.simpleapi is being used where it shouldn't. MantidSnapper should be used instead going forward.

Explanation of work

The rule checks all src directories except algortihm and makes sure mantid.simpleapi is not in the import list. If it is, the error will state to use MantidSnapper instead.

To test

Dev testing

Pull the branch and run pre-commit run --all-files. You should see about 11 files that break this rule

CIS testing

None, this is for developers only.

Link to EWM item

EWM#9401

Verification

  • the author has read the EWM story and acceptance critera
  • the reviewer has read the EWM story and acceptance criteria
  • the reviewer certifies the acceptance criteria below reflect the criteria in EWM

Acceptance Criteria

This list is for ease of reference, and does not replace reading the EWM story as part of the review. Verify this list matches the EWM story before reviewing.

  • rule works and does not affect files in algorithm directory

Copy link

codecov bot commented Feb 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.10%. Comparing base (9a79625) to head (8bcb646).
Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next     #555   +/-   ##
=======================================
  Coverage   96.10%   96.10%           
=======================================
  Files          71       71           
  Lines        5466     5466           
=======================================
  Hits         5253     5253           
  Misses        213      213           

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

Copy link
Contributor

@ekapadi ekapadi left a comment

Choose a reason for hiding this comment

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

During the course of getting this PR to pass, we are very clearly seeing that the new ruff rules work correctly. I approve these changes.

@dlcaballero16 dlcaballero16 merged commit 0e59c8d into next Feb 28, 2025
8 checks passed
@dlcaballero16 dlcaballero16 deleted the ewm9401-force-use-of-mantidsnapper branch February 28, 2025 20:44
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