diff --git a/.github/workflows/py-tests.yml b/.github/workflows/py-tests.yml index 5eff850..4caceeb 100644 --- a/.github/workflows/py-tests.yml +++ b/.github/workflows/py-tests.yml @@ -10,7 +10,7 @@ on: - "examples/**" - "src/**" - "tests/**" - - "setup.cfg" + - "pyproject.toml" branches: - master pull_request: diff --git a/.requirements/lint.txt b/.requirements/lint.txt index e76a135..db9d149 100644 --- a/.requirements/lint.txt +++ b/.requirements/lint.txt @@ -1,5 +1,5 @@ # Lint Requirements black==23.1.0 -mypy==0.991 -ruff==0.0.286 +mypy==1.5.1 +ruff==0.1.5 types-PyYAML==6.0.12.3 diff --git a/CHANGELOG.md b/CHANGELOG.md index ee8507b..2db3d57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ To see unreleased changes, please see the [CHANGELOG on the master branch](https ### Infrastructure * devcontainer: Move settings to `customizations.vscode.settings` -* Ruff 0.0.286 +* Ruff 0.1.5 +* mypy 1.5.1 * mkdocs-material 9.4.8 ## 1.0.3 - 2022-02-06 diff --git a/docs/codebase.md b/docs/codebase.md index 5d41fb1..dbb3d9e 100644 --- a/docs/codebase.md +++ b/docs/codebase.md @@ -26,7 +26,6 @@ The code base of the project has following structure: * `Dockerfile` - [Dockerfile][Dockerfile] for development container. * `mkdocs.yml` - [Mkdocs][Mkdocs] configuration file. * `pyproject.toml` - [pyproject.toml][Pyproject] file for python tools configuration. -* `setup.cfg` - Python library [setup][Setup] configuration. [Remote Containers]: https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers [GitHub Workflows]: https://docs.github.com/en/actions/using-workflows @@ -38,5 +37,4 @@ The code base of the project has following structure: [Pytest]: https://docs.pytest.org/ [Dockerfile]: https://docs.docker.com/engine/reference/builder/ [Gitignore]: https://git-scm.com/docs/gitignore -[Pyproject]: https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ -[Setup]: https://docs.python.org/3/distutils/configfile.html \ No newline at end of file +[Pyproject]: https://pip.pypa.io/en/stable/reference/build-system/pyproject-toml/ \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 767f5db..fff895d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,3 +85,58 @@ max-complexity = 10 "S603", # `subprocess` call: check for execution of untrusted input "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable ] +[tool.ruff.lint.isort] +known-first-party = ["src"] + +[tool.mypy] +explicit_package_bases = true +mypy_path = ["src"] +strict = true +warn_unused_ignores = false + +[project] +authors = [{name = "Gufo Labs"}] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "License :: OSI Approved :: BSD License", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Python Modules", + "Operating System :: OS Independent", + "Typing :: Typed", +] +dynamic = ["version"] +keywords = ["loader", "plugin"] +license = {text = "BSD 3-Clause License"} +name = "gufo_loader" +requires-python = ">=3.8" + +[project.readme] +content-type = "text/markdown" +file = "README.md" + +[project.urls] +"Bug Tracker" = "https://github.com/gufolabs/gufo_loader/issues" +Changelog = "https://github.com/gufolabs/gufo_loader/blob/master/CHANGELOG.md" +Documentation = "https://docs.gufolabs.com/gufo_loader/" +Homepage = "https://github.com/gufolabs/gufo_loader/" +"Source Code" = "https://github.com/gufolabs/gufo_loader/" + +[tool.setuptools] +include-package-data = false +package-dir = {"" = "src"} + +[tool.setuptools.packages.find] +namespaces = true +where = ["src"] + +[tool.setuptools.package-data] +"*" = ["py.typed"] + +[tool.setuptools.dynamic] +version = {attr = "gufo.loader.__version__"} diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index db4c669..0000000 --- a/setup.cfg +++ /dev/null @@ -1,39 +0,0 @@ -[metadata] -name = gufo_loader -version = attr:gufo.loader.__version__ -author = Gufo Labs -url = https://github.com/gufolabs/gufo_loader/ -long_description = file:README.md -long_description_content_type = text/markdown -license = BSD 3-Clause License -keywords = loader, plugin -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - License :: OSI Approved :: BSD License - Topic :: Software Development - Topic :: Software Development :: Libraries - Topic :: Software Development :: Libraries :: Python Modules - Operating System :: OS Independent - Typing :: Typed -project_urls = - Documentation = https://docs.gufolabs.com/gufo_loader/ - Source Code = https://github.com/gufolabs/gufo_loader/ - Bug Tracker = https://github.com/gufolabs/gufo_loader/issues - Changelog = https://github.com/gufolabs/gufo_loader/blob/master/CHANGELOG.md - -[options] -package_dir = - = src -packages = find_namespace: -python_requires = >=3.8 - -[options.packages.find] -where = src - -[options.package_data] -* = py.typed \ No newline at end of file diff --git a/tests/test_project.py b/tests/test_project.py index 2524745..a82c5d4 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -63,7 +63,6 @@ def _get_project() -> str: "docs/testing.md", "mkdocs.yml", "pyproject.toml", - "setup.cfg", f"src/gufo/{PROJECT}/__init__.py", f"src/gufo/{PROJECT}/py.typed", "tests/test_docs.py",