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

Switch to Ruff #115

Merged
merged 10 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "weekly"
day: "friday"

- package-ecosystem: pip
directory: "/"
schedule:
interval: "weekly"
day: "friday"
ignore:
- dependency-name: ruff
update-types:
# Cut the frequency of linter Dependabot PRs.
# Ruff is 0ver, so this ignores all non-"major" releases.
- "version-update:semver-patch"

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Once the final version is made, it will become:

.. |pypi| image:: http://img.shields.io/pypi/v/incremental.svg
:alt: PyPI
:target: https://pypi.python.org/pypi/incremental
:target: https://pypi.org/project/incremental/

.. |calver| image:: https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg
:alt: calver: YY.MM.MICRO
Expand Down
14 changes: 11 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ backend-path = [".", "./src"] # See _build_meta.py
build-backend = "_build_meta:build_meta"

[project]
name = "incremental"
name = "Incremental"
dynamic = ["version"]
maintainers = [
{name = "Amber Brown", email = "[email protected]"},
Expand Down Expand Up @@ -60,8 +60,16 @@ version = {attr = "incremental._setuptools_version"}

[tool.incremental]

[tool.black]
target-version = ['py36', 'py37', 'py38']
[tool.ruff.lint]
select = [
"E",
"F",
"UP",
"I",
]
ignore = [
"E501",
]

[tool.towncrier]
filename = "NEWS.rst"
Expand Down
1 change: 1 addition & 0 deletions requirements_lint.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruff
8 changes: 8 additions & 0 deletions requirements_lint.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#
Copy link
Member

Choose a reason for hiding this comment

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

just asking.
Why do we need this ?

Why not define this dependency as an extra for dev via [options.extras_require]?

pip install -e .[dev]

I expect that anyone that will do dev work on this repo, will need to install ruff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The pinned .txt is what Dependabot updates.

I'm generally not a fan of defining a dev extra because I don't think that this sort of tooling should be part of the public contract that pyproject.toml expresses.

Copy link
Member

Choose a reason for hiding this comment

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

ok. No problem.

I was expencting dependbot to handle pyproject.toml https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#pip-and-pip-compile

pip and pip-compile

In addition to supporting updates to requirements.txt files, Dependabot supports updates to pyproject.toml files if they follow the PEP 621 standard.

# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements_lint.txt requirements_lint.in
#
ruff==0.6.4
# via -r requirements_lint.in
4 changes: 0 additions & 4 deletions setup.cfg

This file was deleted.

Loading