pax_global_header 0000666 0000000 0000000 00000000064 14607231724 0014520 g ustar 00root root 0000000 0000000 52 comment=5656fcedc31a1ea37d016e4d94d00185330cc528
nox-2024.04.15/ 0000775 0000000 0000000 00000000000 14607231724 0012723 5 ustar 00root root 0000000 0000000 nox-2024.04.15/.github/ 0000775 0000000 0000000 00000000000 14607231724 0014263 5 ustar 00root root 0000000 0000000 nox-2024.04.15/.github/FUNDING.yml 0000664 0000000 0000000 00000000113 14607231724 0016073 0 ustar 00root root 0000000 0000000 # These are supported funding model platforms
open_collective: python-nox
nox-2024.04.15/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14607231724 0016446 5 ustar 00root root 0000000 0000000 nox-2024.04.15/.github/ISSUE_TEMPLATE/bug.yml 0000664 0000000 0000000 00000002527 14607231724 0017754 0 ustar 00root root 0000000 0000000 name: 🐞 Bug Report
description: File a bug/issue
title: "
"
labels:
- "bug"
body:
- type: textarea
attributes:
label: Current Behavior
description: A concise description of what you're experiencing.
validations:
required: false
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
validations:
required: false
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. With this Nox session/file...
2. Run '...'
3. See error...
validations:
required: false
- type: textarea
attributes:
label: Environment
description: |
examples:
- **OS**: Ubuntu 20.04
- **Python**: 3.9.7
- **Nox**: 0.14.2
value: |
- OS:
- Python:
- Nox:
render: Markdown
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
nox-2024.04.15/.github/ISSUE_TEMPLATE/config.yml 0000664 0000000 0000000 00000000263 14607231724 0020437 0 ustar 00root root 0000000 0000000 contact_links:
- name: Winterbloom Discord server
url: https://discord.gg/C5EH3N3fsk
about: You can ask questions and chat about Nox under this server's '#nox' channel.
nox-2024.04.15/.github/ISSUE_TEMPLATE/feature_request.yml 0000664 0000000 0000000 00000001623 14607231724 0022376 0 ustar 00root root 0000000 0000000 name: 🚀 Feature Request
description: Request a new feature or enhancement
title: ""
labels:
- "enhancement"
body:
- type: textarea
attributes:
label: How would this feature be useful?
description: Describe any use cases this solves or frustrations it alleviates.
validations:
required: false
- type: textarea
attributes:
label: Describe the solution you'd like
description: If you have an idea on how to do this, let us know here!
validations:
required: false
- type: textarea
attributes:
label: Describe alternatives you've considered
description: If there's some workaround or alternative solutions, let us know here!
validations:
required: false
- type: textarea
attributes:
label: Anything else?
description: Any other relevant information or background.
validations:
required: false
nox-2024.04.15/.github/action_helper.py 0000664 0000000 0000000 00000005014 14607231724 0017451 0 ustar 00root root 0000000 0000000 from __future__ import annotations
import json
import sys
def filter_version(version: str) -> str:
"""return python 'major.minor'"""
# remove interpreter prefix
if version.startswith("pypy-"):
version_ = version[5:]
elif version.startswith("pypy"):
version_ = version[4:]
elif version.startswith("~"):
version_ = version[1:]
else:
version_ = version
# remove extra specifier e.g. "3.12-dev" => "3.12", "~3.12.0-0" => "3.12"
version_ = version_.split("-")[0]
version_parts = version_.split(".")
if len(version_parts) < 2:
raise ValueError(f"invalid version: {version}")
if not version_parts[0].isdigit():
raise ValueError(f"invalid major python version: {version}")
if not version_parts[1].isdigit():
raise ValueError(f"invalid minor python version: {version}")
return ".".join(version_parts[:2])
def setup_action(input_: str) -> None:
versions = [version.strip() for version in input_.split(",") if version.strip()]
pypy_versions = [version for version in versions if version.startswith("pypy")]
pypy_versions_filtered = [filter_version(version) for version in pypy_versions]
if len(pypy_versions) != len(set(pypy_versions_filtered)):
raise ValueError(
"multiple versions specified for the same 'major.minor' PyPy interpreter:"
f" {pypy_versions}"
)
cpython_versions = [version for version in versions if version not in pypy_versions]
cpython_versions_filtered = [
filter_version(version) for version in cpython_versions
]
if len(cpython_versions) != len(set(cpython_versions_filtered)):
raise ValueError(
"multiple versions specified for the same 'major.minor' CPython"
f" interpreter: {cpython_versions}"
)
# cpython shall be installed last because
# other interpreters also define pythonX.Y symlinks.
versions = pypy_versions + cpython_versions
# we want to install python 3.11 last to ease nox set-up
if "3.11" in cpython_versions_filtered:
index = cpython_versions_filtered.index("3.11")
index = versions.index(cpython_versions[index])
cpython_nox = versions.pop(index)
versions.append(cpython_nox)
else:
# add this to install nox
versions.append("3.11")
print(f"interpreters={json.dumps(versions)}")
if __name__ == "__main__":
if len(sys.argv) != 2:
raise AssertionError(f"invalid arguments: {sys.argv}")
setup_action(sys.argv[1])
nox-2024.04.15/.github/dependabot.yml 0000664 0000000 0000000 00000000260 14607231724 0017111 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
groups:
actions:
patterns:
- "*"
nox-2024.04.15/.github/workflows/ 0000775 0000000 0000000 00000000000 14607231724 0016320 5 ustar 00root root 0000000 0000000 nox-2024.04.15/.github/workflows/action.yml 0000664 0000000 0000000 00000002717 14607231724 0020327 0 ustar 00root root 0000000 0000000 name: Action
on:
push:
branches:
- "main"
- "**action**"
pull_request:
paths:
- ".github/workflows/action.yml"
- ".github/action_helper.py"
- "action.yml"
workflow_dispatch:
# allow manual runs on branches without a PR
env:
FORCE_COLOR: "1"
jobs:
action-default-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
[
ubuntu-20.04,
ubuntu-22.04,
windows-2019,
windows-2022,
macos-11,
macos-12,
macos-13,
]
steps:
- uses: actions/checkout@v4
- uses: ./
- run: nox --non-interactive --error-on-missing-interpreter --session github_actions_default_tests
action-all-tests:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: ./
with:
python-versions: "3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, pypy-2.7, pypy-3.7, pypy-3.8, pypy-3.9, pypy-3.10"
- run: nox --non-interactive --error-on-missing-interpreter --session github_actions_all_tests
action-macos14-tests:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ./
with:
python-versions: "3.10, 3.11, 3.12, pypy-3.8, pypy-3.9, pypy-3.10"
- run: nox --non-interactive --error-on-missing-interpreter --session github_actions_macos_14
nox-2024.04.15/.github/workflows/ci.yml 0000664 0000000 0000000 00000007466 14607231724 0017453 0 ustar 00root root 0000000 0000000 name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
# allow manual runs on branches without a PR
env:
FORCE_COLOR: "1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: yezz123/setup-uv@v4
if: matrix.python-version != '3.7'
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
use-mamba: true
- name: Install Nox-under-test (uv)
if: matrix.python-version != '3.7'
run: uv pip install --system .
- name: Install Nox-under-test (pip)
if: matrix.python-version == '3.7'
run: python -m pip install --disable-pip-version-check .
- name: Run tests on ${{ matrix.os }} (tox <4)
run: nox --non-interactive --error-on-missing-interpreter --session "tests(python='${{ matrix.python-version }}', tox_version='<4')" -- --full-trace
- name: Run tox-to-nox tests on ${{ matrix.os }} (tox latest)
run: nox --non-interactive --error-on-missing-interpreter --session "tests(python='${{ matrix.python-version }}', tox_version='latest')" -- tests/test_tox_to_nox.py --full-trace
if: matrix.python-version != '3.7'
- name: Save coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-${{ github.job }}-${{ strategy.job-index }}
path: .coverage.*
coverage:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup uv
uses: yezz123/setup-uv@v4
- name: Install Nox-under-test
run: uv pip install --system .
- name: Download individual coverage reports
uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
- name: Display structure of downloaded files
run: ls -aR
- name: Run coverage
run: nox --non-interactive --session "cover"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install Nox-under-test
run: python -m pip install --disable-pip-version-check .
- name: Lint
run: nox --non-interactive --error-on-missing-interpreter --session "lint"
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Setup uv
uses: yezz123/setup-uv@v4
- name: Install Nox-under-test
run: uv pip install --system .
- name: Docs
run: nox --non-interactive --error-on-missing-interpreter --session "docs"
deploy:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- name: Build sdist and wheel
run: pipx run build
- name: Publish distribution PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
nox-2024.04.15/.gitignore 0000664 0000000 0000000 00000001656 14607231724 0014723 0 ustar 00root root 0000000 0000000 .mypy_cache/
.vscode/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
venv/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
.pytest_cache
nosetests.xml
coverage.xml
*,cover
.hypothesis/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
# Flask instance folder
instance/
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# IPython Notebook
.ipynb_checkpoints
# pyenv
.python-version
# PyCharm
.idea/
# Standard venv location
.venv
nox-2024.04.15/.pre-commit-config.yaml 0000664 0000000 0000000 00000002630 14607231724 0017205 0 ustar 00root root 0000000 0000000 ci:
autoupdate_commit_msg: "chore: update pre-commit hooks"
autoupdate_schedule: weekly
autofix_commit_msg: "style: pre-commit fixes"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.3.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.6.1
hooks:
- id: mypy
files: ^nox/
args: []
additional_dependencies:
- jinja2
- packaging
- importlib_metadata
- tomli
- uv
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-no-eval
exclude: ^nox/manifest.py$
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
nox-2024.04.15/.readthedocs.yml 0000664 0000000 0000000 00000000237 14607231724 0016013 0 ustar 00root root 0000000 0000000 version: 2
build:
os: ubuntu-20.04
tools:
python: "3.10"
python:
install:
- requirements: requirements-test.txt
- method: pip
path: .
nox-2024.04.15/CHANGELOG.md 0000664 0000000 0000000 00000064233 14607231724 0014544 0 ustar 00root root 0000000 0000000 # Changelog
## 2024.04.15
We'd like to thank the following folks who contributed to this release:
- @cjolowicz
- @henryiii
- @mayeut
New features:
* Added support for [PEP 723](https://peps.python.org/pep-0723/) (inline script metadata) with `nox.project.load_toml` by @henryiii in https://github.com/wntrblm/nox/pull/811
* Added support for `micromamba` by @henryiii in https://github.com/wntrblm/nox/pull/807
* Added `venv_backend` property to sessions by @henryiii in https://github.com/wntrblm/nox/pull/798
* Added the ability to use `None` to remove environment variables by @henryiii in https://github.com/wntrblm/nox/pull/812
* Added support for skipping sessions by default using `default=False` by @henryiii in https://github.com/wntrblm/nox/pull/810
## Bugfixes
* Use static arguments instead of `**kwargs` by @henryiii in https://github.com/wntrblm/nox/pull/815
* Do not depend on `pipx` in Nox GitHub action by @mayeut in https://github.com/wntrblm/nox/pull/768
* Disallow `UV_SYSTEM_PYTHON` by @henryiii in https://github.com/wntrblm/nox/pull/817
* Ensure 'uv' always works in a uv venv by @henryiii in https://github.com/wntrblm/nox/pull/818
* Look for `uv` next to `python` if it's not on `PATH` by @cjolowicz in https://github.com/wntrblm/nox/pull/795
* Fixed missing f-string in `--help` message by @cjolowicz in https://github.com/wntrblm/nox/pull/790
* Don't error if not installing to passthrough by @henryiii in https://github.com/wntrblm/nox/pull/809
* Avoid mixing `venv` and `conda` from environment by @henryiii in https://github.com/wntrblm/nox/pull/804
* Skip test for conda env when `conda` isn't installed by @cjolowicz in https://github.com/wntrblm/nox/pull/794
## 2024.03.02
We'd like to thank the following folks who contributed to this release:
- @DiddiLeija
- @MicaelJarniac
- @chrysle
- @edgarrmondragon
- @fazledyn-or
- @franekmagiera
- @frenzymadness
- @henryiii
- @johnthagen
- @mayeut
- @patrick91
- @q0w
- @samypr100
- @scop
- @stasfilin
- @stefanv
New Features:
* Add `uv` backend by @henryiii in https://github.com/wntrblm/nox/pull/762
* Add venv backend fallback by @henryiii in https://github.com/wntrblm/nox/pull/787
* Add option `--reuse-venv {yes,no,never,always}` by @samypr100 in https://github.com/wntrblm/nox/pull/730
* Add environment variable `NOX_DEFAULT_VENV_BACKEND` for default backend by @edgarrmondragon in https://github.com/wntrblm/nox/pull/780
* Rename `session.run_always` to `session.run_install` by @henryiii in https://github.com/wntrblm/nox/pull/770
* Add more option argument completions by @scop in https://github.com/wntrblm/nox/pull/707
* Implement `tox-to-nox` for tox 4 by @frenzymadness in https://github.com/wntrblm/nox/pull/687
* Allow `--force-python` on unparametrized sessions by @chrysle in https://github.com/wntrblm/nox/pull/756
* Add `include_outer_env` parameter to `session.run` and friends by @franekmagiera in https://github.com/wntrblm/nox/pull/652
* GitHub Action: Add support for the `~` version specifier by @mayeut in https://github.com/wntrblm/nox/pull/712
Bugfixes:
* Rebuild environment when changing to an incompatible backend type by @henryiii in https://github.com/wntrblm/nox/pull/781
* Warn user when first argument to `session.run` is a list by @stefanv in https://github.com/wntrblm/nox/pull/786
* Allow overriding `nox.options.sessions` with `--tags` by @q0w in https://github.com/wntrblm/nox/pull/684
* Allow overriding `NO_COLOR` with `--force-color` by @stasfilin in https://github.com/wntrblm/nox/pull/723
* Fix `nox.options.error_on_missing_interpreters` when running in CI by @samypr100 in https://github.com/wntrblm/nox/pull/725
Documentation Improvements:
* Create an official Nox badge by @johnthagen in https://github.com/wntrblm/nox/pull/714 and https://github.com/wntrblm/nox/pull/715
* Add recipe for generating a matrix with GitHub Actions by @henryiii in https://github.com/wntrblm/nox/pull/696
* Update some links by @henryiii in https://github.com/wntrblm/nox/pull/774
Internal Changes:
* fix: always pull versions from metadata by @henryiii in https://github.com/wntrblm/nox/pull/782
* chore: ruff moved to astral-sh by @henryiii in https://github.com/wntrblm/nox/pull/722
* Use double quotes instead of single in github actions examples by @patrick91 in https://github.com/wntrblm/nox/pull/724
* tests: fixes when running locally by @henryiii in https://github.com/wntrblm/nox/pull/721
* chore: modernize Ruff config, bump pre-commit by @henryiii in https://github.com/wntrblm/nox/pull/744
* chore(deps): bump actions/checkout from 3 to 4 by @dependabot in https://github.com/wntrblm/nox/pull/738
* chore: ruff-format by @henryiii in https://github.com/wntrblm/nox/pull/745
* chore(action): update default python-versions by @mayeut in https://github.com/wntrblm/nox/pull/767
* chore(ci): allow manual runs on branches without a PR by @mayeut in https://github.com/wntrblm/nox/pull/766
* chore(ci): bump actions/setup-python & conda-incubator/setup-miniconda by @mayeut in https://github.com/wntrblm/nox/pull/765
* ci: group dependabot updates by @henryiii in https://github.com/wntrblm/nox/pull/755
* fix(types): improve typing by @henryiii in https://github.com/wntrblm/nox/pull/720
* ci: fix coverage combine for different OS's by @henryiii in https://github.com/wntrblm/nox/pull/778
* ci: update to artifacts v2 by @henryiii in https://github.com/wntrblm/nox/pull/772
* ci: remove skipped job & combine (faster) by @henryiii in https://github.com/wntrblm/nox/pull/771
* chore: cleanup Ruff a bit by @henryiii in https://github.com/wntrblm/nox/pull/783
* chore(deps): bump the actions group with 2 updates by @dependabot in https://github.com/wntrblm/nox/pull/784
* style: add type hints, update few functions by @stasfilin in https://github.com/wntrblm/nox/pull/728
* Include Python 3.12 in GHA by @DiddiLeija in https://github.com/wntrblm/nox/pull/743
* Allow tests to pass in environments where NO_COLOR=1 is set by @edgarrmondragon in https://github.com/wntrblm/nox/pull/777
* tests: support running when the Python launcher for UNIX is present by @henryiii in https://github.com/wntrblm/nox/pull/775
* chore: drop unneeded config option by @henryiii in https://github.com/wntrblm/nox/pull/773
* Bump minimum virtualenv to 20.14.1 by @johnthagen in https://github.com/wntrblm/nox/pull/747
* chore: save session name in `Func` by @MicaelJarniac in https://github.com/wntrblm/nox/pull/718
* Removed the problematic Python 2.7.18 version by @stasfilin in https://github.com/wntrblm/nox/pull/726
* Fixed Improper Method Call: Replaced `NotImplementedError` by @fazledyn-or in https://github.com/wntrblm/nox/pull/749
## 2023.04.22
We'd like to thank the following folks who contributed to this release:
- @crwilcox
- @dcermak
- @edgarrmondragon
- @FollowTheProcess
- @henryiii
- @reaperhulk
- @scop
New Features:
- Add support for `NOXPYTHON`, `NOXEXTRAPYTHON` and `NOXFORCEPYTHON` by @edgarrmondragon in https://github.com/wntrblm/nox/pull/688
- feat: --json --list-sessions by @henryiii in https://github.com/wntrblm/nox/pull/665
Documentation Improvements:
- style: spelling and grammar fixes by @scop in https://github.com/wntrblm/nox/pull/682
- Add invite link to the discord server to CONTRIBUTING.md by @dcermak in https://github.com/wntrblm/nox/pull/679
Internal Changes:
- chore: update pre-commit hooks by @edgarrmondragon in https://github.com/wntrblm/nox/pull/690
- chore: move to using Ruff by @henryiii in https://github.com/wntrblm/nox/pull/691
- Fix assertion in GHA tests by @FollowTheProcess in https://github.com/wntrblm/nox/pull/670
- ci: some minor fixes by @henryiii in https://github.com/wntrblm/nox/pull/675
- Constrain tox to <4.0.0 and minor fixes by @FollowTheProcess in https://github.com/wntrblm/nox/pull/677
- chore: long term fix for bugbear opinionated checks by @henryiii in https://github.com/wntrblm/nox/pull/678
- chore: switch to hatchling by @henryiii in https://github.com/wntrblm/nox/pull/659
- Don't run python 2.7 virtualenv tests for newer versions of virtualenv by @crwilcox in https://github.com/wntrblm/nox/pull/702
- allow the use of argcomplete 3 by @reaperhulk in https://github.com/wntrblm/nox/pull/700
- fix: enable `list_sessions` for session completion by @scop in https://github.com/wntrblm/nox/pull/699
- chore: remove 3.6 tests, min version is 3.7 by @crwilcox in https://github.com/wntrblm/nox/pull/703
## 2022.11.21
We'd like to thank the following folks who contributed to this release:
- @airtower-luna
- @DiddiLeija
- @FollowTheProcess
- @henryiii
- @hynek
- @Julian
- @nhtsai
- @paw-lu
New features:
- Include Python 3.11 classifier & testing (#655)
Improvements:
- Fixed a few typos (#661, #660)
- Drop dependency on `py` (#647)
- `nox.session.run` now accepts a `pathlib.Path` for the command (#649)
- Document `nox.session.run`'s `stdout` and `stderr` arguments and add example of capturing output (#651)
Bugfixes:
- GitHub Action: replace deprecated set-output command (#668)
- GitHub Action: point docs to 2022.8.7 not latest (#664)
- Docs: fix argument passing in `session.posargs` example (#653)
- Include GitHub action helper in `MANIFEST.in` (#645)
Internal changes:
- GitHub Action: move to 3.11 final (#667)
- Cleanup Python 2 style code (#657)
- Update tools used in pre-commit (#646, #656)
## 2022.8.7
We'd like to thank the following folks who contributed to this release:
- @CN-M
- @crwilcox
- @DiddiLeija
- @edgarrmondragon
- @FollowTheProcess
- @hauntsaninja
- @henryiii
- @johnthagen
- @jwodder
- @ktbarrett
- @mayeut
- @meowmeowmeowcat
- @NickleDave
- @raddessi
- @zhanpon
Removals:
- Drop support for Python 3.6 (#526)
- Disable running `session.install` outside a venv (#580)
New features:
- Official Nox GitHub Action (#594, #606, #609, #620, #629, #637, #632, #633)
- Missing interpreters now error the session on CI by default (#567)
- Allow configurable child shutdown timeouts (#565)
- Add session tags (#627)
- Add short `-N` alias for `--no-reuse-existing-virtualenvs` (#639)
- Export session name in `NOX_CURRENT_SESSION` environment variable (#641)
Improvements:
- Add `VENV_DIR` to `dev` session in cookbook (#591)
- Fix typo in `tutorial.rst` (#586)
- Use consistent spelling for Nox in documentation (#581)
- Support descriptions in `tox-to-nox` (#575)
- Document that `silent=True` returns the command output (#578)
- Support argcomplete v2 (#564)
Bugfixes:
- Fix incorrect `FileNotFoundError` in `load_nox_module` (#571)
Internal changes:
- Update the classifiers, documentation, and more to point to the new Winterbloom location (#587)
- Support PEP 621 (`pyproject.toml`) (#616, #619)
- Configure language code to avoid warning on sphinx build (#626)
- Use latest GitHub action runners and include macOS (#613)
- Jazz up the README with some badges/logo etc. (#605, #614)
- Prefer type checking against Jinja2 (#610)
- Introduce GitHub issue forms (#600, #603, #608)
- Full strictness checking on mypy (#595, #596)
- Drop 99% coverage threshold flag for 3.10 in noxfile (#593)
- Create a `requirements-dev.txt` (#582)
- Use `myst-parser` for Markdown docs (#561)
## 2022.1.7
Claudio Jolowicz, Diego Ramirez, and Tom Fleet have become maintainers of Nox. We'd like to thank the following folks who contributed to this release:
- @brettcannon
- @cjolowicz
- @dhermes
- @DiddiLeija
- @FollowTheProcess
- @franekmagiera
- @henryiii
- @jugmac00
- @maciej-lech
- @nawatts
- @Tolker-KU
New features:
- Add `mamba` backend (#444, #448, #546, #551)
- Add `session.debug` to show debug-level messages (#489)
- Add cookbook page to the documentation (#483)
- Add support for the `FORCE_COLOR` environment variable (#524, #548)
- Allow using `session.chdir()` as a context manager (#543)
- Deprecate use of `session.install()` without a valid backend (#537)
Improvements:
- Test against Python 3.10 (#495, #502, #506)
- Add support for the `channel` option when using the `conda` backend (#522)
- Show more specific error message when the `--keywords` expression contains a syntax error (#493)
- Include reference to `session.notify()` in tutorial page (#500)
- Document how `session.run()` fails and how to handle failures (#533)
- Allow the list of sessions to be empty (#523)
Bugfixes:
- Fix broken temporary directory when using `session.chdir()` (#555, #556)
- Set the `CONDA_PREFIX` environment variable (#538)
- Fix `bin` directory for the `conda` backend on Windows (#535)
Internal changes:
- Replace deprecated `load_module` with `exec_module` (#498)
- Include tests with source distributions (#552)
- Add missing copyright notices (#509)
- Use the new ReadTheDocs configurations (#527)
- Bump the Python version used by ReadTheDocs to 3.8 (#496)
- Improve the Sphinx config file (#499)
- Update all linter versions (#528)
- Add pre-commit and new checks (#530, #539)
- Check `MANIFEST.in` during CI (#552)
- Remove redundant `LICENSE` from `MANIFEST.in` (#505)
- Make `setuptools` use the standard library's `distutils` to work around `virtualenv` bug. (#547, #549)
- Use `shlex.join()` when logging a command (#490)
- Use `shutil.rmtree()` over shelling out to `rm -rf` in noxfile (#519)
- Fix missing Python 3.9 CI session (#529)
- Unpin docs session and add `--error-on-missing-interpreter` to CI (#532)
- Enable color output from Nox, pytest, and pre-commit during CI (#542)
- Only run `conda_tests` session by default if user has conda installed (#521)
- Update dependencies in `requirements-conda-test.txt` (#536)
## 2021.10.1
New features:
- Add `session.warn` to output warnings (#482)
- Add a shared session cache directory (#476)
- Add `session.invoked_from` (#472)
Improvements:
- Conda logs now respect `nox.options.verbose` (#466)
- Add `session.notify` example to docs (#467)
- Add friendlier message if no `noxfile.py` is found (#463)
- Show the `noxfile.py` docstring when using `nox -l` (#459)
- Mention more projects that use Nox in the docs (#460)
Internal changes:
- Move configs into pyproject.toml or setup.cfg (flake8) (#484)
- Decouple `test_session_completer` from project level noxfile (#480)
- Run Flynt to convert str.format to f-strings (#464)
- Add python 3.10.0-rc2 to GitHub Actions (#475, #479)
- Simplify CI build (#461)
- Use PEP 517 build system, remove `setup.py`, use `setup.cfg` (#456, #457, #458)
- Upgrade to mypy 0.902 (#455)
Special thanks to our contributors:
- @henryiii
- @cjolowicz
- @FollowTheProcess
- @franekmagiera
- @DiddiLeija
## 2021.6.12
- Fix crash on Python 2 when reusing environments. (#450)
- Hide staleness check behind a feature flag. (#451)
- Group command-line options in `--help` message by function. (#442)
- Avoid polluting tests with a .nox directory. (#445)
## 2021.6.6
- Add option `--no-install` to skip install commands in reused environments. (#432)
- Add option `--force-python` as shorthand for `--python` and `--extra-python`. (#427)
- Do not reuse environments if the interpreter or the environment type has changed. (#418, #425, #428)
- Allow common variations in session names with parameters, such as double quotes instead of single quotes. Session names are considered equal if they produce the same Python AST. (#417, #434)
- Preserve the order of parameters in session names. (#401)
- Allow `@nox.parametrize` to select the session Python. (#413)
- Allow passing `posargs` when scheduling another session via `session.notify`. (#397)
- Prevent sessions from modifying each other's posargs. (#439)
- Add `nox.needs_version` to specify Nox version requirements. (#388)
- Add `session.name` to get the session name. (#386)
- Gracefully shutdown child processes. (#393)
- Decode command output using the system locale if UTF-8 decoding fails. (#380)
- Fix creation of Conda environments when `venv_params` is used. (#420)
- Various improvements to Nox's type annotations. (#376, #377, #378)
- Remove outdated notes on Windows compatibility from the documentation. (#382)
- Increase Nox's test coverage on Windows. (#300)
- Avoid mypy searching for configuration files in other directories. (#402)
- Replace AppVeyor and Travis CI by GitHub Actions. (#389, #390, #403)
- Allow colorlog <7.0.0. (#431)
- Drop contexter from test requirements. (#426)
- Upgrade linters to the latest version. (#438)
## 2020.12.31
- Fix `NoxColoredFormatter.format` (#374)
- Use conda remove to clean up existing conda environments (#373)
- Support users specifying an undeclared parametrization of python via `--extra-python` (#361)
- Support double-digit minor version in `python` keyword (#367)
- Add `py.typed` to `manifest.in` (#360)
- Update Nox to latest supported python versions. (#362)
- Decouple merging of `--python` with `nox.options` from `--sessions` and `--keywords` (#359)
- Do not merge command-line options in place (#357)
## 2020.8.22
- `conda_install` and `install` args are now automatically double-quoted when needed. (#312)
- Offline mode is now auto-detected by default by `conda_install`. This allows users to continue executing Nox sessions on already installed environments. (#314)
- Fix the default paths for Conda on Windows where the `python.exe` found was not the correct one. (#310)
- Add the `--add-timestamp` option (#323)
- Add `Session.run_always()`. (#331)
## 2020.5.24
- Add new options for `venv_backend`, including the ability to set the backend globally. (#326)
- Fix various typos in the documentation. (#325, #326, #281)
- Add `session.create_tmp`. (#320)
- Place all of Nox's command-line options into argparse groups. (#306)
- Add the `--pythons` command-line option to allow specifying which versions of Python to run. (#304)
- Add a significant amount of type annotations. (#297, #294, #290, #282, #274)
- Stop building universal wheels since we don't support Python 2. (#293)
- Add the ability to specify additional options for the virtualenv backend using `venv_params`. (#280)
- Prefer `importlib.metadata` for metadata loading, removing our dependency on `pkg_resources`. (#277)
- Add OmegaConf and Hydra to list of projects that use Nox. (#279)
- Use a more accurate error message, along with the cause, if loading of noxfile runs into error. (#272)
- Test against Python 3.8. (#270)
- Fix a syntax highlighting mistake in configuration docs. (#268)
- Use `stdout.isatty` to finalize color instead of `stdin.isatty`. (#267)
## 2019.11.9
- Fix example installation call for pip. (#259)
- Allow colorlog 4. (#257)
- Order Pythons in descending version in `appveyor.yml`. (#258)
- Add link to GitHub Action for Nox. (#255)
- Use double "\`" for inline code. (#254)
- Add types to `_option_set.py`. (#249)
- Add type hints to `tasks.py`. (#241)
- Fix typo (virtulenvs). (#247)
- Replace flake8 sorter with isort. (#242)
- Pass `VIRTUAL_ENV` environment variable to commands executed in a virtualenv. (#245)
- Fix docs to show correct list for parametrize. (#244)
- Add argcomplete dependency to conda test session. (#240)
## 2019.8.20
- Add `--verbose` for showing the output from all commands. (#174)
- Immediately exit if unknown arguments are passed. (#229)
- Document complex test_virtualenv fixtures. (#236)
- Resolve to interpreter 'python' in PATH if '--version' fits. (#224)
- Add shell autocomplete. (#228)
- Add `venv` as an option for `venv_backend`. (#231)
- Add gdbgui to list of projects. (#235)
- Add mypy to Nox's lint. (#230)
- Add pipx to projects that use Nox. (#225)
- Add `session(venv_backend='conda')` option to use Conda environments. (#217, #221)
- Document how to call builtins on Windows. (#223)
- Replace `imp.load_source()` with `importlib`. (#214)
- Fix incorrect type in docstring & replace old-style format string. (#213)
- Allow specifying `stdout` and `stderr` to `session.run`.
- Add Salt to the list of projects that use Nox. (#209)
- Remove Python 2-specific code. (#203, #208)
- Grammar fixes. (#205, 206, 207)
- Update Nox's `noxfile.py` to use python3.7. (#204)
## 2019.5.30
- Add interactive property to session. (#196)
- Promote contributors to maintainers, add Open Collective details. (#201)
- Fix funding external link. (#200)
- Refactor how Nox defines and process options. (#187)
- Fix typo in tutorial. (#194)
- Use 'pytest' instead of 'py.test' in examples and configuration. (#193)
- Fix some CSS issues on mobile. (#192)
- Use short form of virtualenv path when creating the virtualenv. (#191)
- Refresh tutorial and fixup small docs things. (#190)
- Add the ability to give parametrized sessions a custom ID. (#186)
- Make --list list all available sessions, not just the selected ones. (#185)
- Allow providing a friendlier CLI name to sessions. (#170)
- Add urllib3 to the list of projects that use Nox (#182)
- Fix documentation link for Docker Cloud vs Hub (#179)
## 2019.4.11
- Include changelog in documentation. (#177)
- Use the relative path of the virtualenv in the "creating virtualenv" log message. (#176)
- Allow not passing "--upgrade" to `session.install` and change its default behavior to not upgrade. (#172)
- Expand environment variables when loading the noxfile from provided path. (#171)
- Add documentation around using Docker to run Nox. (#164)
- Don't colour output if `NO_COLOR` is set. (#163)
- Fix tox casing to be consistent with their docs, remove `.`` from pytest. (#160)
- Update issue templates.
- Add CODE_OF_CONDUCT.md.
- Add --install-only flag to install dependencies without running anything (#153)
- Fix function name in docs. (#155)
- Allow silent argument to be set in `session.install`. (#157)
- Run sessions in the same order specified on the command line. (#152)
## 2018.10.17
- Fix bug where empty parametrized sessions would fail. (#151)
## 2018.10.15
- Hide the python interpreter on sessions with only one. (#148)
- Warn when programs not in the virtualenv are used, allow erroring and silencing the warning. (#147)
- Add --warn-on-external-run flag and the "external" keyword arg to session.run. (#147)
- Add nox.options which allows specifying command-line configuration in the Noxfile (#145)
- Add python_requires (>= 3.5) to setup.py.
## 2018.10.9
Breaking changes:
- Skip sessions with missing interpreters. Previously, missing interpreters would cause a failed session. Now they just cause a warning. The previous behavior can be used via `--error-on-missing-interpreters`. (#140)
New features:
- Add session.python property.
Other changes:
- Fix some warnings about escape sequences.
- Group command line args by usage for readability.
- Blacklist more Tox env vars in nox-to-tox.
- Documentation fixes, spelling, etc. (#134)
- Mention stickers in the contributors guide.
- Mention Invoke as a Nox alternative.
## 2018.9.14
- Check for ``NOXSESSION`` environment variable (#121)
- Fix typo in OpenCensus Python (#132)
- Add new documentation art created by Andrea Caprotti
- Add Python 3.7 to Travis CI (#129)
## 2018.8.28
Bugfixes:
* Adding `Session.__slots__`. (#128)
* Don't modify `Virtualenv.interpreter` in `_resolved_interpreter`. (#127)
* Fix tox-to-nox template.
* Add the ability to add descriptions to sessions. (#117)
* Using more specific regex in `_resolved_interpreter()`. (#119)
New features:
* Adding support for 32-bit binaries on Windows. (#100)
Internal/testing changes:
* Storing `platform.system()` as global in `nox.virtualenv`. (#124)
* Fix deploy script for Travis.
* Run docs on travis. (#122)
* Documentation style updates.
## 2018.8.23
**Heads up!** This is a very big release for Nox. Please read these release notes thoroughly and reach out to us on GitHub if you run into issues.
Breaking changes and other important notes:
* Nox is now published as "nox" on PyPI. This means that Nox is installed via `pip install nox` instead of `nox-automation`. Since the new release makes so many breaking changes, we won't be updating the old `nox-automation` package.
* Nox's configuration file is now called `noxfile.py` instead of `nox.py`.
* Nox no longer supports Python 2.7. You can still create and run Python 2.7 sessions, but Nox itself must be installed using Python 3.5+.
* Nox's behavior has been changed from *declarative* to *imperative*. Session actions now run immediately. Existing code to setup session virtualenv, such as `session.interpreter` **will break**! Please consult the documentation on how to use `@nox.session(python=[...])` to configure virtualenvs for sessions.
* Nox now uses calver for releases.
* Support for the legacy naming convention (for example, `session_tests`) has been removed.
Other changes:
* Update colorlog dependency range.
* Update installation command in contributing. (#101)
* Remove Python 2.x object inheritance. (#109)
* Fix python syntax error on docs. (#111)
* Show additional links on PyPI. (#108)
* Add contributors file. (#113)
* Run sphinx with -W option. (#115)
* Using `os.pathsep` instead of a hardcoded `':'`. (#105)
* Use a configuration file for readthedocs. (#107)
* Add 'py' alias for `nox.session(python=...)`.
* Fix processing of numeric Python versions that specify a patch version.
* Use Black to format code.
* Support invoking Nox using `python -m nox`.
* Produce better error message when sessions can't be found.
* Fix missing links in README.rst.
* Remove usage of future imports.
* Remove usage of six.
* Make session.install a simple alias for session.run.
* Refactor nox.command.Command as nox.command.run, reducing complexity.
* Add list of projects that use Nox.
* Use witchhazel pygments theme.
## v0.19.1
**Note**:: v0.19.1 was the last version released as "nox-automation" on PyPI. Subsequent releases are published as "nox".
* Updates copyright information and contact addresses. No code changes.
## v0.19.0
* Add missing parameter in docs (#89)
* Don't skip install commands when re-using existing virtualenvs. (#86)
* Add --nocolor and --forcecolor options (#85)
* Simulating `unittest.mock` backport in the Python 2 standard library. (#81)
* Fixing tox-to-nox docs reference. (#80)
* Removing patch of `py.exe` on AppVeyor. (#74)
* Adding Python 3.6 to AppVeyor. (#69)
* Adding AppVeyor badge to README. (#70)
## v0.18.2
* On Windows, use the `py.exe` [launcher][2] (e.g. `py.exe -2.7`) to locate
Python executables. ([#53][1])
## v0.18.1
* Fix Nox not returning a non-zero exit code on failure. (#55)
* Restore result and report output. (#57)
## v0.18.0
* Blacklist problematic virtualenv environment variables (#49)
* Use `python -m virtualenv` to invoke virtualenv (#47)
* Making sure all `Command`s use run in `__call__`. (#48)
* Addition of `session.notify`. (#39)
* Refactor the list of sessions into a manifest class. (#38)
* Changed some instances of session to be plural (#37)
* Small documentation updates (#36)
[1]: https://github.com/theacodes/nox/pull/53
[2]: https://docs.python.org/3/using/windows.html#launcher
nox-2024.04.15/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000006421 14607231724 0015525 0 ustar 00root root 0000000 0000000 # Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at me@thea.codes. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
nox-2024.04.15/CONTRIBUTING.md 0000664 0000000 0000000 00000004416 14607231724 0015161 0 ustar 00root root 0000000 0000000 # Contributing
Thank you for your interest in improving Nox. Nox is open-source under the
[Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) and welcomes contributions in the form of bug reports, feature requests, and pull requests.
Nox is hosted on [GitHub](https://github.com/wntrblm/nox).
## Support, questions, and feature requests
Feel free to file a bug or feature request on [GitHub](https://github.com/wntrblm/nox). If your question is more general or does not fit neatly into one of those categories, we also have a Nox channel on the [Winterbloom Discord server](https://discord.com/invite/UpfqghQ).
You should find a permalink to the invite when you raise a new issue on GitHub.
## Reporting issues
File a bug on [GitHub](https://github.com/wntrblm/nox). To help us figure out what's going on, please err on the
side of including lots of information, such as:
* Operating system.
* Python version.
* If possible, a minimal case that can reproduce the issue.
## Pull requests
* It's recommended to file a bug before starting work on anything. It'll allow
chance to talk it over with the owners and validate your approach.
* Nox maintains 100% test coverage. All pull requests must maintain this.
* Follow [pep8](https://pep8.org).
* Update documentation and tests if relevant.
* Ensure your changes pass Nox's tests and lint suites before pushing.
## Running tests
Nox runs its own tests (it's recursive!). The best thing to do is start with
a known-good Nox installation, e.g. from PyPI:
pip install --pre --upgrade nox
To just check for lint errors, run:
nox --session lint
To run against a particular Python version:
nox --session tests-3.6
nox --session tests-3.7
nox --session tests-3.8
nox --session tests-3.9
When you send a pull request the CI will handle running everything, but it is
recommended to test as much as possible locally before pushing.
## Getting a sticker
If you've contributed to Nox, you can get a cute little Nox sticker. Reach out to Thea at me@thea.codes to request one.
## Getting paid
Contributions to Nox can be expensed through [our Open Collective](https://opencollective.com/python-nox). The maintainers will let you know when and for how much you can expense contributions, but always feel free to ask.
nox-2024.04.15/LICENSE 0000664 0000000 0000000 00000026135 14607231724 0013737 0 ustar 00root root 0000000 0000000 Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
nox-2024.04.15/README.md 0000664 0000000 0000000 00000005524 14607231724 0014210 0 ustar 00root root 0000000 0000000
# Nox
[](https://github.com/wntrblm/nox)
[](https://github.com/wntrblm/nox)
[](https://pypi.python.org/pypi/nox)
[](https://github.com/wntrblm/nox)
[](https://github.com/wntrblm/nox)
[](https://github.com/wntrblm/nox/actions?query=workflow%3ACI)
[](https://pepy.tech/project/nox)
*Flexible test automation with Python*
* **Documentation:** [https://nox.readthedocs.io](https://nox.readthedocs.io)
* **Source Code:** [https://github.com/wntrblm/nox](https://github.com/wntrblm/nox)
## Overview
`nox` is a command-line tool that automates testing in multiple Python environments, similar to [tox][]. Unlike tox, Nox uses a standard Python file for configuration:
```python
import nox
@nox.session
def tests(session: nox.Session) -> None:
session.install("pytest")
session.run("pytest")
@nox.session
def lint(session: nox.Session) -> None:
session.install("flake8")
session.run("flake8", "--import-order-style", "google")
```
## Installation
Nox is designed to be installed globally (not in a project virtual environment), the recommended way of doing this is via [pipx], a tool designed to install python CLI programs whilst keeping them separate from your global or system python.
To install Nox with [pipx][]:
```shell
pipx install nox
```
You can also use [pip][] in your global python:
```shell
python3 -m pip install nox
```
You may want to user the [user-site][] to avoid messing with your Global python install:
```shell
python3 -m pip install --user nox
```
## Usage
### List all sessions
```shell
nox -l/--list
```
### Run all sessions
```shell
nox
```
### Run a particular session
```shell
nox -s/--session test
```
Checkout the [docs](https://nox.readthedocs.io) for more! 🎉
## Contributing
Nox is an open source project and welcomes contributions of all kinds, checkout the [contributing guide](CONTRIBUTING.md) for help on how to help us out!
All contributors must follow the [code of conduct](CODE_OF_CONDUCT.md) and be nice to one another! 😃
[tox]: https://tox.readthedocs.io
[pipx]: https://pypa.github.io/pipx/
[pip]: https://pip.pypa.io/en/stable/
[user-site]: https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-to-the-user-site
nox-2024.04.15/action.yml 0000664 0000000 0000000 00000004527 14607231724 0014733 0 ustar 00root root 0000000 0000000 name: Setup Nox
description: "Prepares all python versions for nox"
inputs:
python-versions:
description: "comma-separated list of python versions to install"
required: false
default: "3.8, 3.9, 3.10, 3.11, 3.12, pypy-3.9, pypy-3.10"
branding:
icon: package
color: blue
runs:
using: composite
steps:
- uses: actions/setup-python@v5
id: localpython
with:
python-version: "3.7 - 3.12"
update-environment: false
- name: "Validate input"
id: helper
run: >
'${{ steps.localpython.outputs.python-path }}' '${{ github.action_path }}/.github/action_helper.py' '${{ inputs.python-versions }}' >>${GITHUB_OUTPUT}
shell: bash
- uses: actions/setup-python@v5
id: allpython
with:
python-version: "${{ join(fromJSON(steps.helper.outputs.interpreters), '\n') }}"
allow-prereleases: true
- name: "Install nox"
run: |
import os
import shutil
import sys
import venv
from pathlib import Path
from subprocess import run
class EnvBuilder(venv.EnvBuilder):
def __init__(self):
super().__init__()
def setup_scripts(self, context):
pass
def post_setup(self, context):
super().post_setup(context)
self.bin_path = Path(context.env_exe).parent
run([sys.executable, "-m", "pip", "--python", context.env_exe, "install", r"${{ github.action_path }}"], check=True)
print("::group::Install nox")
nox_bin_path = Path(r"${{ runner.temp }}") / "nox"
if nox_bin_path.exists():
shutil.rmtree(nox_bin_path)
venv_path = Path(r"${{ runner.temp }}") / "nox-venv"
if venv_path.exists():
shutil.rmtree(venv_path)
builder = EnvBuilder()
builder.create(venv_path)
nox_path = [path for path in builder.bin_path.glob("nox*") if path.stem == "nox"][0]
nox_bin_path.mkdir()
try:
os.symlink(nox_path, nox_bin_path / nox_path.name)
except OSError:
shutil.copyfile(nox_path, nox_bin_path / nox_path.name)
with open(os.environ["GITHUB_PATH"], "at") as f:
f.write(f"{nox_bin_path}\n")
print("::endgroup::")
shell: "${{ steps.allpython.outputs.python-path }} -u {0}"
nox-2024.04.15/docs/ 0000775 0000000 0000000 00000000000 14607231724 0013653 5 ustar 00root root 0000000 0000000 nox-2024.04.15/docs/CHANGELOG.md 0000777 0000000 0000000 00000000000 14607231724 0017503 2../CHANGELOG.md ustar 00root root 0000000 0000000 nox-2024.04.15/docs/CONTRIBUTING.md 0000777 0000000 0000000 00000000000 14607231724 0020543 2../CONTRIBUTING.md ustar 00root root 0000000 0000000 nox-2024.04.15/docs/Makefile 0000664 0000000 0000000 00000016734 14607231724 0015326 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/nox.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/nox.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/nox"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/nox"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
nox-2024.04.15/docs/_static/ 0000775 0000000 0000000 00000000000 14607231724 0015301 5 ustar 00root root 0000000 0000000 nox-2024.04.15/docs/_static/alice-full.png 0000664 0000000 0000000 00014711376 14607231724 0020050 0 ustar 00root root 0000000 0000000 PNG
IHDR pHYs .# .#x?v
OiCCPPhotoshop ICC profile xڝSgTS=BKKoR RB&*! J!QEEȠQ,
!{kּ>H3Q5B.@
$p d!s# ~<<+" x M0B\t8K @zB @F&S