No project description provided
Project description
liblaf-nox-recipes keeps noxfile.py sessions small by packaging the uv, pytest, and CUDA glue you would otherwise repeat across repositories.
✨ Features
- 💨 Bootstrap
uv-managed environments in one call:setup_uv()compiles constraints frompyproject.toml, resolves the dependency groups you ask for, syncs the session environment, and installs the current project in editable mode. - 📉 Exercise multiple dependency strategies:
Resolutionexposeshighest,lowest, andlowest-directmodes so you can cover both everyday development and lower-bound compatibility in CI. - 🧪 Keep test sessions short without hiding
pytest:pytest()forwardss.posargs, supports per-session environment variables, and keeps shared flags out of each@nox.session. - ⚡ Run CodSpeed-friendly benchmarks:
pytest_bench()adds the benchmark marker,--codspeed, and single-process defaults when helpers likepytest-xdistare installed. - 🖥️ Skip GPU-only jobs safely:
supports_cuda()andcuda_driver_version()use NVML to decide whether CUDA-specific sessions should run.
📦 Installation
[!NOTE]
liblaf-nox-recipesrequires Python 3.12+ and expectsuvto be available anywhere yournoxsessions run.
uv add --dev liblaf-nox-recipes
If you also want uv to create and manage the virtual environments that nox uses, install nox-uv and set nox.options.default_venv_backend = "uv" in your noxfile.py.
🚀 Quick Start
from typing import Any
import nox
from liblaf import nox_recipes as recipes
from liblaf.nox_recipes import Resolution
nox.options.default_venv_backend = "uv"
nox.options.reuse_existing_virtualenvs = True
PYPROJECT: dict[str, Any] = nox.project.load_toml("pyproject.toml")
PYTHON_VERSIONS: list[str] = nox.project.python_versions(PYPROJECT)
@nox.session(python=PYTHON_VERSIONS, reuse_venv=True, tags=["test"])
@nox.parametrize(
"resolution",
[
nox.param(Resolution.HIGHEST, id="highest"),
nox.param(Resolution.LOWEST_DIRECT, id="lowest-direct"),
],
)
def test(s: nox.Session, resolution: Resolution) -> None:
recipes.setup_uv(s, groups=["test"], resolution=resolution)
recipes.pytest(s, suppress_no_test_exit_code=True)
Start with setup_uv() for the common case. When you need finer control, drop down to uv_pip_compile(), uv_pip_sync(), and uv_pip_install() directly. For GPU-only jobs, guard the session with supports_cuda() before doing any CUDA-dependent work.
⌨️ Local Development
git clone https://github.com/liblaf/nox-recipes.git
cd nox-recipes
mise run install
nox
mise run docs:serve
nox executes the test-tagged matrix from noxfile.py, and mise run docs:serve rebuilds the docs site that also embeds this README.
🤝 Contributing
Focused issues and pull requests are welcome. Please run nox before opening a PR, and rebuild the docs with mise run docs:serve when you change documentation or public APIs.
📝 License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file liblaf_nox_recipes-0.1.6.tar.gz.
File metadata
- Download URL: liblaf_nox_recipes-0.1.6.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3f02372809a938b8c8706dd98e1821b594120fc52793184ac761724b2163d48
|
|
| MD5 |
352f7456cfc47c27d4968b440923057b
|
|
| BLAKE2b-256 |
e952bbaf2099c6bb96cf862178b903bfa2442f6e581cb7adbd3d8988dc219763
|
Provenance
The following attestation bundles were made for liblaf_nox_recipes-0.1.6.tar.gz:
Publisher:
python-release.yaml on liblaf/nox-recipes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liblaf_nox_recipes-0.1.6.tar.gz -
Subject digest:
e3f02372809a938b8c8706dd98e1821b594120fc52793184ac761724b2163d48 - Sigstore transparency entry: 1238514816
- Sigstore integration time:
-
Permalink:
liblaf/nox-recipes@bed654ba608dd5640af971927b80cbc6d063e3a3 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/liblaf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yaml@bed654ba608dd5640af971927b80cbc6d063e3a3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file liblaf_nox_recipes-0.1.6-py3-none-any.whl.
File metadata
- Download URL: liblaf_nox_recipes-0.1.6-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d969effaf8c84de7fb4668fbc19d213b748f637a8b3fae0309895df70c52733c
|
|
| MD5 |
a4e6500d254e957906abb4d87d8099c2
|
|
| BLAKE2b-256 |
adeeaa653ffe0f348ce568bb7ea48231dc2b376d7687566984d1deb9de8eb579
|
Provenance
The following attestation bundles were made for liblaf_nox_recipes-0.1.6-py3-none-any.whl:
Publisher:
python-release.yaml on liblaf/nox-recipes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
liblaf_nox_recipes-0.1.6-py3-none-any.whl -
Subject digest:
d969effaf8c84de7fb4668fbc19d213b748f637a8b3fae0309895df70c52733c - Sigstore transparency entry: 1238514821
- Sigstore integration time:
-
Permalink:
liblaf/nox-recipes@bed654ba608dd5640af971927b80cbc6d063e3a3 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/liblaf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-release.yaml@bed654ba608dd5640af971927b80cbc6d063e3a3 -
Trigger Event:
push
-
Statement type: