-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modernize packaging and CI (pyproject.toml, Tox, GHA)
- Loading branch information
Showing
11 changed files
with
164 additions
and
93 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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Pipeline | ||
|
||
on: push | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
env: | ||
- lint | ||
- format | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- run: pip install tox | ||
- run: tox run -e ${{ matrix.env }} | ||
|
||
test: | ||
needs: | ||
- check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- run: pip install tox | ||
- run: tox run -e py |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
""" | ||
A collection of Bootstrap static files. | ||
A collection of Bootstrap static files. Font Awesome. | ||
""" | ||
__author__ = 'Peter Bittner' | ||
__email__ = '[email protected]' | ||
__license__ = 'MIT' | ||
__url__ = 'https://github.com/bittner/django-bootstrap-static' | ||
__version__ = '5.3.3' | ||
|
||
__version__ = "5.3.3" |
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,5 @@ | ||
""" | ||
A collection of Bootstrap static files. | ||
A collection of Bootstrap static files. Font Awesome. | ||
""" | ||
__author__ = 'Peter Bittner' | ||
__email__ = '[email protected]' | ||
__license__ = 'MIT' | ||
__url__ = 'https://github.com/bittner/django-bootstrap-static' | ||
__version__ = '6.5.2' | ||
|
||
__version__ = "6.5.2" |
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
[build-system] | ||
build-backend = "setuptools.build_meta" | ||
requires = ["setuptools>=64", "setuptools_scm>=8"] | ||
|
||
[project] | ||
name = "django-bootstrap-static" | ||
dynamic = ["version"] | ||
description = "A collection of Bootstrap static files." | ||
readme = "README.rst" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "Peter Bittner", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Peter Bittner", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Intended Audience :: Developers", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent", | ||
"Framework :: Django", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 2", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", | ||
"Topic :: Utilities", | ||
"License :: OSI Approved :: MIT License", | ||
] | ||
keywords=[ | ||
"django", | ||
"staticfiles", | ||
"bootstrap", | ||
"jquery", | ||
"fontawesome", | ||
] | ||
|
||
[project.urls] | ||
source = "https://github.com/bittner/django-bootstrap-static" | ||
|
||
[tool.ruff] | ||
extend-exclude = [] | ||
extend-include = [] | ||
|
||
[tool.ruff.lint] | ||
extend-select = ["ALL"] | ||
extend-ignore = ["ANN", "D", "FBT002", "INP001", "Q000", "TRY200", "UP"] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"tests/*.py" = ["S101"] | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
packages = ["bootstrap", "fontawesome"] | ||
|
||
[tool.setuptools_scm] | ||
local_scheme = "no-local-version" |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""Functional tests.""" | ||
|
||
|
||
def test_imports(): | ||
"""Importing the package should work as described in the README.""" | ||
|
||
import bootstrap | ||
import fontawesome | ||
|
||
assert bootstrap.__version__ == "5.3.3" | ||
assert fontawesome.__version__ == "6.5.2" |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[tox] | ||
envlist = | ||
lint | ||
format | ||
py | ||
|
||
[testenv] | ||
description = Unit tests and test coverage | ||
deps = pytest | ||
commands = pytest {posargs} | ||
|
||
[testenv:clean] | ||
description = Remove bytecode and other debris | ||
skip_install = true | ||
deps = pyclean | ||
commands = pyclean {posargs:--debris .} | ||
|
||
[testenv:format] | ||
description = Ensure consistent code style (Ruff) | ||
skip_install = true | ||
deps = ruff | ||
commands = ruff format {posargs:--check --diff .} | ||
|
||
[testenv:lint] | ||
description = Lightening-fast linting (Ruff) | ||
skip_install = true | ||
deps = ruff | ||
commands = ruff check {posargs:--output-format=full .} | ||
|
||
[testenv:package] | ||
description = Build package and check metadata (or upload package) | ||
skip_install = true | ||
deps = | ||
build | ||
twine | ||
commands = | ||
python -m build | ||
twine {posargs:check --strict} dist/* | ||
passenv = | ||
TWINE_USERNAME | ||
TWINE_PASSWORD | ||
TWINE_REPOSITORY_URL |