Skip to content

Commit

Permalink
replace setup.py with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
sheppard committed Jun 13, 2023
1 parent 4eecf38 commit 9499bb6
Show file tree
Hide file tree
Showing 26 changed files with 65 additions and 115 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,27 @@ jobs:
matrix:
variant: [default, spatialite, postgis]
python-version: ["3.11"]
django-version: [3.2.16, 4.1.3]
django-version: [3.2.19, 4.2.2]
drf-version: [3.14.0]
include:
- python-version: "3.11"
django-version: 3.2.16
drf-version: 3.12.4
variant: default
- python-version: "3.11"
django-version: 4.1.3
django-version: 4.2.2
drf-version: 3.14.0
variant: nonroot
- python-version: 3.9
django-version: 4.1.3
django-version: 4.2.2
drf-version: 3.14.0
variant: default
- python-version: 3.8
django-version: 4.1.3
django-version: 4.2.2
drf-version: 3.14.0
variant: default
- python-version: 3.7
django-version: 3.2.16
django-version: 3.2.19
drf-version: 3.14.0
variant: default
steps:
Expand All @@ -44,11 +44,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
python -m pip install flake8 pytest wheel
python -m pip install django==${{ matrix.django-version }}
python -m pip install djangorestframework==${{ matrix.drf-version }}
python -m pip install html-json-forms drf-writable-nested pystache
python -m pip install git+https://github.com/wq/django-natural-keys.git
python -m pip install .
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -74,4 +75,6 @@ jobs:
psql wqdb_test -c "CREATE EXTENSION postgis;"
python -m pip install "psycopg2-binary"
- name: Test with unittest
run: python setup.py test
run: python -m unittest discover -s tests -t . -v
- name: Test build
run: python -m build
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
*.sw?
build
dist
wq/
tests/media
wqdb_test.sqlite3
55 changes: 55 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]

[project]
name = "wq.db"
dynamic = ["version"]
authors = [
{name = "S. Andrew Sheppard", email = "andrew@wq.io"},
]
description = "Django REST API for offline mobile surveys and field data collection."
readme = "README.md"
requires-python = ">=3.7"
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Text Processing :: Markup :: HTML",
"Topic :: Scientific/Engineering :: GIS",
"Topic :: Database :: Database Engines/Servers",
]
dependencies = [
"Django>=1.11,<5.0",
"djangorestframework>=3.8.0,<4.0",
"html-json-forms",
"natural-keys>=1.6.0",
"drf-writable-nested",
"pystache",
]

[project.entry-points.wq]
"wq.db" = "wq.db"

[project.urls]
Homepage = "https://wq.io/wq.db/"
Documentation = "https://wq.io/"
Source = "https://github.com/wq/wq.db"
"Release Notes" = "https://github.com/wq/wq.db/releases"
Issues = "https://github.com/wq/wq.db/issues"
CI = "https://github.com/wq/wq.db/actions/workflows/test.yml"

[tool.setuptools_scm]
2 changes: 0 additions & 2 deletions runserver.sh

This file was deleted.

105 changes: 0 additions & 105 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 9499bb6

Please sign in to comment.