Skip to content

Commit 40aa7f8

Browse files
committed
Use project.optional-dependencies to manage optional dependencies instead of requirements-dev.txt.
1 parent af67584 commit 40aa7f8

File tree

4 files changed

+28
-43
lines changed

4 files changed

+28
-43
lines changed

.rubisco/lint.yaml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,10 @@ steps:
88
recursive: True
99

1010
- name: 🛠️ Analysing the code with ruff
11-
run:
12-
[
13-
python,
14-
-m,
15-
ruff,
16-
check,
17-
rubisco,
18-
--config,
19-
ruff.toml,
20-
--select=ALL,
21-
--ignore=D203,
22-
--ignore=D213,
23-
]
11+
run: ruff check rubisco --config ruff.toml
2412

2513
- name: 🛠️ Analysing the code with pylint
26-
run: [python, -m, pylint, -j, "${{ nproc }}", "${{ src-files }}"]
14+
run: [pylint, -j, "${{ nproc }}", "${{ src-files }}"]
2715

2816
- name: 🛠️ Running type check
29-
run:
30-
python -m pyright --verbose --threads ${{ nproc }} --level=warning rubisco
17+
run: pyright --verbose --threads ${{ nproc }} --level=warning rubisco

pyproject.toml

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
[build-system]
2-
3-
requires = ["hatchling"]
4-
52
build-backend = "hatchling.build"
3+
requires = ["hatchling"]
64

75
[project]
8-
9-
name = "rubisco"
10-
version = "0.1.0.post"
116
authors = [{name = "ChenPi11", email = "[email protected]"}]
12-
description = "C+++ Repository Utilities."
13-
readme = "README.md"
14-
license = {file = "LICENSE"}
15-
requires-python = ">=3.11"
167
classifiers = [
178
"Programming Language :: Python :: 3",
189
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
1910
"Operating System :: OS Independent",
2011
]
21-
2212
dependencies = [
2313
"aiohttp >= 3.5.4",
2414
"beartype >= 0.20.1",
@@ -34,17 +24,35 @@ dependencies = [
3424
"pygments >= 2.10.0",
3525
"prompt_toolkit >= 3.0.23",
3626
]
27+
description = "C+++ Repository Utilities."
28+
license = {file = "LICENSE"}
29+
name = "rubisco"
30+
readme = "README.md"
31+
requires-python = ">=3.11"
32+
version = "0.1.0.post"
3733

3834
[project.urls]
39-
4035
"Homepage" = "https://github.com/cppp-project/rubisco"
4136

4237
# Include files.
4338
[tool.hatch.build.targets.sdist]
44-
45-
exclude = [".github"]
39+
exclude = [".github", "action.yml"]
4640

4741
[project.scripts]
48-
4942
ru = "rubisco.cli.main.main:main"
5043
rubisco = "rubisco.cli.main.main:main"
44+
45+
[project.optional-dependencies]
46+
# Don't use `uv add --dev`, use `uv add --optional dev instead`.
47+
dev = [
48+
"build>=1.2.2.post1",
49+
"hatchling>=1.27.0",
50+
"ipython>=9.4.0",
51+
"nuitka>=2.7.12",
52+
"pylint>=3.3.7",
53+
"pyright>=1.1.403",
54+
"pytest>=8.4.1",
55+
]
56+
ruff = [
57+
"ruff>=0.12.3",
58+
]

requirements-dev.txt

Lines changed: 0 additions & 10 deletions
This file was deleted.

ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ target-version = "py311"
4040
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
4141
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
4242
# McCabe complexity (`C901`) by default.
43-
select = ["E4", "E7", "E9", "F"]
44-
ignore = []
43+
select = ["ALL"]
44+
ignore = ["D203", "D213"]
4545

4646
# Allow fix for all enabled rules (when `--fix`) is provided.
4747
fixable = ["ALL"]

0 commit comments

Comments
 (0)