diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b85019e..50366ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,3 +36,25 @@ jobs: - name: tox run: | tox -e ${{ matrix.toxenv || 'py' }} + + check: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] + tox-job: ["twine-check"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install tox + - name: tox + run: | + tox -e ${{ matrix.tox-job }} diff --git a/duplicate_url_discarder_rules/__init__.py b/duplicate_url_discarder_rules/__init__.py index 8123c3a..5bc539d 100644 --- a/duplicate_url_discarder_rules/__init__.py +++ b/duplicate_url_discarder_rules/__init__.py @@ -3,3 +3,6 @@ _current_path = Path(__file__).parent.resolve() RULE_PATHS = glob(str(_current_path / "**/*.json"), recursive=True) + + +__version__ = "0.1.0" diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..774c7e3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,33 @@ + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "duplicate-url-discarder-rules" +description = "The rules for duplicate-url-discarder." +authors = [{name = "Zyte Group Ltd", email = "info@zyte.com"}] +readme = "README.rst" +license = {file = "LICENSE"} +classifiers = [ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", +] +requires-python = ">=3.8" +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = {attr = "duplicate_url_discarder_rules.__version__"} + +[project.urls] +Source = "https://github.com/zytedata/duplicate-url-discarder-rules" diff --git a/tox.ini b/tox.ini index 240e557..0554e18 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py38,py39,py310,py311,py312 +envlist = py38,py39,py310,py311,py312,twine-check [testenv] deps = @@ -9,3 +9,11 @@ deps = commands = py.test \ {posargs:duplicate_url_discarder_rules tests} + +[testenv:twine-check] +deps = + build + twine +commands = + python -m build --sdist --wheel + twine check dist/*