From 4bb0de9abc32dc61b68293d28539e1ef4de0799c Mon Sep 17 00:00:00 2001 From: Rust Saiargaliev Date: Fri, 28 Oct 2022 10:38:34 +0200 Subject: [PATCH] [draft] Attempt to move to pyproject.toml --- .editorconfig | 2 +- .gitignore | 3 ++ joeflow/__init__.py | 5 ++ pyproject.toml | 116 ++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 115 ------------------------------------------- setup.py | 4 -- 6 files changed, 125 insertions(+), 120 deletions(-) create mode 100644 pyproject.toml delete mode 100755 setup.py diff --git a/.editorconfig b/.editorconfig index c6068b3..98f72e2 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,7 +14,7 @@ max_line_length = 88 [*.py] max_line_length = 120 -[*.{yml, html, xml, xsl, json}] +[*.{yml, html, xml, xsl, json, toml}] indent_size = 2 [*.{css, less}] diff --git a/.gitignore b/.gitignore index 894a44c..46b330a 100644 --- a/.gitignore +++ b/.gitignore @@ -102,3 +102,6 @@ venv.bak/ # mypy .mypy_cache/ + +# flit +joeflow/_version.py diff --git a/joeflow/__init__.py b/joeflow/__init__.py index 90b064d..4e2716a 100644 --- a/joeflow/__init__.py +++ b/joeflow/__init__.py @@ -1,5 +1,10 @@ """The lean workflow automation framework for machines with heart.""" import django +from . import _version + +__version__ = _version.version +VERSION = _version.version_tuple + if django.VERSION < (3, 2): default_app_config = "joeflow.apps.JoeflowConfig" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..636062d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,116 @@ +[build-system] +requires = ["flit_core>=3.2", "flit_scm", "wheel"] +build-backend = "flit_scm:buildapi" + +[project] +name = "joeflow" +authors = [ + { name = "Johannes Maron", email = "johannes@maron.family" } +] +readme = "README.rst" +license = { file = "LICENSE" } +dynamic = ["version", "description"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: JavaScript", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "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", + "Framework :: Django", + "Framework :: Django :: 2.2", + "Framework :: Django :: 3.2", + "Framework :: Django :: 4.0", + "Topic :: Software Development", + "Topic :: Home Automation", + "Topic :: Internet", + "Topic :: Office/Business", + "Topic :: Office/Business :: Financial", + "Topic :: Office/Business :: Financial :: Accounting", + "Topic :: Office/Business :: Financial :: Investment", + "Topic :: Office/Business :: Financial :: Point-Of-Sale", + "Topic :: Office/Business :: Scheduling", + "Topic :: Software Development", +] +keywords = [ + "django", + "process", + "automation", + "workflow", + "framework", + "task", +] +requires-python = ">=3.8" +dependencies = [ + "django>=2.2", + "django-appconf", + "graphviz>=0.18", +] + +[project.optional-dependencies] +test = [ + "pytest", + "pytest-cov", + "pytest-django", + "pytest-env", + "redis", +] +docs = [ + "celery>=4.2.0", + "django-reversion", + "dramatiq", + "django_dramatiq", + "redis", +] +reversion = [ + "django-reversion", +] +celery = [ + "celery>=4.2.0", +] +dramatiq = [ + "dramatiq<=1.12.0", + "django_dramatiq", +] + +[project.urls] +Project-URL = "https://github.com/codingjoe/joeflow" + +[tool.flit.module] +name = "joeflow" + +[tool.setuptools_scm] +write_to = "joeflow/_version.py" + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "--cov=joeflow --doctest-modules" +testpaths = [ + "tests", +] +norecursedirs = "tests/testapp" +DJANGO_SETTINGS_MODULE = "tests.testapp.settings" +env = "D:DRAMATIQ_BROKER = dramatiq.brokers.stub.StubBroker" + +[tool.coverage.report] +show_missing = true + +[tool.isort] +atomic = true +line_length = 88 +known_first_party = "joeflow, tests" +include_trailing_comma = true +default_section = "THIRDPARTY" +combine_as_imports = true + +[tool.pydocstyle] +add_ignore = "D1" +match_dir = "(?!tests|env|docs|\\.).*" +match = "(?!setup).*.py" diff --git a/setup.cfg b/setup.cfg index 22d7804..8ff1522 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,125 +1,10 @@ -[metadata] -name = joeflow -author = Johannes Maron -author_email = johannes@maron.family -description = The lean workflow automation framework for machines with heart -long_description = file: README.rst -license = BSD -license_files = LICENSE -url = https://github.com/codingjoe/joeflow -# Find more classifiers here: -# https://pypi.org/pypi?%3Aaction=list_classifiers -classifier = - Development Status :: 5 - Production/Stable - Framework :: Django - Framework :: Django :: 2.2 - Framework :: Django :: 3.2 - Framework :: Django :: 4.0 - Environment :: Web Environment - License :: OSI Approved :: BSD License - Operating System :: OS Independent - Programming Language :: Python :: 3 - 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 - Topic :: Home Automation - Topic :: Internet - Topic :: Office/Business - Topic :: Office/Business :: Financial - Topic :: Office/Business :: Financial :: Accounting - Topic :: Office/Business :: Financial :: Investment - Topic :: Office/Business :: Financial :: Point-Of-Sale - Topic :: Office/Business :: Scheduling - Topic :: Software Development -keywords = - django - process - automation - workflow - framework - task - -[options] -python_requires = >=3.8 -include_package_data = True -packages = joeflow -install_requires = - django>=2.2 - django-appconf - graphviz>=0.18 -setup_requires = - setuptools_scm - sphinx - pytest-runner -tests_require = - pytest - pytest-cov - pytest-django - pytest-env - redis - -[options.extras_require] -test = - pytest - pytest-cov - pytest-django - pytest-env - redis -docs = - celery>=4.2.0 - django-reversion - dramatiq - django_dramatiq - redis -reversion = - django-reversion -celery = - celery>=4.2.0 -dramatiq = - dramatiq<=1.12.0 - django_dramatiq - -[bdist_wheel] -universal = 1 - -[aliases] -test = pytest - [build_sphinx] source-dir = docs build-dir = docs/_build project = joeflow copyright = 2018, Johannes Maron -[tool:pytest] -addopts = - tests - --doctest-modules - --cov=joeflow -DJANGO_SETTINGS_MODULE = tests.testapp.settings -norecursedirs = tests/testapp -env = - D:DRAMATIQ_BROKER = dramatiq.brokers.stub.StubBroker - -[coverage:report] -show_missing = true - -[pydocstyle] -add_ignore = D1 -match_dir = (?!tests|env|docs|\.).* -match = (?!setup).*.py - [flake8] max-line-length=88 select = C,E,F,W,B,B950 ignore = E203, E501, W503, E731 - -[isort] -atomic = true -line_length = 88 -known_first_party = joeflow, tests -include_trailing_comma = True -default_section=THIRDPARTY -combine_as_imports = true diff --git a/setup.py b/setup.py deleted file mode 100755 index 9ffe1e6..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env python -from setuptools import setup - -setup(name="joeflow", use_scm_version=True)