Skip to content

Commit ec52111

Browse files
build(pyproject): separate build from test in project.optional-dependencies
1 parent 6164d5b commit ec52111

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.github/CONTRIBUTING.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- [Install](#install)
88
- [Develop](#develop)
99
- [Test](#test)
10+
- [Lint](#lint)
1011
- [Build](#build)
1112
- [Release](#release)
1213

@@ -50,6 +51,7 @@ source .venv/bin/activate
5051
Install the dependencies:
5152

5253
```sh
54+
pip install -e '.[build]'
5355
pip install -e '.[test]'
5456
```
5557

@@ -90,12 +92,38 @@ Things that will improve the chance that your pull request will be accepted:
9092

9193
## Test
9294

93-
Run tests:
95+
Run the tests:
9496

9597
```sh
9698
pytest
9799
```
98100

101+
## Lint
102+
103+
Update pre-commit hooks to the latest version:
104+
105+
```sh
106+
pre-commit autoupdate
107+
```
108+
109+
Run all pre-commit hooks:
110+
111+
```sh
112+
pre-commit run --all-files
113+
```
114+
115+
Lint all files in the current directory:
116+
117+
```sh
118+
ruff check
119+
```
120+
121+
Format all files in the current directory:
122+
123+
```sh
124+
ruff format
125+
```
126+
99127
## Build
100128

101129
Generate distribution packages:

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,16 @@ dynamic = ["version"]
1616
dependencies = []
1717

1818
[project.optional-dependencies]
19+
build = [
20+
"build==1.2.2.post1",
21+
"twine==6.1.0",
22+
]
1923
test = [
2024
"black==25.1.0",
21-
"build==1.2.2.post1",
2225
"isort==6.0.1",
2326
"pre-commit==4.2.0",
2427
"pytest==8.3.5",
2528
"ruff==0.11.2",
26-
"twine==6.1.0",
2729
]
2830

2931
[project.urls]

0 commit comments

Comments
 (0)