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

Refactor/replace black flake8 with ruff #359

Merged
merged 8 commits into from
Dec 20, 2024

Conversation

sean-sinclair
Copy link
Contributor

Issue

#358

Short description

  • Enable Linting and formatting
  • Perform Linting and formatting
  • Create workflow for linting and formatting
  • Set up pre-commit with hooks

Pre-review checklist

  • Read through all changes. No redundant print() statements, commented-out code, or other remnants from the development. 👀
  • Make sure tests pass after every commit. ✅
  • New/refactored code is following same conventions as the rest of the code base. 🧬
  • New/refactored code is tested. ⚙
  • Documentation has been updated 🧾

Pre-merge checklist

  • Commit history is consistent and clean. 👌

@sean-sinclair sean-sinclair linked an issue Dec 17, 2024 that may be closed by this pull request
1 task
Not sure if this solves the error, I have renamed the file locally, but
for some reason it doesn't propagate to GH
@@ -255,16 +255,16 @@ the ``has`` filter to find cases that have ``4d-seismic`` data:

.. code-block:: python

from fmu.sumo.explorer import Explorer, Filters
from fmu.sumo.explorer import Explorer, filters
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is Filters changed to filters here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess the convention is lowercase filenames? Which Filters.py is breaking.

Should Filters.py be renamed to filters.py as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops. I thought I had renamed the file to filters.py.

rwiker
rwiker previously approved these changes Dec 17, 2024
Copy link
Contributor

@rwiker rwiker left a comment

Choose a reason for hiding this comment

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

LGTM, but the change from Filters to filters in docs/explorer.rst are wrong, and should be reverted.

@sean-sinclair
Copy link
Contributor Author

LGTM, but the change from Filters to filters in docs/explorer.rst are wrong, and should be reverted.

pep-8 recommends the use of snake_case for module names.

Since the naming of all the other files in the same folder is using snake_case I'll maintain that convention by renaming the file to filters.py

Copy link
Contributor

@equinor-ruaj equinor-ruaj left a comment

Choose a reason for hiding this comment

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

👍

@sean-sinclair sean-sinclair merged commit 578d7d9 into main Dec 20, 2024
18 checks passed
@sean-sinclair sean-sinclair deleted the refactor/replace-black-flake8-with-ruff branch December 20, 2024 11:30
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.

Enable Ruff - fmu-sumo
3 participants