-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
29 changed files
with
1,040 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @gaborbernat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tidelift: pypi/tox-uv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
| Version | Supported | | ||
|---------| ------------------ | | ||
| 1.0.0 + | :white_check_mark: | | ||
| < 1.0.0 | :x: | | ||
|
||
## Reporting a Vulnerability | ||
|
||
To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift | ||
will coordinate the fix and disclosure. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
changelog: | ||
exclude: | ||
authors: | ||
- dependabot | ||
- pre-commit-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: check | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: ["main"] | ||
tags-ignore: ["**"] | ||
pull_request: | ||
schedule: | ||
- cron: "0 8 * * *" | ||
|
||
concurrency: | ||
group: check-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
name: test ${{ matrix.py }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
py: | ||
- "3.12" | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
- "3.8" | ||
steps: | ||
- name: setup python for tox | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install self | ||
run: python -m pip install . | ||
- uses: actions/checkout@v4 | ||
- name: setup python for test ${{ matrix.py }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.py }} | ||
- name: Pick environment to run | ||
run: | | ||
import codecs; import os; import sys | ||
env = "TOXENV=py{}{}\n".format(*sys.version_info[0:2]) | ||
print("Picked:\n{}for{}".format(env, sys.version)) | ||
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler: | ||
file_handler.write(env) | ||
shell: python | ||
- name: setup test suite | ||
run: tox -vv --notest | ||
- name: run test suite | ||
run: tox --skip-pkg-install | ||
|
||
check: | ||
name: tox env ${{ matrix.tox_env }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
tox_env: | ||
- type | ||
- dev | ||
- readme | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: setup Python 3.12 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install self | ||
run: python -m pip install . | ||
- name: run check for ${{ matrix.tox_env }} | ||
run: python -m tox -e ${{ matrix.tox_env }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Release to PyPI | ||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: release | ||
url: https://pypi.org/p/tox-uv | ||
permissions: | ||
id-token: write | ||
steps: | ||
- name: Setup python to build package | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- name: Install build | ||
run: python -m pip install build | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Build package | ||
run: pyproject-build -s -w . -o dist | ||
- name: Publish to PyPI | ||
uses: pypa/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/magic | ||
.idea | ||
*.egg-info | ||
.tox/ | ||
.coverage* | ||
coverage.xml | ||
.*_cache | ||
__pycache__ | ||
**.pyc | ||
/build | ||
dist | ||
src/tox_uv/version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.28.0 | ||
hooks: | ||
- id: check-github-workflows | ||
args: [ "--verbose" ] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
additional_dependencies: ["tomli>=2.0.1"] | ||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: "1.3.1" | ||
hooks: | ||
- id: tox-ini-fmt | ||
args: ["-p", "fix"] | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: "1.7.0" | ||
hooks: | ||
- id: pyproject-fmt | ||
additional_dependencies: ["tox>=4.12.1"] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: "v0.2.1" | ||
hooks: | ||
- id: ruff-format | ||
- id: ruff | ||
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] | ||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Permission is hereby granted, free of charge, to any person obtaining a | ||
copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included | ||
in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# tox-uv | ||
|
||
[![PyPI version](https://badge.fury.io/py/tox-uv.svg)](https://badge.fury.io/py/tox-uv) | ||
[![PyPI Supported Python Versions](https://img.shields.io/pypi/pyversions/tox-uv.svg)](https://pypi.python.org/pypi/tox-uv/) | ||
[![check](https://github.com/tox-dev/tox-uv/actions/workflows/check.yml/badge.svg)](https://github.com/tox-dev/tox-uv/actions/workflows/check.yml) | ||
[![Downloads](https://static.pepy.tech/badge/tox-uv/month)](https://pepy.tech/project/tox-uv) | ||
|
||
**tox-uv** is a tox plugin which replaces pip with uv in tox. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
[build-system] | ||
build-backend = "hatchling.build" | ||
requires = [ | ||
"hatch-vcs>=0.4", | ||
"hatchling>=1.21.1", | ||
] | ||
|
||
[project] | ||
name = "tox-uv" | ||
description = "Integration of uv into GitHub Actions." | ||
readme = "README.md" | ||
keywords = [ | ||
"environments", | ||
"isolated", | ||
"testing", | ||
"virtual", | ||
] | ||
license = "MIT" | ||
maintainers = [{ name = "Bernát Gábor", email = "[email protected]" }] | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Internet", | ||
"Topic :: Software Development :: Libraries", | ||
"Topic :: System", | ||
] | ||
dynamic = [ | ||
"version", | ||
] | ||
dependencies = [ | ||
"tox<5,>=4.12.1", | ||
"uv<1,>=0.1.1", | ||
] | ||
optional-dependencies.test = [ | ||
"covdefaults>=2.3", | ||
"devpi-process>=1", | ||
"pytest>=8", | ||
"pytest-cov>=4.1", | ||
"pytest-mock>=3.12", | ||
] | ||
urls.Documentation = "https://github.com/tox-dev/tox-uv#tox-uv" | ||
urls.Homepage = "https://github.com/tox-dev/tox-uv" | ||
urls.Source = "https://github.com/tox-dev/tox-uv" | ||
urls.Tracker = "https://github.com/tox-dev/tox-uv/issues" | ||
entry-points.tox = {"tox-uv" = "tox_uv.plugin"} | ||
|
||
[tool.hatch] | ||
build.hooks.vcs.version-file = "src/tox_uv/version.py" | ||
build.targets.sdist.include = ["/src", "/tests"] | ||
version.source = "vcs" | ||
|
||
[tool.black] | ||
line-length = 120 | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
target-version = "py38" | ||
lint.isort = { known-first-party = ["tox_uv", "tests"], required-imports = ["from __future__ import annotations"] } | ||
lint.select = ["ALL"] | ||
lint.ignore = [ | ||
"ANN101", # Missing type annotation for `self` in method | ||
"D301", # Use `r"""` if any backslashes in a docstring | ||
"D205", # 1 blank line required between summary line and description | ||
"D401", # First line of docstring should be in imperative mood | ||
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible | ||
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible | ||
"S104", # Possible binding to all interface | ||
"COM812", # Conflict with formatter | ||
"ISC001", # Conflict with formatter | ||
"CPY", # No copyriuvt statements | ||
"D", # no documentation for now | ||
] | ||
lint.preview = true | ||
format.preview = true | ||
format.docstring-code-format = true | ||
format.docstring-code-line-length = 100 | ||
[tool.ruff.lint.per-file-ignores] | ||
"tests/**/*.py" = [ | ||
"S101", # asserts allowed in tests... | ||
"FBT", # don"t care about booleans as positional arguments in tests | ||
"INP001", # no implicit namespace | ||
"D", # don"t care about documentation in tests | ||
"S603", # `subprocess` call: check for execution of untrusted input | ||
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable | ||
] | ||
|
||
[tool.codespell] | ||
builtin = "clear,usage,en-GB_to_en-US" | ||
write-changes = true | ||
count = true | ||
|
||
[tool.coverage] | ||
html.show_contexts = true | ||
html.skip_covered = false | ||
paths.source = ["src", ".tox/*/.venv/lib/*/site-packages", ".tox\\*\\.venv\\Lib\\site-packages", "**/src", "**\\src"] | ||
paths.other = [".", "*/tox_uv", "*\\tox_uv"] | ||
report.fail_under = 96 | ||
run.parallel = true | ||
run.plugins = ["covdefaults"] | ||
|
||
[tool.mypy] | ||
python_version = "3.11" | ||
show_error_codes = true | ||
strict = true | ||
overrides = [{ module = ["virtualenv.*"], ignore_missing_imports = true }] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
"""GitHub Actions integration.""" | ||
|
||
from __future__ import annotations | ||
|
||
from .version import version as __version__ | ||
|
||
__all__ = [ | ||
"__version__", | ||
] |
Oops, something went wrong.