Skip to content

Commit 5a59c1d

Browse files
authored
PWSH -> nox
Signed-off-by: GitHub <[email protected]>
1 parent 70ee6c1 commit 5a59c1d

File tree

5 files changed

+54
-126
lines changed

5 files changed

+54
-126
lines changed

.devcontainer/devcontainer-lock.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
{
22
"features": {
3-
"ghcr.io/devcontainers/features/powershell:1": {
4-
"version": "1.3.5",
5-
"resolved": "ghcr.io/devcontainers/features/powershell@sha256:0dd4e0352cc77ef586f7cca2414d3e8a7c506ad6df9ecd2221d078a961425bd6",
6-
"integrity": "sha256:0dd4e0352cc77ef586f7cca2414d3e8a7c506ad6df9ecd2221d078a961425bd6"
7-
},
83
"ghcr.io/devcontainers/features/python:1": {
94
"version": "1.6.1",
105
"resolved": "ghcr.io/devcontainers/features/python@sha256:d449aea663ea23ac4a7968719d5920dd57128f0429cd8e216849d5afe67651fb",

.devcontainer/devcontainer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"ghcr.io/devcontainers/features/python:1": {
55
"version": "3.12",
66
"installTools": false
7-
},
8-
"ghcr.io/devcontainers/features/powershell:1": {}
7+
}
98
}
109
}

make.ps1

Lines changed: 0 additions & 119 deletions
This file was deleted.

noxfile.py

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
"""Noxfile."""
2+
3+
import shutil
4+
from pathlib import Path
5+
6+
import nox
7+
8+
nox.options.default_venv_backend = "none"
9+
nox.options.sessions = ["lints"]
10+
11+
12+
CLEANABLE_TARGETS = [
13+
"./dist",
14+
"./build",
15+
"./.nox",
16+
"./.coverage",
17+
"./.coverage.*",
18+
"./coverage.json",
19+
"./**/.mypy_cache",
20+
"./**/.pytest_cache",
21+
"./**/__pycache__",
22+
"./**/*.pyc",
23+
"./**/*.pyo",
24+
]
25+
26+
27+
@nox.session
28+
def tests(session: nox.Session) -> None:
29+
"""Run tests."""
30+
session.run("pytest")
31+
32+
33+
@nox.session
34+
def lints(session: nox.Session) -> None:
35+
"""Run lints."""
36+
session.run("pre-commit", "run", "--all-files")
37+
session.run("ruff", "format", ".")
38+
session.run("ruff", "check", "--fix", ".")
39+
session.run("mypy", "--strict", "src/")
40+
41+
42+
@nox.session
43+
def clean(_: nox.Session) -> None:
44+
"""Clean cache, .pyc, .pyo, and test/build artifact files from project."""
45+
count = 0
46+
for searchpath in CLEANABLE_TARGETS:
47+
for filepath in Path().glob(searchpath):
48+
if filepath.is_dir():
49+
shutil.rmtree(filepath)
50+
else:
51+
filepath.unlink()
52+
count += 1

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ documentation = "https://docs.letsbuilda.dev/letsbuilda-pypi/"
2020
[project.optional-dependencies]
2121
dev = [
2222
"pre-commit",
23+
"nox",
2324
"ruff",
2425
"mypy",
2526
"types-xmltodict",

0 commit comments

Comments
 (0)