Skip to content

Commit

Permalink
v0.3.0, upgrade packaging and CI conf
Browse files Browse the repository at this point in the history
  • Loading branch information
radiac committed Apr 14, 2024
1 parent 9ac5ca2 commit 07b5ba1
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 103 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
strategy:
matrix:
include:
- python: "3.10"
- python: "3.11"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@ jobs:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install --upgrade setuptools build wheel
- name: Build a binary wheel and a source tarball
run: |
python setup.py sdist bdist_wheel
python -m build --outdir=dist-pypi
- name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
packages-dir: dist-pypi/
2 changes: 1 addition & 1 deletion nanodjango/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .app import Django # noqa


__version__ = "0.1.3"
__version__ = "0.3.0"
95 changes: 95 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "nanodjango"
description = "Run Django models and views from a single file, and convert it to a full project."
dynamic = ["version"]
authors = [
{ name="Richard Terry", email="[email protected]" },
]
readme = "README.md"
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Django",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
keywords = ["django"]
requires-python = ">=3.8"
dependencies = [
"black",
"click",
"Django>=3.2",
"isort",
]

[project.scripts]
nanodjango = "nanodjango.commands:invoke"

[project.urls]
Homepage = "https://radiac.net/projects/nanodjango/"
Documentation = "https://nanodjango.readthedocs.io/en/latest/"
Changelog = "https://nanodjango.readthedocs.io/en/latest/changelog.html"
Repository = "https://github.com/radiac/nanodjango"
Issues = "https://github.com/radiac/nanodjango/issues"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
include = ["nanodjango*"]
exclude = ["docs*", "tests*", "examples*", "src*", "dist*"]

[tool.setuptools.dynamic]
version = {attr = "nanodjango.__version__"}

[tool.pytest.ini_options]
addopts = "--cov=nanodjango --cov-report=term --cov-report=html"
testpaths = [
"tests",
"nanodjango",
"examples",
]
pythonpath = ["."]

[tool.coverage.run]
source = ["nanodjango"]

[tool.black]
line-length = 88
target-version = ["py311"]
include = "\\.pyi?$"

[tool.isort]
multi_line_output = 3
line_length = 88
known_django = "django"
sections = ["FUTURE", "STDLIB", "DJANGO", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
include_trailing_comma = true
lines_after_imports = 2
skip = [".git"]

[tool.mypy]
follow_imports = "skip"
ignore_missing_imports = true

[tool.doc8]
max-line-length = 88
ignore-path = ["*.txt"]

[tool.ruff]
line-length = 88
select = ["E", "F"]
ignore = [
"E501", # line length
]
exclude = [
".git",
"docs",
"tests",
"src",
"dist",
]
73 changes: 0 additions & 73 deletions setup.cfg

This file was deleted.

19 changes: 0 additions & 19 deletions setup.py

This file was deleted.

0 comments on commit 07b5ba1

Please sign in to comment.