Skip to content

Commit

Permalink
refactor: add pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
afuetterer committed Aug 4, 2023
1 parent 3f5dc8d commit 647507b
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
db-backend: [mysql, postgres, sqlite3]
python-version: ['3.6', '3.11']

python-version: ['3.6', '3.7', '3.11']
fail-fast: false # TODO: just to demonstrate 3.6 is failing, but 3.7-3.11 are passing
services:
postgres:
image: postgres:latest
Expand All @@ -39,10 +39,7 @@ jobs:
python -m pip install --upgrade pip
- name: Install RDMO
run: |
pip install -e .
pip install psycopg2-binary
pip install mysqlclient
pip install coveralls
pip install -e .[mysql,postgres,ci]
- name: Prepare Env
run: |
cp testing/config/settings/${{ matrix.db-backend }}.py testing/config/settings/local.py
Expand Down
File renamed without changes.
100 changes: 100 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[project]
name = "rdmo"
authors = [
{name = "RDMO Arbeitsgemeinschaft", email = "[email protected]"},
]
maintainers = [
{name = "RDMO Arbeitsgemeinschaft", email = "[email protected]"},
]
description = "RDMO is a tool to support the systematic planning, organisation and implementation of the data management throughout the course of a research project."
readme = "README.md"
requires-python = ">=3.6" # TODO: EOL 2021-12-23
keywords = [
"rdmo",
"research data",
"research data management",
"data management plan",
"dmp",
]
license = {text = "Apache-2.0"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django :: 3.2",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6", # TODO: EOL 2021-12-23
"Programming Language :: Python :: 3.7", # TODO: EOL 2023-06-27
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
]
dependencies = [
"defusedcsv~=2.0.0",
"defusedxml~=0.7.1",
"Django~=3.2.14",
"django-allauth~=0.51.0",
"django-cleanup~=6.0.0",
"django-compressor~=4.1", # 4.2 drops Python 3.6 and 3.7 support, https://django-compressor.readthedocs.io/en/stable/changelog.html#v4-2-2023-01-06
"django-extensions~=3.2.0",
"django-filter~=21.1",
"django-libsass==0.9",
"django-mathfilters~=1.0.0",
"django-mptt~=0.13.4",
"django-rest-swagger~=2.2.0",
"django-settings-export~=1.2.1",
"django-widget-tweaks~=1.4.8",
"djangorestframework~=3.12.4",
"drf-extensions~=0.7.0",
"iso8601~=1.1.0", # 2.0.0 drops Python 3.6 support, https://github.com/micktwomey/pyiso8601/blob/main/CHANGELOG.md
"Markdown~=3.3.7",
"pypandoc~=1.8.1",
"rules~=3.3.0",
]
dynamic = ["version"]

[project.optional-dependencies]
mysql = ["mysqlclient~=2.1.0"] # 2.2.0 drops Python 3.7 support, https://github.com/PyMySQL/mysqlclient/blob/main/HISTORY.rst#whats-new-in-220
postgres = ["psycopg2-binary~=2.9.6"]
tests = [
"pytest~=7.0.0", # 7.1.0 drops Python 3.6 support, https://docs.pytest.org/en/stable/changelog.html#pytest-7-1-0-2022-03-13
"pytest-cov~=4.1.0",
"pytest-django~=4.5.2",
"pytest-dotenv~=0.5.2",
"pytest-mock~=3.6.1", # 3.7.0 drops Python 3.6 support, https://pytest-mock.readthedocs.io/en/latest/changelog.html
]
dev = [
"rdmo[tests]",
"pre-commit",
]
ci = [
"rdmo[dev]",
"coveralls",
]

[project.urls]
Homepage = "https://rdmorganiser.github.io/"
Documentation = "https://rdmo.readthedocs.io"
Repository = "https://github.com/rdmorganiser/rdmo.git"
Changelog = "https://github.com/rdmorganiser/rdmo/blob/master/CHANGELOG.md"

[tool.setuptools]
packages = ["rdmo"]

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

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "config.settings"
testpaths = ["rdmo"]
python_files = "test_*.py"
pythonpath = [".", "testing"]

0 comments on commit 647507b

Please sign in to comment.