You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+25-56Lines changed: 25 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ We value community input and look forward to opening up for contributions once w
6
6
7
7
## Setup environment
8
8
9
-
We use [Poetry](https://python-poetry.org) for dependency management and [Nox](https://nox.thea.codes/) for task automation. Please follow the instructions to install `poetry` on your system: https://python-poetry.org/docs/#installing-with-pipx. We recommend to install poetry using `pipx`.
9
+
We use [Poetry](https://python-poetry.org) for dependency management and task execution. Please follow the instructions to install `poetry` on your system: https://python-poetry.org/docs/#installing-with-pipx. We recommend to install poetry using `pipx`.
10
10
11
11
For notebook execution in tutorials, we also support [Pixi](https://pixi.sh/) environments for isolated execution per tutorial directory.
12
12
@@ -139,13 +139,6 @@ We use `pytest` for running our automated tests. You can run tests in several wa
139
139
poetry run pytest
140
140
```
141
141
142
-
### Using Nox (recommended):
143
-
```bash
144
-
nox -s tests
145
-
```
146
-
147
-
The nox approach is recommended as it creates an isolated environment and ensures consistent testing across different setups. Nox is our primary task runner that provides standardized environments for testing, linting, formatting, and documentation building.
148
-
149
142
This command will run all test files in your project that follow the `test_*.py` naming convention, as recognized by `pytest`.
We use [Nox](https://nox.thea.codes/) to standardize testing, linting, and documentation building across different environments. Nox provides isolated virtual environments for running different tasks and supports multiple Python versions.
168
-
169
-
### Available Nox Sessions
170
-
171
-
-**Testing**: Run unit tests across supported Python versions (3.10, 3.11, 3.12)
172
-
```bash
173
-
nox -s tests # Uses your current Python version
174
-
# Or specify a version if you have multiple:
175
-
nox -s "tests-3.10"# Python 3.10
176
-
nox -s "tests-3.11"# Python 3.11
177
-
nox -s "tests-3.12"# Python 3.12
178
-
```
179
-
180
-
-**Linting**: Check code style and quality with ruff
181
-
```bash
182
-
nox -s lint
183
-
```
184
-
185
-
-**Formatting**: Auto-fix code formatting issues
186
-
```bash
187
-
nox -s format
188
-
```
189
-
190
-
-**Type Checking**: Run static type analysis with pyrefly
191
-
```bash
192
-
nox -s typing
193
-
```
194
-
195
-
-**Documentation**: Build HTML documentation
196
-
```bash
197
-
nox -s docs
198
-
```
158
+
## Code Quality and Testing
199
159
160
+
### Linting
161
+
```bash
162
+
poetry run ruff check corneto --exclude tests
163
+
```
200
164
201
-
### Running All Quality Checks
165
+
### Formatting
166
+
```bash
167
+
poetry run ruff check corneto --exclude tests --fix
168
+
poetry run ruff format corneto --exclude tests
169
+
```
202
170
203
-
To run all quality checks (linting, formatting, typing, and tests) at once:
171
+
### Type Checking
204
172
```bash
205
-
nox -s lint format typing tests
173
+
poetry run pyrefly check corneto
206
174
```
207
175
208
176
## Generating the documentation
@@ -211,51 +179,52 @@ This project uses Sphinx along with the PyData Sphinx theme to generate HTML doc
211
179
212
180
### Documentation for the current version
213
181
214
-
To generate the HTML documentation for the current version of the project using nox:
182
+
To generate the HTML documentation for the current version of the project using pixi:
215
183
216
184
```bash
217
-
nox -s docs
185
+
pixi run docs
218
186
```
219
187
220
188
This command will build the documentation in the `docs/_build/html` directory, which you can open in a browser to view.
221
189
222
190
### Additional Documentation Options
223
191
224
-
We provide several nox sessions for different documentation needs:
192
+
We provide several pixi tasks for different documentation needs:
225
193
226
194
-**Clean build**: Remove previous builds and rebuild documentation
227
195
```bash
228
-
nox -s docs_clean
196
+
pixi run docs-force
229
197
```
230
198
231
199
-**Force notebook execution**: Build docs with forced notebook execution
232
200
```bash
233
-
nox -s docs_force
201
+
pixi run docs-force
234
202
```
235
203
236
204
-**Strict mode**: Build docs treating warnings as errors
237
205
```bash
238
-
nox -s docs_werror
206
+
pixi run python -m sphinx-build -b html -W docs docs/_build/html
239
207
```
240
208
241
209
-**Complete build**: Clean, force notebook execution, and build with warnings as errors
242
210
```bash
243
-
nox -s docs_all
211
+
pixi run docs-force
212
+
pixi run python -m sphinx-build -b html -W docs docs/_build/html
244
213
```
245
214
246
215
-**Link checking**: Verify all external links in documentation
247
216
```bash
248
-
nox -s docs_linkcheck
217
+
pixi run python -m sphinx-build -b linkcheck docs docs/_build/linkcheck
249
218
```
250
219
251
220
-**Serve locally**: Build and serve documentation at http://localhost:8000
252
221
```bash
253
-
nox -s docs_serve
222
+
pixi run docs-serve
254
223
```
255
224
256
225
-**Full local check**: Build HTML documentation
257
226
```bash
258
-
nox -s docs_full
227
+
pixi run docs
259
228
```
260
229
261
230
### Notebook Execution with Pixi
@@ -269,7 +238,7 @@ poetry run python docs/tutorials/run_notebooks.py
269
238
270
239
### Additional notes
271
240
272
-
-**Task automation**: All documentation, testing, and quality assurance tasks are standardized through nox sessions defined in `noxfile.py`.
241
+
-**Task automation**: Testing and code quality are run via poetry commands; documentation tasks use pixi tasks defined in `pixi.toml`.
273
242
-**`myst-nb`**: We use `myst-nb` to handle the conversion of Jupyter notebooks (`.ipynb` files) into HTML. If your contribution involves notebooks, make sure they render correctly in the generated documentation.
274
243
-**Pixi integration**: Tutorial notebooks can use individual `pixi.toml` files for isolated execution environments with specific dependencies.
275
244
-**Poetry and PEP 621**: The project uses both Poetry (legacy) and modern PEP 621 project configuration in `pyproject.toml`.
Copy file name to clipboardExpand all lines: RELEASE.md
+39-23Lines changed: 39 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,25 +8,30 @@ CORNETO uses an automated tag-based release process powered by Poetry Dynamic Ve
8
8
9
9
To create a new release:
10
10
11
-
1.**Create and push a Git tag** following semantic versioning:
11
+
1.**Merge `dev` into `main`** via pull request.
12
+
13
+
2.**Create and push the release tag from `main`**:
12
14
```bash
13
-
git tag -a v1.2.3 -m "v1.2.3"
14
-
git push origin v1.2.3
15
+
poetry install
16
+
git checkout main
17
+
git pull --ff-only origin main
18
+
poetry run release v1.2.3
15
19
```
20
+
- Use pre-release tags as needed: `v1.2.3-alpha.0`, `v1.2.3-beta.0`, `v1.2.3-rc.0`.
16
21
17
-
2.**Automatic pipeline execution**:
22
+
3.**Automatic pipeline execution**:
18
23
- GitHub Actions detects the new tag
19
24
- Builds the package using Poetry
20
25
-**Creates GitHub Release with automated release notes**
21
26
- Publishes to PyPI via OIDC trusted publishing
22
27
- Deploys versioned documentation to GitHub Pages
23
28
24
-
3.**Version resolution**:
29
+
4.**Version resolution**:
25
30
- Poetry Dynamic Versioning automatically extracts the version from the Git tag
26
31
- The package version in `pyproject.toml` remains at `0.0.0` (placeholder)
27
32
- Built packages use the actual tag version (e.g., `1.2.3`)
28
33
29
-
4.**Automated Release Notes**:
34
+
5.**Automated Release Notes**:
30
35
- GitHub automatically generates release notes based on merged PRs and commits
31
36
- Uses conventional commit patterns to categorize changes
32
37
- Includes contributor acknowledgments and change summaries
@@ -37,10 +42,10 @@ To create a new release:
37
42
```bash
38
43
# Ensure you're on the main branch and up to date
39
44
git checkout main
40
-
git pull origin main
45
+
git pull --ff-only origin main
41
46
42
-
# Create and push a release tag (use semantic versioning)
43
-
python scripts/release.py minor
47
+
# Create and push a release tag explicitly
48
+
poetry run release v1.0.0-beta.4
44
49
```
45
50
46
51
The release pipeline (`.github/workflows/build-and-publish.yml`) will automatically:
@@ -51,15 +56,23 @@ The release pipeline (`.github/workflows/build-and-publish.yml`) will automatica
51
56
52
57
### Release Helper
53
58
54
-
Use the helper script to bump and push the next tag:
59
+
Use the helper command to create and push an explicit tag:
55
60
56
61
```bash
57
-
python scripts/release.py major # vX.0.0
58
-
python scripts/release.py minor # v0.X.0
59
-
python scripts/release.py patch# v0.0.X
62
+
poetry run release v1.2.3
63
+
poetry run release v1.0.0-beta.4
64
+
poetry run release 1.0.0-rc.1 # 'v' prefix is optional
60
65
```
61
66
62
-
It finds the latest `v*` tag, computes the next version, creates an annotated tag, and pushes it to `origin`.
67
+
It validates release preconditions (clean tree, on `main`, in sync with `origin/main`,
68
+
`origin/dev` merged into `main`, tag not already present), then creates an annotated tag and pushes it to `origin`.
69
+
70
+
Useful options:
71
+
72
+
```bash
73
+
poetry run release v1.0.0-beta.4 --dry-run # validate only
74
+
poetry run release v1.0.0-beta.4 --yes # skip confirmation prompt
75
+
```
63
76
64
77
### Customizing Release Notes
65
78
@@ -83,7 +96,6 @@ Before creating a release, ensure the development environment and code quality s
83
96
All maintainers should have the development environment properly configured as described in [CONTRIBUTING.md](CONTRIBUTING.md), including:
84
97
- Poetry for dependency management
85
98
- Pre-commit hooks installed and active
86
-
- Nox for running quality checks
87
99
88
100
### Pre-commit Requirements
89
101
**Critical**: Pre-commit hooks must be installed and passing for all commits that will be included in the release. The pre-commit configuration ensures:
0 commit comments