-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mostly calling the correct phony from the makefile, refresh the README, and add a check for an expired lockfile chore: improve build, check and dependencies system I removed the following configurations: - tox.ini - requirements files - setup.py In favor of a unified build and dependency management system. Everything is configured inside the pyproject.toml and still accessible using the Makefile. Dependencies are locked in standard using uv with the uv.lock. Everything will now be managed through uv, all at once with a single user interface and a single tool. Please check the README for instructions Signed-off-by: Arno Dubois <[email protected]>
- Loading branch information
Showing
25 changed files
with
1,010 additions
and
1,533 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1,8 +1,14 @@ | ||
# ignore misc build/test files | ||
.env-lint | ||
# ignore uv venv | ||
.venv | ||
|
||
# ignore standard cache folders | ||
.*_cache | ||
|
||
# ignore built files | ||
hwbench.egg-info | ||
*.pyc | ||
.ruff-cache | ||
dist | ||
|
||
hwbench-out-* | ||
hwbench.egg-info | ||
.coverage | ||
junit-python*.xml |
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 |
---|---|---|
@@ -1,36 +1,33 @@ | ||
all: | ||
|
||
.PHONY: update_deps clean check format | ||
.PHONY: update_deps sync_deps clean check bundle format | ||
|
||
UPDATE_DEPS_ENV = .env-deps | ||
LINT_ENV = .env-lint | ||
SOURCES = hwbench csv graph | ||
|
||
SOURCES = hwbench setup.py csv graph | ||
update_deps: | ||
uv sync -U | ||
|
||
update_env: | ||
python3 -m venv $(UPDATE_DEPS_ENV) | ||
./$(UPDATE_DEPS_ENV)/bin/pip install --upgrade --quiet pip-tools | ||
|
||
update_deps: update_env | ||
./$(UPDATE_DEPS_ENV)/bin/pip-compile --upgrade --output-file=requirements/base.txt requirements/base.in | ||
./$(UPDATE_DEPS_ENV)/bin/pip-compile --upgrade --output-file=requirements/test.txt requirements/test.in | ||
|
||
regen_hashes: update_env | ||
./$(UPDATE_DEPS_ENV)/bin/pip-compile --output-file=requirements/base.txt requirements/base.in | ||
./$(UPDATE_DEPS_ENV)/bin/pip-compile --output-file=requirements/test.txt requirements/test.in | ||
sync_deps: | ||
uv sync --all-extras --dev | ||
|
||
clean: | ||
rm -fr $(UPDATE_DEPS_ENV) $(LINT_ENV) | ||
|
||
$(LINT_ENV): | ||
python3 -m venv $(LINT_ENV) | ||
./$(LINT_ENV)/bin/pip install -r requirements/test.txt | ||
|
||
check: $(LINT_ENV) | ||
env PYTHON=python3 ./$(LINT_ENV)/bin/tox | ||
|
||
bundle: $(LINT_ENV) | ||
env PYTHON=python3 ./$(LINT_ENV)/bin/tox -e bundle | ||
|
||
format: $(LINT_ENV) | ||
./$(LINT_ENV)/bin/ruff format $(SOURCES) | ||
uv venv | ||
|
||
check: | ||
uv tool run ruff format --diff $(SOURCES) | ||
uv tool run ruff check $(SOURCES) | ||
uv run mypy $(SOURCES) | ||
uv run pytest $(SOURCES) | ||
|
||
check_ci: | ||
@uv lock --locked || echo "Your lock file should change because you probably added a dependency or bump the minimal Python version, but this is not allowed in the CI. Please run `uv lock -U`" | ||
uv tool run ruff format --diff $(SOURCES) | ||
uv tool run ruff check --output-format=github $(SOURCES) | ||
uv run mypy $(SOURCES) | ||
uv run pytest $(SOURCES) | ||
|
||
bundle: | ||
uv build | ||
|
||
format: | ||
uv tool run ruff format $(SOURCES) |
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
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
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
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
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
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
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
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
Oops, something went wrong.