Skip to content

Conversation

robertapplin
Copy link
Contributor

@robertapplin robertapplin commented Sep 23, 2024

Description of work

This PR is a first step towards enabling the check for wild imports in the pre-commit ruff configuration. This PR is only the first step, and future PRs will be opened to remove wild imports elsewhere. The wild-import check will then be enabled in the pyproject.toml by removing F403.

This is ready for review.

To test:

Code review - check that all imports look correct.

Run ruff locally on all files using the following terminal command

pre-commit run ruff --all-files

Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

@robertapplin robertapplin added the ISIS: Core Issue and pull requests at ISIS that relate to Core features and functions label Sep 23, 2024
@robertapplin robertapplin force-pushed the 0-wild-imports branch 7 times, most recently from b6e64a2 to c5c5372 Compare October 1, 2024 16:07
@robertapplin robertapplin added this to the Release 6.12 milestone Oct 1, 2024
@robertapplin robertapplin added the Maintenance Unassigned issues to be addressed in the next maintenance period. label Oct 1, 2024
@robertapplin robertapplin force-pushed the 0-wild-imports branch 4 times, most recently from 1c0cf72 to 00a40aa Compare October 2, 2024 15:16
@robertapplin robertapplin marked this pull request as ready for review October 2, 2024 15:17
@robertapplin robertapplin force-pushed the 0-wild-imports branch 2 times, most recently from e0dcecb to f09fc8e Compare October 10, 2024 15:38
Copy link
Contributor

@jhaigh0 jhaigh0 left a comment

Choose a reason for hiding this comment

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

Confused why I'm not seeing the changes to the pyproject from this commit 944c561 when looking at the Files Changed tab.

@robertapplin
Copy link
Contributor Author

Confused why I'm not seeing the changes to the pyproject from this commit 944c561 when looking at the Files Changed tab.

I've decided to do this ruff wild import conversion in two parts to reduce the size of the PR. For now there are still many wild import warnings in Mantid, so I have not made changes to the pyproject.toml until the next PR which I hope will finish off all wild import changes

@robertapplin robertapplin requested a review from jhaigh0 October 11, 2024 15:05
Copy link
Contributor

@jhaigh0 jhaigh0 left a comment

Choose a reason for hiding this comment

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

Looking good now

$ pre-commit run ruff --all-files
ruff.....................................................................Passed

@SilkeSchomann SilkeSchomann self-assigned this Oct 11, 2024
@thomashampson thomashampson merged commit 86aeb2f into main Oct 11, 2024
10 checks passed
@thomashampson thomashampson deleted the 0-wild-imports branch October 11, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ISIS: Core Issue and pull requests at ISIS that relate to Core features and functions Maintenance Unassigned issues to be addressed in the next maintenance period.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants