-
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.
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
Arno Dubois
committed
Oct 28, 2024
1 parent
a930da3
commit 861403d
Showing
25 changed files
with
996 additions
and
1,530 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,26 @@ | ||
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 | ||
uv venv | ||
|
||
check: $(LINT_ENV) | ||
env PYTHON=python3 ./$(LINT_ENV)/bin/tox | ||
check: | ||
uv tool run ruff format --diff | ||
uv tool run ruff check | ||
uv run mypy $(SOURCES) | ||
uv run pytest | ||
|
||
bundle: $(LINT_ENV) | ||
env PYTHON=python3 ./$(LINT_ENV)/bin/tox -e bundle | ||
bundle: | ||
uv build | ||
|
||
format: $(LINT_ENV) | ||
./$(LINT_ENV)/bin/ruff format $(SOURCES) | ||
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.