Skip to content

Commit 5934c2e

Browse files
authored
docs: add notes at top of page, update REAMDE (#717)
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 4555a59 commit 5934c2e

File tree

3 files changed

+45
-20
lines changed

3 files changed

+45
-20
lines changed

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@ templates for Python packages?
1515

1616
- Lives with the [Scientific-Python Development Guide][]: Every decision is
1717
clearly documented and every tool described, and everything is kept in sync.
18-
- Nine different backends to choose from for building packages.
18+
- Ten different backends to choose from for building packages.
1919
- Optional VCS versioning for most backends.
20+
- Selection for your preferred documentation engine (Sphinx or MkDocs).
2021
- Template generation tested in GitHub Actions using nox.
2122
- Supports generation with [copier][], [cookiecutter][], and [cruft][].
2223
- Supports GitHub Actions if targeting a `github.com` url (the default), and
2324
adds experimental GitLab CI support otherwise.
2425
- Includes several compiled backends using [pybind11][], with wheels produced
2526
for all platforms using [cibuildwheel][].
2627
- Provides [`sp-repo-review`][pypi-link] to evaluate existing repos against the
27-
guidelines, with a WebAssembly version integrated with the guide. All checks
28-
cross-linked.
28+
guidelines, with a WebAssembly version integrated with the guide. Checks are
29+
hyperlinked back to the guide.
2930
- Follows [PyPA][] best practices and regularly updated. Recent additions:
3031
- [PEP 639](https://peps.python.org/pep-0639): SPDX licenses
3132
- [PEP 735](https://peps.python.org/pep-0735): Dependency groups
@@ -134,22 +135,28 @@ backports structure with a small typing example.
134135
- GitHub Actions runs testing for the generation itself
135136
- Uses nox so cookie development can be checked locally
136137
- Uses uv for high performance CI
137-
- GitHub actions deploy
138+
- GitHub actions deployment
138139
- C++ backends include cibuildwheel for wheel builds
139140
- Uses PyPI trusted publisher deployment
141+
- A GitHub release configuration that skips common bot commits when
142+
auto-generating release notes
140143
- Dependabot keeps actions up to date periodically, through useful pull requests
141-
- Formatting handled by pre-commit
144+
- A contributing guide
145+
- Formatting handled by pre-commit or prek
142146
- No reason not to be strict on a new project; remove what you don't want.
143147
- Includes MyPy - static typing
144148
- Includes Ruff - standard formatting, linting and autofixes
145149
- Replaces Flake8, isort, pyupgrade, yesqa, pycln, and dozens of plugins
146150
- Includes spell checking
151+
- One of several popular licenses
147152
- An pylint nox target can be used to run pylint, which integrated GHA
148153
annotations
149-
- A ReadTheDocs-ready Sphinx docs folder and `docs` dependency-group
150-
- A test folder and pytest `test` dependency-group
154+
- A ReadTheDocs-ready Sphinx or MkDocs `docs/` folder and `docs`
155+
dependency-group
156+
- A `tests/` folder and pytest `test` dependency-group
151157
- A dev group for `uv run` integration
152158
- A noxfile is included with a few common targets
159+
- A README
153160

154161
#### For developers:
155162

docs/pages/guides/packaging_compiled.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ with render_cookie(backend="maturin", vcs=False) as maturin:
2626
]]] -->
2727
<!-- [[[end]]] -->
2828

29+
{: .highlight-title }
30+
31+
> Quick start
32+
>
33+
> Once you've done this at least once, feel free to use
34+
> [our cookiecutter/copier template](https://github.com/scientific-python/cookie),
35+
> or `uv init` to get started quickly on new packages!
36+
2937
# Packaging Compiled Projects
3038

3139
There are a variety of ways to package compiled projects. In the past, the only
@@ -53,15 +61,18 @@ There are also classic setuptools plugins:
5361
- [scikit-build][]: Builds C/C++/Fortran using CMake.
5462
- [setuptools-rust][]: Builds Rust using Cargo.
5563

56-
{: .important }
57-
58-
Selecting a backend: If you are using Rust, use maturin. If you are using CUDA,
59-
use scikit-build-core. If you are using a classic language (C, C++, Fortran),
60-
then you can use either scikit-build-core or meson-python, depending on whether
61-
you prefer writing CMake or Meson. Meson is a lot more opinionated; it requires
62-
you use version control, it requires a README.md and LICENSE file. It requires
63-
your compiler be properly set up. Etc. While CMake can be as elegant as Meson,
64-
there are a lot of historical examples of poorly written CMake.
64+
{: .highlight-title }
65+
66+
> Selecting a backend
67+
>
68+
> Selecting a backend: If you are using Rust, use maturin. If you are using
69+
> CUDA, use scikit-build-core. If you are using a classic language (C, C++,
70+
> Fortran), then you can use either scikit-build-core or meson-python, depending
71+
> on whether you prefer writing CMake or Meson. Meson is a lot more opinionated;
72+
> it requires you use version control, it requires a README.md and LICENSE file.
73+
> It requires your compiler be properly set up. Etc. While CMake can be as
74+
> elegant as Meson, there are a lot of historical examples of poorly written
75+
> CMake.
6576
6677
## pyproject.toml: build-system
6778

docs/pages/guides/packaging_simple.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ parent: Topical Guides
88

99
{% include toc.html %}
1010

11+
{: .highlight-title }
12+
13+
> Quick start
14+
>
15+
> Once you've done this at least once, feel free to use
16+
> [our cookiecutter/copier template](https://github.com/scientific-python/cookie),
17+
> or `uv init` to get started quickly on new packages!
18+
1119
# Simple packaging
1220

1321
Python packages can now use a modern build system instead of the classic but
@@ -32,7 +40,7 @@ tutorial][].
3240
> `pipx run hatch new --init` or with
3341
> [ini2toml](https://ini2toml.readthedocs.io/en/latest/).
3442
35-
{: .highlight-title }
43+
{: .important-title }
3644

3745
> Selecting a backend
3846
>
@@ -113,9 +121,8 @@ If you don't match your package name and import name (which you should except
113121
for very special cases), you will likely need extra configuration here.
114122

115123
You should have a `README` {% rr PY002 %} and a `LICENSE` {% rr PY003 %} file.
116-
You should have a `docs/` folder {%
117-
rr PY004 %}. You should have a `/tests` folder {%
118-
rr PY005 %} (recommended) and/or a `src/<package>/tests` folder.
124+
You should have a `docs/` folder {% rr PY004 %}. You should have a `/tests`
125+
folder {% rr PY005 %} (recommended) and/or a `src/<package>/tests` folder.
119126

120127
## Versioning
121128

0 commit comments

Comments
 (0)