Skip to content

docs: add a reference page for CLI utilities #1080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ jobs:
timeout-minutes: 25
strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
runs-on: [ubuntu-latest, macos-latest] # Windows command output issue (wrong Python selected)

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ Science Foundation.
[github-discussions-link]: https://github.com/orgs/scikit-build/discussions
[hatchling]: https://hatch.pypa.io/latest
[maturin]: https://www.maturin.rs
[meson-python]: https://meson-python.readthedocs.io
[meson-python]: https://mesonbuild.com/meson-python
[py-build-cmake]: https://tttapa.github.io/py-build-cmake
[pypi-link]: https://pypi.org/project/scikit-build-core/
[pypi-platforms]: https://img.shields.io/pypi/pyversions/scikit-build-core
Expand Down
21 changes: 21 additions & 0 deletions docs/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## Version 0.11.3

Fixes:

- fix: add scripts to `_DICT_STR_FIELDS` for dynamic metadata. by @bilke in
#1070

CI and testing:

- Officially support Python 3.14, color help @henryiii in #1074
- Remove no-wheel based on virtualenv version by @henryiii in #1071
- Work when `CMAKE_GENERATOR` is set by @henryiii in #1066
- Try a workaround for packit `propose-downstream` by @LecrisUT in #1067
- Update coverage a bit by @henryiii in #1073

Documentation:

- Generate config value reference by @LecrisUT in #1052
- Update and fix projects list by @henryiii in #1075
- Document CLI utilities by @henryiii in #1080

## Version 0.11.2

