Skip to content

Commit 2213ac8

Browse files
committed
replace makefile with justfile
1 parent f784d88 commit 2213ac8

File tree

2 files changed

+75
-54
lines changed

2 files changed

+75
-54
lines changed

β€ŽJustfileβ€Ž

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# =============================================================================
2+
# ⭐ DEFAULT
3+
# =============================================================================
4+
# If you run `just` you should get the options available, not a full install of the package
5+
6+
default:
7+
@just --list
8+
9+
# =============================================================================
10+
# πŸ” CODE QUALITY & TESTING
11+
# =============================================================================
12+
# These commands check your code quality and run tests
13+
14+
# Run code quality tools
15+
check:
16+
echo "πŸš€ Checking lock file consistency with 'pyproject.toml'"
17+
uv lock --locked
18+
echo "πŸš€ Linting code: Running pre-commit"
19+
uv run pre-commit run -a
20+
echo "πŸš€ Static type checking: Running mypy"
21+
uv run mypy
22+
echo "πŸš€ Checking for obsolete dependencies: Running deptry"
23+
uv run deptry .
24+
25+
# Test the code with pytest
26+
test:
27+
echo "πŸš€ Testing code: Running pytest"
28+
uv run python -m pytest --doctest-modules
29+
30+
# =============================================================================
31+
# πŸ“š DOCUMENTATION
32+
# =============================================================================
33+
# These commands help you build and serve project documentation
34+
35+
# Test if documentation can be built without warnings or errors
36+
docs-test:
37+
uv run mkdocs build -s
38+
39+
# Build and serve the documentation
40+
docs:
41+
uv run mkdocs serve
42+
43+
# =============================================================================
44+
# πŸ“¦ BUILD & RELEASE
45+
# =============================================================================
46+
# These commands build your package and publish it to PyPI
47+
48+
# Clean build artifacts
49+
clean-build:
50+
echo "πŸš€ Removing build artifacts"
51+
uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
52+
53+
# Build wheel file
54+
build: clean-build
55+
echo "πŸš€ Creating wheel file"
56+
uvx --from build pyproject-build --installer uv
57+
58+
# Publish a release to PyPI
59+
publish:
60+
echo "πŸš€ Publishing."
61+
uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
62+
63+
# Build and publish
64+
build-and-publish: build publish
65+
66+
# =============================================================================
67+
# πŸ—οΈ DEVELOPMENT ENVIRONMENT SETUP
68+
# =============================================================================
69+
# These commands help you set up your development environment
70+
71+
# Install the virtual environment and install the pre-commit hooks
72+
install:
73+
echo "πŸš€ Creating virtual environment using uv"
74+
uv sync
75+
uv run pre-commit install

β€ŽMakefileβ€Ž

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

0 commit comments

Comments
Β (0)