@@ -19,6 +19,14 @@ test: ## Test the code with pytest.
19
19
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
20
20
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
21
21
22
+ .PHONY : docs-test
23
+ docs-test : # # Test if documentation can be built without warnings or errors
24
+ @uv run mkdocs build -s
25
+
26
+ .PHONY : docs
27
+ docs : # # Build and serve the documentation
28
+ @uv run mkdocs serve
29
+
22
30
.PHONY : build
23
31
build : clean-build # # Build wheel file
24
32
@echo " 🚀 Creating wheel file"
@@ -29,23 +37,27 @@ clean-build: ## Clean build artifacts
29
37
@echo " 🚀 Removing build artifacts"
30
38
@uv run python -c " import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
31
39
32
- .PHONY : publish
33
- publish : # # Publish a release to PyPI.
34
- @echo " 🚀 Publishing: Dry run. "
35
- @uvx --from build pyproject-build --installer uv
36
- @echo " 🚀 Publishing. "
37
- @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/ *
40
+ .PHONY : tag
41
+ tag : # # Add a Git tag and push it to origin with syntax: make tag TAG=tag_name
42
+ @echo " 🚀 Creating git tag: ${TAG} "
43
+ @git tag -a ${TAG}
44
+ @echo " 🚀 Pushing tag to origin: ${TAG} "
45
+ @git push origin ${TAG}
38
46
39
- .PHONY : build-and-publish
40
- build-and-publish : build publish # # Build and publish.
47
+ .PHONY : validate-tag
48
+ validate-tag : # # Check to make sure that a tag exists for the current HEAD and it looks like a valid version number
49
+ @echo " 🚀 Validating version tag"
50
+ @uv run inv validatetag
41
51
42
- .PHONY : docs-test
43
- docs-test : # # Test if documentation can be built without warnings or errors
44
- @uv run mkdocs build -s
52
+ .PHONY : publish-test
53
+ publish-test : validatetag build # # Test publishing a release to PyPI.
54
+ @echo " 🚀 Publishing: Dry run."
55
+ @uvx twine upload --repository testpypi dist/*
45
56
46
- .PHONY : docs
47
- docs : # # Build and serve the documentation
48
- @uv run mkdocs serve
57
+ .PHONY : publish
58
+ publish : validatetag build # # Publish a release to PyPI.
59
+ @echo " 🚀 Publishing."
60
+ @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
49
61
50
62
.PHONY : help
51
63
help :
0 commit comments