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

Fix isort config #647

Merged
merged 19 commits into from
Mar 21, 2024
Merged

Fix isort config #647

merged 19 commits into from
Mar 21, 2024

Conversation

vincentmr
Copy link
Contributor

@vincentmr vincentmr commented Mar 19, 2024

Before submitting

Please complete the following checklist when submitting a PR:

  • All new features must include a unit test.
    If you've fixed a bug or added code that should be tested, add a test to the
    tests directory!

  • All new functions and code must be clearly commented and documented.
    If you do make documentation changes, make sure that the docs build and
    render correctly by running make docs.

  • Ensure that the test suite passes, by running make test.

  • Add a new entry to the .github/CHANGELOG.md file, summarizing the
    change, and including a link back to the PR.

  • Ensure that code is properly formatted by running make format.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:
isort produces different results across Python version and environments.

Description of the Change:
Fix isort config and use GHA for isort and black.

Benefits:

Possible Drawbacks:

Related GitHub Issues:

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.71%. Comparing base (21cc89f) to head (6ea98c7).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #647      +/-   ##
==========================================
+ Coverage   98.41%   98.71%   +0.30%     
==========================================
  Files         173      172       -1     
  Lines       25224    24317     -907     
==========================================
- Hits        24823    24004     -819     
+ Misses        401      313      -88     

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

@vincentmr vincentmr changed the title Fix isort pyver and length Fix isort config Mar 19, 2024
@vincentmr vincentmr marked this pull request as ready for review March 19, 2024 14:55
Copy link
Contributor

@AmintorDusko AmintorDusko left a comment

Choose a reason for hiding this comment

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

Hey @vincentmr, I assume you tested it with Python 3.9 (supported by us) and observed no more changes coming from it, right? In this case, thank you very much for that. Now that we have a consistent development environment, I'm happy. I will approve, but please wait for #646 to be merged, before merging this PR.

.github/workflows/format.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Member

@maliasadi maliasadi left a comment

Choose a reason for hiding this comment

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

@vincentmr What about using these custom options in pyproject.toml so that we can reuse them in our GH action. Look at what we've done in Catalyst for an example.

Let's not use 3rd-part actions in our recipes where we can simply install these packages from PyPI ;)

@vincentmr
Copy link
Contributor Author

@vincentmr What about using these custom options in pyproject.toml so that we can reuse them in our GH action. Look at what we've done in Catalyst for an example.

Since this is only for isort at this point, I think the CLI is still doing the job.

Let's not use 3rd-part actions in our recipes where we can simply install these packages from PyPI ;)

I would agree with the exception when the action is from the package collab, as in the present case.

@vincentmr vincentmr requested a review from rashidnhm March 20, 2024 13:57
Copy link
Collaborator

@rashidnhm rashidnhm left a comment

Choose a reason for hiding this comment

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

Would it make sense to use make format-python within CI instead of the actions? One benefit of doing that is it would ensure we're running identical code across both CI and local development environments.

.github/workflows/format.yml Outdated Show resolved Hide resolved
.github/workflows/format.yml Outdated Show resolved Hide resolved
.github/workflows/format.yml Outdated Show resolved Hide resolved
@vincentmr
Copy link
Contributor Author

Would it make sense to use make format-python within CI instead of the actions? One benefit of doing that is it would ensure we're running identical code across both CI and local development environments.

Do you mean make format-python check=1?

vincentmr and others added 6 commits March 20, 2024 12:01
Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com>
@vincentmr vincentmr added the ci:build_wheels Activate wheel building. label Mar 20, 2024
@vincentmr vincentmr requested review from maliasadi and rashidnhm and removed request for multiphaseCFD March 21, 2024 13:30
Makefile Show resolved Hide resolved
@vincentmr vincentmr merged commit 1dae57c into master Mar 21, 2024
84 of 85 checks passed
@vincentmr vincentmr deleted the cifix/isort_pyver branch March 21, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:build_wheels Activate wheel building.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants