-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpixi.toml
More file actions
103 lines (78 loc) · 3.1 KB
/
Copy pathpixi.toml
File metadata and controls
103 lines (78 loc) · 3.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[activation.env]
PYTHONIOENCODING = "utf-8"
# The following is needed to resolve issues installing package
# from a local path in editable mode in the default environment. With src/
# included in PYTHONPATH, we use the source code directly in the first place,
# instead of the installed package.
PYTHONPATH = "$(pwd)/src${PYTHONPATH:+:$PYTHONPATH}"
[workspace]
# Platforms supported for the lock file (pixi.lock)
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
# Channels used to fetch packages
channels = ["conda-forge"]
##########
# FEATURES
##########
# Default feature configuration
[dependencies] # == [feature.default.dependencies]
pip = "*" # Required to install from PyPI
[pypi-dependencies] # == [feature.default.pypi-dependencies]
badgery = { git = "https://github.com/enhantica/badgery", extras = ["dev"] }
# Extra features for different Python versions
[feature.py313.dependencies]
python = "3.13.*"
# This feature installs Node.js and Prettier for formatting
# non-Python files.
[feature.nodejs.dependencies]
nodejs = "*" # Required for prettier; pinned to a stable LTS
##############
# ENVIRONMENTS
##############
[environments]
# The `default` environment is always included in the lock file, so it does not
# need to be specified explicitly in the environments section.
default = { features = ["py313", "nodejs"] }
wheel = { features = ["py313"] }
#######
# TASKS
#######
[tasks]
# 🧪 Testing Tasks
tests = "python -m pytest tests/ --color=yes -v"
# 🧹 Code Quality
## ✔️ Checks
pyproject-check = "python -m validate_pyproject pyproject.toml"
py-lint-check = "python -m ruff check ."
py-format-check = "python -m ruff format . --check"
nonpy-format-check = "npx prettier . --list-different --config=prettierrc.toml"
docs-format-check = "docformatter --check src/"
## 🛠️ Fixes
py-lint-fix = "python -m ruff check . --fix"
py-format-fix = "python -m ruff format ."
nonpy-format-fix = "npx prettier . --list-different --write --config=prettierrc.toml"
nonpy-format-fix-modified = "npx prettier $(git diff --name-only HEAD | grep -E '\\.(json|ya?ml|toml|md|css|html)$' || echo .) --list-different --write --config=prettierrc.toml"
docs-format-fix = "docformatter --in-place src/"
quality = { depends-on = [
"pyproject-check",
"py-format-fix",
"docs-format-fix",
"py-lint-fix",
"nonpy-format-fix-modified",
] }
# 🧮 Code Complexity
complexity-check = "radon cc -s src/"
complexity-check-json = "radon cc -s -j src/"
maintainability-check = "radon mi src/"
maintainability-check-json = "radon mi -j src/"
raw-metrics = "radon raw -s src/"
raw-metrics-json = "radon raw -s -j src/"
# 📊 Coverage
tests-cov = "pixi run tests --cov=src/badgery --cov-report=term-missing"
docstring-cov = "interrogate -c pyproject.toml src/"
coverage = "pixi run docstring-cov || true; pixi run tests-cov || true"
# 🚀 Development & Build Tasks
pre-commit = { depends-on = ["quality", "coverage"] }
dist-build = "python -m build --wheel --outdir dist"
spdx-update = "python tools/update_spdx.py"
prettier-install = "npm install --no-save --no-audit --no-fund prettier prettier-plugin-toml"
badgery = "python -m badgery"