Skip to content

Commit 8139620

Browse files
docs: add a reference page for CLI utilities (#1080)
Adding a reference page for this. There's also a `pathlib._local.Path` warning when building the docs we should try to fix eventually. Also preparing for a patch release with the 3.14 support and a bug fix. --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 501625f commit 8139620

File tree

14 files changed

+115
-13
lines changed

14 files changed

+115
-13
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ jobs:
340340
timeout-minutes: 25
341341
strategy:
342342
matrix:
343-
runs-on: [ubuntu-latest, macos-latest, windows-latest]
343+
runs-on: [ubuntu-latest, macos-latest] # Windows command output issue (wrong Python selected)
344344

345345
steps:
346346
- uses: actions/checkout@v4

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Science Foundation.
395395
[github-discussions-link]: https://github.com/orgs/scikit-build/discussions
396396
[hatchling]: https://hatch.pypa.io/latest
397397
[maturin]: https://www.maturin.rs
398-
[meson-python]: https://meson-python.readthedocs.io
398+
[meson-python]: https://mesonbuild.com/meson-python
399399
[py-build-cmake]: https://tttapa.github.io/py-build-cmake
400400
[pypi-link]: https://pypi.org/project/scikit-build-core/
401401
[pypi-platforms]: https://img.shields.io/pypi/pyversions/scikit-build-core

docs/about/changelog.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## Version 0.11.3
4+
5+
Fixes:
6+
7+
- fix: add scripts to `_DICT_STR_FIELDS` for dynamic metadata. by @bilke in
8+
#1070
9+
10+
CI and testing:
11+
12+
- Officially support Python 3.14, color help @henryiii in #1074
13+
- Remove no-wheel based on virtualenv version by @henryiii in #1071
14+
- Work when `CMAKE_GENERATOR` is set by @henryiii in #1066
15+
- Try a workaround for packit `propose-downstream` by @LecrisUT in #1067
16+
- Update coverage a bit by @henryiii in #1073
17+
18+
Documentation:
19+
20+
- Generate config value reference by @LecrisUT in #1052
21+
- Update and fix projects list by @henryiii in #1075
22+
- Document CLI utilities by @henryiii in #1080
23+
324
## Version 0.11.2
425

526
This release allows dynamic-metadata to reference other fields, which enables a

docs/about/projects.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ for project in projects["project"]:
6363
* [gemmi](https://pypi.org/project/gemmi) ([source](https://github.com/project-gemmi/gemmi/blob/HEAD/pyproject.toml))
6464
* [gdstk](https://pypi.org/project/gdstk) ([source](https://github.com/heitzmann/gdstk/blob/HEAD/pyproject.toml))
6565
* [symusic](https://pypi.org/project/symusic) ([source](https://github.com/Yikai-Liao/symusic/blob/HEAD/pyproject.toml))
66-
* [s5cmd](https://pypi.org/project/s5cmd) ([source](https://github.com/jcfr/s5cmd-python-distributions/blob/HEAD/pyproject.toml))
66+
* [s5cmd](https://pypi.org/project/s5cmd) ([source](https://github.com/ImagingDataCommons/s5cmd-python-distributions/blob/HEAD/pyproject.toml))
6767
* [pyslang](https://pypi.org/project/pyslang) ([source](https://github.com/MikePopoloski/slang/blob/HEAD/pyproject.toml))
6868
* [librapid](https://pypi.org/project/librapid) ([source](https://github.com/LibRapid/librapid/blob/HEAD/pyproject.toml))
6969
* [pyresidfp](https://pypi.org/project/pyresidfp) ([source](https://github.com/pyresidfp/pyresidfp/blob/HEAD/pyproject.toml))
7070
* [kiss-icp](https://pypi.org/project/kiss-icp) ([source](https://github.com/PRBonn/kiss-icp/blob/HEAD/python/pyproject.toml))
7171
* [simsopt](https://pypi.org/project/simsopt) ([source](https://github.com/hiddenSymmetries/simsopt/blob/HEAD/pyproject.toml))
7272
* [mqt-core](https://pypi.org/project/mqt-core) ([source](https://github.com/munich-quantum-toolkit/core/blob/HEAD/pyproject.toml))
73-
<!--[[[end]]] (checksum: 02f85758156e39de6e127e2b5ce0f9bc)-->
73+
<!--[[[end]]] (checksum: a798ae9bb220ab16cfe9402431cde0cf)-->
7474

7575
<!-- prettier-ignore-end -->
7676

docs/conf.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,19 @@
5656
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
5757
# ones.
5858
extensions = [
59+
"conftabs",
5960
"myst_parser",
61+
"sphinx-jsonschema",
6062
"sphinx.ext.autodoc",
6163
"sphinx.ext.intersphinx",
6264
"sphinx.ext.linkcode",
6365
"sphinx.ext.mathjax",
6466
"sphinx.ext.napoleon",
67+
"sphinx_autodoc_typehints",
6568
"sphinx_copybutton",
6669
"sphinx_inline_tabs",
67-
"sphinx_autodoc_typehints",
68-
"conftabs",
69-
"sphinx-jsonschema",
7070
"sphinx_tippy",
71+
"sphinxcontrib.programoutput",
7172
]
7273

7374
# Add any paths that contain templates here, relative to this directory.
@@ -115,6 +116,9 @@
115116
"default-versioning-scheme",
116117
"git-archives",
117118
]
119+
linkcheck_ignore = [
120+
r"https://github.com/search\?.*",
121+
]
118122
# -- Options for HTML output -------------------------------------------------
119123

120124
# The theme to use for HTML and HTML Help pages. See the documentation for

docs/data/projects.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ github = "Yikai-Liao/symusic"
114114

115115
[[project]]
116116
pypi = "s5cmd"
117-
github = "jcfr/s5cmd-python-distributions"
117+
github = "ImagingDataCommons/s5cmd-python-distributions"
118118

119119
[[project]]
120120
pypi = "pyslang"

docs/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ about/changelog
7474
api/scikit_build_core
7575
schema
7676
reference/configs
77+
reference/cli
7778
```
7879

7980
## Indices and tables

docs/reference/cli.md

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# CLI Reference
2+
3+
Scikit-build-core has a few integrated CLI tools. These are not guaranteed to be
4+
stable between releases yet, but can still be useful to investigate your
5+
environment.
6+
7+
## Build utilities
8+
9+
```{program-output} python -m scikit_build_core.build --help
10+
11+
```
12+
13+
### Build requirements
14+
15+
```{program-output} python -m scikit_build_core.build requires --help
16+
17+
```
18+
19+
Example:
20+
21+
```{command-output} python -m scikit_build_core.build requires
22+
:cwd: ../examples/getting_started/c
23+
24+
```
25+
26+
### Project table
27+
28+
```{program-output} python -m scikit_build_core.build project-table --help
29+
30+
```
31+
32+
Example:
33+
34+
```{command-output} python -m scikit_build_core.build project-table
35+
:cwd: ../examples/getting_started/c
36+
37+
```
38+
39+
## Wheel tag
40+
41+
```{program-output} python -m scikit_build_core.builder.wheel_tag --help
42+
43+
```
44+
45+
Example:
46+
47+
```{command-output} python -m scikit_build_core.builder.wheel_tag
48+
49+
```
50+
51+
## File API tools
52+
53+
```{program-output} python -m scikit_build_core.file_api.query --help
54+
55+
```
56+
57+
```{program-output} python -m scikit_build_core.file_api.reply --help
58+
59+
```

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ docs = [
101101
"sphinx-inline-tabs",
102102
"sphinx-jsonschema",
103103
"sphinx-tippy",
104+
"sphinxcontrib-programoutput",
104105
]
105106
wheel-free-setuptools = [
106107
'setuptools>=70.1; python_version>="3.8"',

src/scikit_build_core/build/__main__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ def get_requires(mode: Literal["sdist", "wheel", "editable"]) -> None:
5050

5151
def main() -> None:
5252
parser = ArgumentParser(
53+
prog="python -m scikit_build_core.build",
5354
allow_abbrev=False,
54-
description="Build backend utilities",
55+
description="Build backend utilities.",
5556
)
5657

5758
subparsers = parser.add_subparsers(help="Commands")

src/scikit_build_core/builder/wheel_tag.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,11 @@ def as_tags_set(self) -> frozenset[packaging.tags.Tag]:
154154
if __name__ == "__main__":
155155
from .._compat.argparse import ArgumentParser
156156

157-
parser = ArgumentParser(allow_abbrev=False)
157+
parser = ArgumentParser(
158+
prog="python -m scikit_build_core.builder.wheel_tag",
159+
description="Get the computed wheel tag for the current environment.",
160+
allow_abbrev=False,
161+
)
158162
parser.add_argument(
159163
"--archs",
160164
nargs="*",

src/scikit_build_core/file_api/_cattrs_converter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ def load_reply_dir(reply_dir: Path) -> Index:
6969
except ModuleNotFoundError:
7070
rich_print = builtins.print
7171

72-
parser = ArgumentParser(allow_abbrev=False)
72+
parser = ArgumentParser(
73+
allow_abbrev=False,
74+
description="This runs cattrs (required) instead of the built-in converter, for comparison.",
75+
)
7376
parser.add_argument("reply_dir", type=Path, help="Path to the reply directory")
7477
args = parser.parse_args()
7578

src/scikit_build_core/file_api/query.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ def stateless_query(build_dir: Path) -> Path:
2525
if __name__ == "__main__":
2626
from .._compat.argparse import ArgumentParser
2727

28-
parser = ArgumentParser(allow_abbrev=False)
28+
parser = ArgumentParser(
29+
prog="python -m scikit_build_core.file_api.query",
30+
allow_abbrev=False,
31+
description="Write a stateless query to a build directory",
32+
)
2933
parser.add_argument("build_dir", type=Path, help="Path to the build directory")
3034
args = parser.parse_args()
3135

src/scikit_build_core/file_api/reply.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ def load_reply_dir(path: Path) -> Index:
119119
except ModuleNotFoundError:
120120
rich_print = builtins.print
121121

122-
parser = ArgumentParser(allow_abbrev=False)
122+
parser = ArgumentParser(
123+
prog="python -m scikit_build_core.file_api.reply",
124+
allow_abbrev=False,
125+
description="Read a query written out to a build directory.",
126+
)
123127
parser.add_argument("reply_dir", type=Path, help="Path to the reply directory")
124128
args = parser.parse_args()
125129

0 commit comments

Comments
 (0)