From 9600cb22c7597ed02505226f52c255d6c3e75f0a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 19:50:08 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 9 ++- .taplo.toml | 3 + pyproject.toml | 143 +++++++++++++++++++++++++++++++++++++++- setup.cfg | 111 ------------------------------- setup.py | 6 -- 5 files changed, 151 insertions(+), 121 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c119286..cb9df31b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,8 +37,6 @@ repos: - --repo-name=ampform-dpd - --repo-title=AmpForm-DPD - id: colab-toc-visible - - id: format-setup-cfg - - repo: https://github.com/nbQA-dev/nbQA rev: 1.7.0 hooks: @@ -126,3 +124,10 @@ repos: rev: v0.8.1 hooks: - id: taplo + + - repo: https://github.com/pappasam/toml-sort + rev: PLEASE-UPDATE + hooks: + - id: toml-sort + args: + - --in-place diff --git a/.taplo.toml b/.taplo.toml index f5caabee..424b7469 100644 --- a/.taplo.toml +++ b/.taplo.toml @@ -6,11 +6,14 @@ exclude = [ ] [formatting] +align_comments = false align_entries = false +allowed_blank_lines = 1 array_auto_collapse = false array_auto_expand = true array_trailing_comma = true column_width = 88 +compact_inline_tables = true indent_string = " " reorder_arrays = true reorder_keys = true diff --git a/pyproject.toml b/pyproject.toml index 8f30ef32..cf09e0c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [build-system] requires = [ - "setuptools>=36.2.1", # environment markers + "setuptools>=61.2", "setuptools_scm", - "wheel", ] +build-backend = "setuptools.build_meta" [tool.setuptools_scm] write_to = "src/ampform_dpd/version.py" @@ -188,3 +188,142 @@ ignore-names = [ [tool.ruff.pydocstyle] convention = "google" + +[tool.tomlsort] +all = false +ignore_case = true +in_place = true +sort_first = [ + "build-system", + "project", + "tool.setuptools", + "tool.setuptools_scm", +] +sort_table_keys = true +spaces_indent_inline_array = 4 +trailing_comma_inline_array = true + +[tool.setuptools] +package-dir = {"" = "src"} +include-package-data = false + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = false + +[tool.setuptools.package-data] +ampform_dpd = ["py.typed"] + +[project] +name = "ampform-dpd" +description = "Symbolic expressions for Dalitz-Plot Decomposition" +authors = [{name = "Common Partial Wave Analysis", email = "compwa-admin@ep1.rub.de"}] +license = {text = "GPLv3 or later"} +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "Intended Audience :: Education", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "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", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Physics", + "Typing :: Typed", +] +requires-python = ">=3.7" +dependencies = [ + "ampform ~=0.14.4", # Kibble and Kallen functions, perform_cached_doit + "attrs >=20.1.0", # on_setattr and https://www.attrs.org/en/stable/api.html#next-gen + "cloudpickle", + "sympy >=1.10", # module sympy.printing.numpy and array expressions with shape kwarg + "tensorwaves[jax]", + 'typing-extensions; python_version <"3.8.0"', +] +dynamic = ["version"] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Tracker = "https://github.com/ComPWA/ampform-dpd/issues" +Changelog = "https://github.com/ComPWA/ampform-dpd/releases" +Documentation = "https://compwa.github.io/ampform-dpd" +Source = "https://github.com/ComPWA/ampform-dpd" + +[project.optional-dependencies] +jax = [ + "tensorwaves[jax]", +] +numba = [ + "tensorwaves[numba]", +] +tf = [ + "tensorwaves[tf]", +] +tensorflow = [ + "ampform-dpd[tf]", +] +doc = [ + "graphviz", + "ipympl", + "ipywidgets", + 'importlib-metadata; python_version <"3.8.0"', + "matplotlib", + "myst-nb >=0.14", # nb_render_markdown_format for Markdown tables + "sphinx-book-theme", + "sphinx-codeautolink[ipython]", + "sphinx-copybutton", + "sphinx-design", + "sphinx-togglebutton", + "sphinxcontrib-bibtex", + "tensorwaves[phsp]", + "tqdm", +] +jupyter = [ + "ampform-dpd[doc]", + "jupyterlab >=3.0", + "jupyterlab-code-formatter", + "jupyterlab-lsp", + "jupyterlab-myst", + "python-lsp-server[rope]", + 'ypy-websocket <0.8.3; python_version <"3.8.0"', +] +test = [ + "nbmake", + 'nbmake <1.3; python_version <"3.8.0"', + "numpy", + "pytest >=6.0", # pyproject.toml + "pytest-cov", + "pytest-xdist", +] +format = [ + "black", +] +lint = [ + "ruff", +] +sty = [ + "ampform-dpd[format]", + "ampform-dpd[lint]", + "ampform-dpd[test]", # for pytest type hints + "docutils", + "pre-commit >=1.4.0", + "pybtex", + "sphinx", +] +dev = [ + "ampform-dpd[doc]", + "ampform-dpd[jupyter]", + "ampform-dpd[sty]", + "ampform-dpd[test]", + "sphinx-autobuild", + "tox >=1.9", # for skip_install, use_develop +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 5e4037b0..00000000 --- a/setup.cfg +++ /dev/null @@ -1,111 +0,0 @@ -[metadata] -name = ampform-dpd -description = Symbolic expressions for Dalitz-Plot Decomposition -author = Common Partial Wave Analysis -author_email = compwa-admin@ep1.rub.de -long_description = file: README.md -long_description_content_type = text/markdown -license = GPLv3 or later -project_urls = - Tracker = https://github.com/ComPWA/ampform-dpd/issues - Changelog = https://github.com/ComPWA/ampform-dpd/releases - Documentation = https://compwa.github.io/ampform-dpd - Source = https://github.com/ComPWA/ampform-dpd -classifiers = - Development Status :: 3 - Alpha - Intended Audience :: Developers - Intended Audience :: Education - Intended Audience :: Science/Research - License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+) - Natural Language :: English - Operating System :: OS Independent - Programming Language :: Python - 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 - Topic :: Scientific/Engineering - Topic :: Scientific/Engineering :: Physics - Typing :: Typed - -[options] -python_requires = >=3.7 -setup_requires = - setuptools_scm -install_requires = - ampform ~=0.14.4 # Kibble and Kallen functions, perform_cached_doit - attrs >=20.1.0 # on_setattr and https://www.attrs.org/en/stable/api.html#next-gen - cloudpickle - sympy >=1.10 # module sympy.printing.numpy and array expressions with shape kwarg - tensorwaves[jax] - typing-extensions; python_version <"3.8.0" -packages = find: -package_dir = - =src - -[options.extras_require] -jax = - tensorwaves[jax] -numba = - tensorwaves[numba] -tf = - tensorwaves[tf] -tensorflow = - %(tf)s -doc = - graphviz - ipympl - ipywidgets - importlib-metadata; python_version <"3.8.0" - matplotlib - myst-nb >=0.14 # nb_render_markdown_format for Markdown tables - sphinx-book-theme - sphinx-codeautolink[ipython] - sphinx-copybutton - sphinx-design - sphinx-togglebutton - sphinxcontrib-bibtex - tensorwaves[phsp] - tqdm -jupyter = - %(doc)s - jupyterlab >=3.0 - jupyterlab-code-formatter - jupyterlab-lsp - jupyterlab-myst - python-lsp-server[rope] - ypy-websocket <0.8.3; python_version <"3.8.0" -test = - nbmake - nbmake <1.3; python_version <"3.8.0" - numpy - pytest >=6.0 # pyproject.toml - pytest-cov - pytest-xdist -format = - black -lint = - ruff -sty = - %(format)s - %(lint)s - %(test)s # for pytest type hints - docutils - pre-commit >=1.4.0 - pybtex - sphinx -dev = - %(doc)s - %(jupyter)s - %(sty)s - %(test)s - sphinx-autobuild - tox >=1.9 # for skip_install, use_develop - -[options.packages.find] -where = src - -[options.package_data] -ampform_dpd = - py.typed diff --git a/setup.py b/setup.py deleted file mode 100644 index f7b80f8d..00000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -import setuptools - -setuptools.setup( - setup_requires=["setuptools_scm"], - use_scm_version=True, -)