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

chore: modernize ruff config #935

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

afuetterer
Copy link
Member

@afuetterer afuetterer commented Mar 7, 2024

Description

The ruff project deprecated sections under [tool.ruff]. You need to have e.g. [tool.ruff.lint].

See: https://docs.astral.sh/ruff/configuration/

  • fix ruff issues

Types of Changes

  • Build related changes

Checklist

  • I have read the contributor guide.
  • My code follows the code style of this project.
  • All new and existing tests passed.

@afuetterer afuetterer added type:maintenance dependencies Pull requests that update a dependency file pre-commit labels Mar 7, 2024
@MyPyDavid
Copy link
Member

nice, thanks @afuetterer! Should we not make a ruff.toml ?? think it would be cool ;)

@afuetterer

This comment was marked as resolved.

@afuetterer

This comment was marked as resolved.

@jochenklar
Copy link
Member

No please put everything in pyproject.toml if that works.

@afuetterer

This comment was marked as resolved.

@MyPyDavid
Copy link
Member

the more .toml the merrier 😄

@afuetterer

This comment was marked as resolved.

@jochenklar
Copy link
Member

The idea of the pyproject.toml is that you can put almost everything in it and not clutter your repo's root with files. sadly it does not work for everything.

@afuetterer
Copy link
Member Author

Thanks for fixing the ruff issues @MyPyDavid

@MyPyDavid
Copy link
Member

MyPyDavid commented Mar 8, 2024

rebased on dependency-updates

@MyPyDavid
Copy link
Member

MyPyDavid commented Mar 8, 2024

still open

=========================== short test summary info ============================
FAILED rdmo/core/tests/test_project_status.py::test_package_json_and_pre_commit_versions_match - AssertionError: assert {'eslint': '8...ct': '18.2.0'} == {'eslint': '8...ct': '18.2.0'}
  
  Omitting 2 identical items, use -vv to show
  Differing items:
  {'eslint-plugin-react': '7.34.0'} != {'eslint-plugin-react': '7.33.2'}
  
  Full diff:
    {
        'eslint': '8.54.0',
  -     'eslint-plugin-react': '7.33.2',
  ?                                ^ ^
  +     'eslint-plugin-react': '7.34.0',
  ?                                ^ ^
        'react': '18.2.0',
    }
========== 1 failed, 23472 passed, 179 warnings in 1268.59s (0:21:08) ===================================== short test summary info ============================
FAILED rdmo/core/tests/test_project_status.py::test_package_json_and_pre_commit_versions_match - AssertionError: assert {'eslint': '8...ct': '18.2.0'} == {'eslint': '8...ct': '18.2.0'}
  
  Omitting 2 identical items, use -vv to show
  Differing items:
  {'eslint-plugin-react': '7.34.0'} != {'eslint-plugin-react': '7.33.2'}
  
  Full diff:
    {
        'eslint': '8.54.0',
  -     'eslint-plugin-react': '7.33.2',
  ?                                ^ ^
  +     'eslint-plugin-react': '7.34.0',
  ?                                ^ ^
        'react': '18.2.0',
    }
========== 1 failed, 23472 passed, 179 warnings in 1268.59s (0:21:08) ==========

Is there a way to get and post the test summary somewhere else via the github action? (for when it fails)

@afuetterer
Copy link
Member Author

What do you mean?
Have the result of this test as an github action output?
Is this test significant enough for that?

@MyPyDavid
Copy link
Member

No, I mean the failed test summary in general. Could it be posted in the actions summary for example (as a convenience)?

This rdmo/core/tests/test_project_status.py::test_package_json_and_pre_commit_versions_match is more like a build test right? Think it could be ran and failed first in the pytest order, but it is not for in this PR.
The name test_project_status is maybe a bit confusing because it overlaps with the rdmo.projects, I think build or package _status would fit better.

@afuetterer
Copy link
Member Author

afuetterer commented Mar 11, 2024

Sure, that is possible. Naming was done hacky as well, feel free to rename.

Can you open an issue about that?

If this PR is done, lets merge it into dependency-updates and deal with the other issue seperately.

Copy link
Member

@MyPyDavid MyPyDavid left a comment

Choose a reason for hiding this comment

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

yes

@MyPyDavid MyPyDavid merged commit 8ab03a2 into rdmorganiser:dependency-updates Mar 11, 2024
17 checks passed
@afuetterer afuetterer deleted the ruff branch March 12, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file pre-commit type:maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants