Skip to content

Move project configuration to pyproject.toml#26

Open
maarten-ic wants to merge 2 commits intodevelopfrom
feature/pyproject-toml
Open

Move project configuration to pyproject.toml#26
maarten-ic wants to merge 2 commits intodevelopfrom
feature/pyproject-toml

Conversation

@maarten-ic
Copy link
Copy Markdown
Collaborator

  • Migrate configuration from setup.py, setup.cfg and .coveragerc to pyproject.toml
  • Replace flake8 with ruff (with E and F lints enabled)

- Migrate configuration from setup.py, setup.cfg and .coveragerc to pyproject.toml
- Replace flake8 with ruff (with E and F lints enabled)
@maarten-ic
Copy link
Copy Markdown
Collaborator Author

Notes:

  1. Using ruff for autoformatting and enabling additional rules is left for a future PR
  2. We could put the tox.ini settings inside the pyproject.toml as well. I've left them separate for now, as it may be more convenient to have these test configurations in a separate file? Let me know if you think it's better to put the tox config in pyproject.toml.

Copy link
Copy Markdown
Contributor

@LourensVeen LourensVeen left a comment

Choose a reason for hiding this comment

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

Nice! I have one discussion point.

Comment thread tox.ini
types-PyYAML

commands =
ruff check
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I had flake8 at the end because when I'm debugging, I often comment things out in not quite the right way or end up with an overly long line with a debug print statement, and it's quite annoying if the tests then don't run because tox already quits on the linting step.

I guess that doesn't happen if you run an autoformatter in your editor, but is there a reason to put it first?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

My reasoning was: ruff is the fastest of the three, so putting it first will give feedback sooner (and waste less time and resources on the more expensive tests).

Though I don't mind putting it at the end if that helps your workflow :)

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.

3 participants