From cf930abe4d1348d7d53abaa013b3f1a0554edf25 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Thu, 2 Apr 2026 11:12:55 +0300 Subject: [PATCH] pyproject.toml is corrected (fixes, dynamic version, ci.build-check] --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ pyproject.toml | 14 ++++++++------ src/pgpro_pytest_html_merger/__init__.py | 2 +- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7afad8..0dea7f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,30 @@ jobs: run: | black --check . + build-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Set up Python 3.12 + uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - name: Install build tools + run: | + python -m pip install --upgrade pip + python -m pip install build twine + + - name: Build package + run: | + python -m build + + - name: Check package metadata + run: | + twine check dist/* + test: runs-on: ubuntu-latest needs: lint diff --git a/pyproject.toml b/pyproject.toml index 9b7c309..7478a39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,12 +2,19 @@ requires = ["setuptools>=61.0"] build-backend = "setuptools.build_meta" +[tool.setuptools.packages.find] +where = ["src"] +include = ["pgpro_pytest_html_merger*"] + +[tool.setuptools.dynamic] +version = {attr = "pgpro_pytest_html_merger.__version__"} + [project] name = "pgpro-pytest-html-merger" -version = "0.3.0" description = "A professional tool to merge multiple pytest-html reports into a single one with consistent metadata" readme = "README.md" license = "MIT" +dynamic = ["version"] authors = [ {name = "Postgres Professional", email = "info@postgrespro.ru"} @@ -18,7 +25,6 @@ requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", @@ -44,10 +50,6 @@ dependencies = [ [project.scripts] pgpro-pytest-html-merger = "pgpro_pytest_html_merger.__main__:cli" -[tool.setuptools.packages.find] -where = ["src"] -include = ["pgpro_pytest_html_merger*"] - [tool.pytest.ini_options] testpaths = ["tests"] log_file_level = "NOTSET" diff --git a/src/pgpro_pytest_html_merger/__init__.py b/src/pgpro_pytest_html_merger/__init__.py index d3ec452..493f741 100644 --- a/src/pgpro_pytest_html_merger/__init__.py +++ b/src/pgpro_pytest_html_merger/__init__.py @@ -1 +1 @@ -__version__ = "0.2.0" +__version__ = "0.3.0"