From 94983561bb3d63f913eddfa30294585b75cf21f9 Mon Sep 17 00:00:00 2001 From: Bernhard Arnold Date: Mon, 16 Sep 2024 13:12:23 +0200 Subject: [PATCH] pyproject.toml, ruff, bump version --- .github/workflows/python-package.yml | 15 ++------ changelog | 6 +++ pyproject.toml | 36 ++++++++++++++++++ setup.cfg | 56 ---------------------------- src/sqc/__init__.py | 2 +- tox.ini | 6 +-- 6 files changed, 48 insertions(+), 73 deletions(-) delete mode 100644 setup.cfg diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c6fe14d..bedccd5 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -35,20 +35,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install wheel flake8 pylint pytest + pip install tox pip install -e . - - name: Lint with flake8 + - name: Test with tox run: | - # stop the build if there are Python syntax errors or undefined names - flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - flake8 src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - name: Lint with pylint - run: | - pylint -E src - - name: Test with pytest - run: | - pytest + tox -epy - name: Run application run: | python -m sqc --version diff --git a/changelog b/changelog index 30760d9..0e32860 100644 --- a/changelog +++ b/changelog @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.11.0] - 2024-09-16 + +### Changed +- Switched to pyproject.toml config. +- Switched to ruff linter. + ## [0.10.2] - 2024-04-26 ### Fixed diff --git a/pyproject.toml b/pyproject.toml index fed528d..bf2bdb7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,39 @@ +[project] +name = "sqc" +description = "Sensor Quality Control" +readme = "README.md" +authors = [ + {name = "Bernhard Arnold", email = "bernhard.arnold@oeaw.ac.at"}, +] +requires-python = ">=3.9" +dependencies = [ + "comet @ git+https://github.com/hephy-dd/comet.git@main", + "PyQt5==5.15.10", + "PyQtChart==5.15.6", + "PyYAML==6.0.1", + "numpy==1.26.4", + "scipy==1.12.0", + "schema==0.7.5", + "pyueye==4.95.0", +] +dynamic = ["version"] + +[project.urls] +Homepage = "https://github.com/hephy-dd/sqc" +Documentation = "https://hephy-dd.github.io/sqc/" + +[project.scripts] +sqc = "sqc.__main__:main" + [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +"sqc.assets.icons" = ["*.svg", "*.png", "*.ico"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index f6a7132..0000000 --- a/setup.cfg +++ /dev/null @@ -1,56 +0,0 @@ -[metadata] -name = sqc -version = attr: sqc.__version__ -author = Bernhard Arnold -author_email = bernhard.arnold@oeaw.ac.at -description = Sensor Quality Control -long_description = file: README.md -long_description_content_type = text/markdown -license = GPLv3 - -[options] -python_requires = >=3.9 -install_requires = - comet @ git+https://github.com/hephy-dd/comet.git@v1.0.0 - PyQt5==5.15.10 - PyQtChart==5.15.6 - PyYAML==6.0.1 - numpy==1.26.4 - scipy==1.12.0 - schema==0.7.5 - pyueye==4.95.0 -test_suite = tests -include_package_data = True - -[options.packages.find] -exclude = tests - -[options.package_data] -sqc.assets.icons = - *.svg - *.png - *.ico - -[options.entry_points] -console_scripts = - sqc = sqc.__main__:main - -[flake8] -exclude = env - -[mypy] - -[mypy-pyueye.*] -ignore_missing_imports = True - -[mypy-pint.*] -ignore_missing_imports = True - -[mypy-scipy.*] -ignore_missing_imports = True - -[mypy-schema.*] -ignore_missing_imports = True - -[mypy-comet.*] -ignore_missing_imports = True diff --git a/src/sqc/__init__.py b/src/sqc/__init__.py index 17c1a62..ae6db5f 100644 --- a/src/sqc/__init__.py +++ b/src/sqc/__init__.py @@ -1 +1 @@ -__version__ = "0.10.2" +__version__ = "0.11.0" diff --git a/tox.ini b/tox.ini index 37cad16..887974e 100644 --- a/tox.ini +++ b/tox.ini @@ -5,14 +5,12 @@ skip_missing_interpreters = true [testenv] deps = - flake8 - pylint + ruff mypy types-PyYAML PyQt5-stubs pytest commands = - flake8 src --select=E9,F63,F7,F82 - pylint -E src + ruff check src --select=E9,F63,F7,F82 mypy src pytest