From bf08709a89e4cf23b1a6159c3816c0348daeebc9 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:48:45 +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 | 154 +++++++++++++++++++++++++++++++++++++++- setup.cfg | 124 -------------------------------- setup.py | 6 -- 5 files changed, 162 insertions(+), 134 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cf4ac6c0..4b33e64e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,8 +50,6 @@ repos: - --repo-title=PWA Pages - id: colab-toc-visible - id: fix-nbformat-version - - id: format-setup-cfg - - repo: https://github.com/nbQA-dev/nbQA rev: 1.7.0 hooks: @@ -165,6 +163,13 @@ repos: hooks: - id: taplo + - repo: https://github.com/pappasam/toml-sort + rev: PLEASE-UPDATE + hooks: + - id: toml-sort + args: + - --in-place + - repo: local hooks: - id: update-json-schema 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 0af3f472..be45127a 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/pwa_pages/version.py" @@ -208,3 +208,153 @@ task-tags = ["cspell"] [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] +pwa_pages = ["py.typed"] + +[project] +name = "PWA-pages" +authors = [{name = "Common Partial Wave Analysis", email = "compwa-admin@ep1.rub.de"}] +maintainers = [{email = "compwa-admin@ep1.rub.de"}] +description = "A central knowledge-base for Partial Wave Analysis" +license = {text = "GPLv3 or later"} +keywords = [ + "HEP", + "PWA", + "amplitude analysis", + "partial wave analysis", + "particle physics", + "particles", + "physics", +] +classifiers = [ + "Development Status :: 2 - Pre-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 = [ + "attrs >=17.3.0", # auto_attribs + "pydantic", + "PyGithub", + "pytablewriter[html]", + "python-dateutil", + "python-gitlab", + "PyYAML", +] +dynamic = ["version"] + +[project.readme] +file = "README.md" +content-type = "text/markdown" + +[project.urls] +Tracker = "https://github.com/ComPWA/PWA-pages/issues" +Changelog = "https://github.com/ComPWA/PWA-pages/releases" +Documentation = "https://pwa.rtfd.io" +Source = "https://github.com/ComPWA/PWA-pages" + +[project.optional-dependencies] +doc = [ + "docutils <0.18", # https://github.com/executablebooks/jupyter-book/issues/2026#issuecomment-1636657741 + "feynman", + 'importlib-metadata; python_version <"3.8.0"', + "ipywidgets", + "jupyter", + "matplotlib", + "myst-nb >=0.11", # myst_enable_extensions + "numpy <1.24", # bug in feynman: https://github.com/ComPWA/PWA-pages/actions/runs/3868808372/jobs/6594501436#step:6:177 + "Sphinx >=3", + "sphinx-book-theme", + "sphinx-codeautolink[ipython]", + "sphinx-comments", + "sphinx-copybutton", + "sphinx-design", + "sphinx-hep-pdgref", + "sphinx-thebe", + "sphinx-togglebutton", + "sphinxcontrib-bibtex >=2.2", # bibtex_reference_style + "sympy", +] +test = [ + "pytest", + "pytest-cov", + "pytest-xdist", +] +format = [ + "black", +] +mypy = [ + "mypy >=0.730", # error code support + "types-docutils", + "types-pkg-resources", + "types-python-dateutil", + "types-PyYAML", + "types-setuptools", +] +lint = [ + "PWA-pages[mypy]", + "ruff", +] +sty = [ + "PWA-pages[format]", + "PWA-pages[lint]", + "PWA-pages[test]", # for pytest type hints + "pre-commit >=1.4.0", +] +jupyter = [ + "PWA-pages[doc]", + "jupyterlab", + "jupyterlab-code-formatter", + "jupyterlab-lsp", + "jupyterlab-myst", + "python-lsp-server[rope]", + 'ypy-websocket <0.8.3; python_version <"3.8.0"', +] +dev = [ + "PWA-pages[doc]", + "PWA-pages[jupyter]", + "PWA-pages[sty]", + "PWA-pages[test]", + "sphinx-autobuild", + "tox >=1.9", # for skip_install, use_develop +] + +[project.scripts] +export-json-schema = "pwa_pages.project_inventory:export_json_schema" + diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index d9ed0b04..00000000 --- a/setup.cfg +++ /dev/null @@ -1,124 +0,0 @@ -[metadata] -name = PWA-pages -author = Common Partial Wave Analysis -author_email = compwa-admin@ep1.rub.de -maintainer_email = compwa-admin@ep1.rub.de -description = A central knowledge-base for Partial Wave Analysis -long_description = file: README.md -long_description_content_type = text/markdown -project_urls = - Tracker = https://github.com/ComPWA/PWA-pages/issues - Changelog = https://github.com/ComPWA/PWA-pages/releases - Documentation = https://pwa.rtfd.io - Source = https://github.com/ComPWA/PWA-pages -license = GPLv3 or later -keywords = - HEP - PWA - amplitude analysis - partial wave analysis - particle physics - particles - physics -classifiers = - Development Status :: 2 - Pre-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 = - attrs >=17.3.0 # auto_attribs - pydantic - PyGithub - pytablewriter[html] - python-dateutil - python-gitlab - PyYAML -packages = find: -package_dir = - =src - -[options.extras_require] -doc = - docutils <0.18 # https://github.com/executablebooks/jupyter-book/issues/2026#issuecomment-1636657741 - feynman - importlib-metadata; python_version <"3.8.0" - ipywidgets - jupyter - matplotlib - myst-nb >=0.11 # myst_enable_extensions - numpy <1.24 # bug in feynman: https://github.com/ComPWA/PWA-pages/actions/runs/3868808372/jobs/6594501436#step:6:177 - Sphinx >=3 - sphinx-book-theme - sphinx-codeautolink[ipython] - sphinx-comments - sphinx-copybutton - sphinx-design - sphinx-hep-pdgref - sphinx-thebe - sphinx-togglebutton - sphinxcontrib-bibtex >=2.2 # bibtex_reference_style - sympy -test = - pytest - pytest-cov - pytest-xdist -format = - black -mypy = - mypy >=0.730 # error code support - types-docutils - types-pkg-resources - types-python-dateutil - types-PyYAML - types-setuptools -lint = - %(mypy)s - ruff -sty = - %(format)s - %(lint)s - %(test)s # for pytest type hints - pre-commit >=1.4.0 -jupyter = - %(doc)s - jupyterlab - jupyterlab-code-formatter - jupyterlab-lsp - jupyterlab-myst - python-lsp-server[rope] - ypy-websocket <0.8.3; python_version <"3.8.0" -dev = - %(doc)s - %(jupyter)s - %(sty)s - %(test)s - sphinx-autobuild - tox >=1.9 # for skip_install, use_develop - -[options.entry_points] -console_scripts = - export-json-schema = pwa_pages.project_inventory:export_json_schema - -[options.packages.find] -where = src - -[options.package_data] -pwa_pages = - py.typed diff --git a/setup.py b/setup.py deleted file mode 100644 index 93296978..00000000 --- a/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -from setuptools import setup - -setup( - use_scm_version=True, - setup_requires=["setuptools_scm"], -)