This release allows dynamic-metadata to reference other fields, which enables a
Expand Down
4 changes: 2 additions & 2 deletions docs/about/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ for project in projects["project"]:
* [gemmi](https://pypi.org/project/gemmi) ([source](https://github.com/project-gemmi/gemmi/blob/HEAD/pyproject.toml))
* [gdstk](https://pypi.org/project/gdstk) ([source](https://github.com/heitzmann/gdstk/blob/HEAD/pyproject.toml))
* [symusic](https://pypi.org/project/symusic) ([source](https://github.com/Yikai-Liao/symusic/blob/HEAD/pyproject.toml))
* [s5cmd](https://pypi.org/project/s5cmd) ([source](https://github.com/jcfr/s5cmd-python-distributions/blob/HEAD/pyproject.toml))
* [s5cmd](https://pypi.org/project/s5cmd) ([source](https://github.com/ImagingDataCommons/s5cmd-python-distributions/blob/HEAD/pyproject.toml))
* [pyslang](https://pypi.org/project/pyslang) ([source](https://github.com/MikePopoloski/slang/blob/HEAD/pyproject.toml))
* [librapid](https://pypi.org/project/librapid) ([source](https://github.com/LibRapid/librapid/blob/HEAD/pyproject.toml))
* [pyresidfp](https://pypi.org/project/pyresidfp) ([source](https://github.com/pyresidfp/pyresidfp/blob/HEAD/pyproject.toml))
* [kiss-icp](https://pypi.org/project/kiss-icp) ([source](https://github.com/PRBonn/kiss-icp/blob/HEAD/python/pyproject.toml))
* [simsopt](https://pypi.org/project/simsopt) ([source](https://github.com/hiddenSymmetries/simsopt/blob/HEAD/pyproject.toml))
* [mqt-core](https://pypi.org/project/mqt-core) ([source](https://github.com/munich-quantum-toolkit/core/blob/HEAD/pyproject.toml))
<!--[[[end]]] (checksum: 02f85758156e39de6e127e2b5ce0f9bc)-->
<!--[[[end]]] (checksum: a798ae9bb220ab16cfe9402431cde0cf)-->

<!-- prettier-ignore-end -->

Expand Down
10 changes: 7 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"conftabs",
"myst_parser",
"sphinx-jsonschema",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.linkcode",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_copybutton",
"sphinx_inline_tabs",
"sphinx_autodoc_typehints",
"conftabs",
"sphinx-jsonschema",
"sphinx_tippy",
"sphinxcontrib.programoutput",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down Expand Up @@ -115,6 +116,9 @@
"default-versioning-scheme",
"git-archives",
]
linkcheck_ignore = [
r"https://github.com/search\?.*",
]
# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
2 changes: 1 addition & 1 deletion docs/data/projects.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ github = "Yikai-Liao/symusic"

[[project]]
pypi = "s5cmd"
github = "jcfr/s5cmd-python-distributions"
github = "ImagingDataCommons/s5cmd-python-distributions"

[[project]]
pypi = "pyslang"
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ about/changelog
api/scikit_build_core
schema
reference/configs
reference/cli
```

## Indices and tables
Expand Down
59 changes: 59 additions & 0 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# CLI Reference

Scikit-build-core has a few integrated CLI tools. These are not guaranteed to be
stable between releases yet, but can still be useful to investigate your
environment.

## Build utilities

```{program-output} python -m scikit_build_core.build --help

```

### Build requirements

```{program-output} python -m scikit_build_core.build requires --help

```

Example:

```{command-output} python -m scikit_build_core.build requires
:cwd: ../examples/getting_started/c

```

### Project table

```{program-output} python -m scikit_build_core.build project-table --help

```

Example:

```{command-output} python -m scikit_build_core.build project-table
:cwd: ../examples/getting_started/c

```

## Wheel tag

```{program-output} python -m scikit_build_core.builder.wheel_tag --help

```

Example:

```{command-output} python -m scikit_build_core.builder.wheel_tag

```

## File API tools

```{program-output} python -m scikit_build_core.file_api.query --help

```

```{program-output} python -m scikit_build_core.file_api.reply --help

```
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ docs = [
"sphinx-inline-tabs",
"sphinx-jsonschema",
"sphinx-tippy",
"sphinxcontrib-programoutput",
]
wheel-free-setuptools = [
'setuptools>=70.1; python_version>="3.8"',
Expand Down
3 changes: 2 additions & 1 deletion src/scikit_build_core/build/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ def get_requires(mode: Literal["sdist", "wheel", "editable"]) -> None:

def main() -> None:
parser = ArgumentParser(
prog="python -m scikit_build_core.build",
allow_abbrev=False,
description="Build backend utilities",
description="Build backend utilities.",
)

subparsers = parser.add_subparsers(help="Commands")
Expand Down
6 changes: 5 additions & 1 deletion src/scikit_build_core/builder/wheel_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@
if __name__ == "__main__":
from .._compat.argparse import ArgumentParser

parser = ArgumentParser(allow_abbrev=False)
parser = ArgumentParser(

Check warning on line 157 in src/scikit_build_core/builder/wheel_tag.py

View check run for this annotation

Codecov / codecov/patch

src/scikit_build_core/builder/wheel_tag.py#L157

Added line #L157 was not covered by tests
prog="python -m scikit_build_core.builder.wheel_tag",
description="Get the computed wheel tag for the current environment.",
allow_abbrev=False,
)
parser.add_argument(
"--archs",
nargs="*",
Expand Down
5 changes: 4 additions & 1 deletion src/scikit_build_core/file_api/_cattrs_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def load_reply_dir(reply_dir: Path) -> Index:
except ModuleNotFoundError:
rich_print = builtins.print

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

Expand Down
6 changes: 5 additions & 1 deletion src/scikit_build_core/file_api/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def stateless_query(build_dir: Path) -> Path:
if __name__ == "__main__":
from .._compat.argparse import ArgumentParser

parser = ArgumentParser(allow_abbrev=False)
parser = ArgumentParser(
prog="python -m scikit_build_core.file_api.query",
allow_abbrev=False,
description="Write a stateless query to a build directory",
)
parser.add_argument("build_dir", type=Path, help="Path to the build directory")
args = parser.parse_args()

Expand Down
6 changes: 5 additions & 1 deletion src/scikit_build_core/file_api/reply.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ def load_reply_dir(path: Path) -> Index:
except ModuleNotFoundError:
rich_print = builtins.print

parser = ArgumentParser(allow_abbrev=False)
parser = ArgumentParser(
prog="python -m scikit_build_core.file_api.reply",
allow_abbrev=False,
description="Read a query written out to a build directory.",
)
parser.add_argument("reply_dir", type=Path, help="Path to the reply directory")
args = parser.parse_args()

Expand Down
Loading