-
-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to uv for building and packaging
Get dynamic version based on current tag
- Loading branch information
Showing
10 changed files
with
179 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Release | |
on: | ||
push: | ||
tags: | ||
- '*' | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
|
@@ -17,17 +17,17 @@ jobs: | |
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
python-version: "3.11" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U setuptools twine wheel | ||
curl -LsSf https://astral.sh/uv/install.sh | sh | ||
- name: Build package | ||
run: | | ||
python setup.py --version | ||
python setup.py sdist --format=gztar bdist_wheel | ||
twine check dist/* | ||
uv build | ||
uvx twine check dist/* | ||
- name: Upload packages to Jazzband | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/[email protected] | ||
|
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 |
---|---|---|
|
@@ -9,3 +9,7 @@ build/ | |
dist/ | ||
*.egg-info | ||
docs/_build | ||
|
||
uv.lock | ||
|
||
.envrc |
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,16 +1,17 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-20.04 | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.9" | ||
python: "3.11" | ||
|
||
commands: | ||
- asdf plugin add uv | ||
- asdf install uv latest | ||
- asdf global uv latest | ||
- mkdir -p $READTHEDOCS_OUTPUT/html/ | ||
- uv sync --group docs | ||
- uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html | ||
|
||
sphinx: | ||
configuration: docs/conf.py | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
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,10 +1,74 @@ | ||
[tool.black] | ||
line-length = 119 | ||
target-version = ["py37"] | ||
extend-exclude = "(^/django_fsm_log/migrations/.*$|^docs/.*$)" | ||
[project] | ||
license = { file = "LICENSE" } | ||
description = "Transition's persistence for django-fsm" | ||
name = "django-fsm-log" | ||
dynamic = ["version"] | ||
readme = "README.md" | ||
requires-python = ">=3.9" | ||
authors = [ | ||
{ name = "Gizmag", email = "[email protected]" }, | ||
{ name = "Various Contributors" }, | ||
] | ||
keywords = ["django", "django-fsm-2"] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Framework :: Django", | ||
"Framework :: Django :: 4.2", | ||
"Framework :: Django :: 5.0", | ||
"Framework :: Django :: 5.1", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3.13", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = ["django>=4.2", "django-fsm-2", "django_appconf"] | ||
|
||
[dependency-groups] | ||
dev = [ | ||
"pytest", | ||
"pytest-cov", | ||
"pytest-django", | ||
"pytest-mock", | ||
"tox", | ||
"tox-uv>=1.17.0", | ||
"twine", | ||
] | ||
ci = ["codecov>=2.1.13"] | ||
docs = ["sphinx", "sphinx_rtd_theme", "myst-parser"] | ||
|
||
[project.urls] | ||
Documentation = "https://django-fsm-log.readthedocs.io/en/latest/" | ||
Homepage = "https://github.com/jazzband/django-fsm-log" | ||
|
||
[build-system] | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.ruff] | ||
line-length = 119 | ||
target-version = "py37" | ||
select = ["E", "F", "I", "B", "C4", "T20", "TID", "UP"] | ||
exclude = ["django_fsm_log/migrations", ".tox", "build"] | ||
target-version = "py39" | ||
extend-exclude = ["django_fsm_log/migrations/", ".tox/", "build/", "docs/"] | ||
|
||
[tool.ruff.lint] | ||
select = ["E", "F", "I", "B", "C4", "T20", "TID", "UP", "DJ"] | ||
|
||
[tool.pytest.ini_options] | ||
markers = [ | ||
"ignore_article: Configure the settings DJANGO_FSM_LOG_IGNORED_MODELS to ignore Article Model.", | ||
"pending_objects: Install PendingStateLogManager on StateLog", | ||
] | ||
testpaths = ["tests"] | ||
pythonpath = ["."] | ||
DJANGO_SETTINGS_MODULE = "tests.settings" |
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