Skip to content

Commit

Permalink
uv and minor updates to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Jan 16, 2025
1 parent e8a1874 commit a93db0c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,26 @@ name: Test Suite Sanity Checking

on:
push:
branches-ignore:
- "wip*"
tags:
- "v*"
pull_request:
release:
types: [published]
schedule:
# Daily at 3:42, arbitrarily as a time that's possibly non-busy
- cron: "42 3 * * *"
workflow_dispatch:

jobs:
ci:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up nox
uses: wntrblm/nox@2024.10.09
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Run nox
run: nox
run: uvx nox
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
args: [--fix, lf]
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.9.1"
rev: "v0.9.2"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import nox

ROOT = Path(__file__).parent
TESTS = ROOT / "test_sanity.py"

nox.options.default_venv_backend = "uv|virtualenv"
nox.options.sessions = []


Expand Down Expand Up @@ -31,4 +33,4 @@ def style(session):
Check Python code style in the sanity test suite.
"""
session.install("ruff")
session.run("ruff", "check", ROOT, __file__)
session.run("ruff", "check", ROOT, TESTS, __file__)
8 changes: 1 addition & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[tool.isort]
combine_as_imports = true
from_first = true
include_trailing_comma = true
multi_line_output = 3

[tool.ruff]
line-length = 79

Expand All @@ -13,6 +7,7 @@ ignore = [
"A001", # It's fine to shadow builtins
"A002",
"A003",
"A005",
"ARG", # This is all wrong whenever an interface is involved
"ANN", # Just let the type checker do this
"B006", # Mutable arguments require care but are OK if you don't abuse them
Expand Down Expand Up @@ -50,7 +45,6 @@ ignore = [
"SIM300", # Not sure what heuristic this uses, but it's easily incorrect
"SLF001", # Private usage within this package itself is fine
"TD", # These TODO style rules are also silly
"UP007", # We support 3.8 + 3.9
]

[tool.ruff.lint.flake8-pytest-style]
Expand Down

0 comments on commit a93db0c

Please sign in to comment.