Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .envrc

This file was deleted.

39 changes: 8 additions & 31 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,20 @@ on:
pull_request:
workflow_dispatch:

env:
POETRY_VERSION: "2.4.3"

jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: "pip"
- name: Install poetry
run: python3 -m pip install poetry==${{ env.POETRY_VERSION }}
- name: Install build dependencies
run: poetry install --only build
- name: Build a binary wheel and a source tarball
run: poetry run python -m build
run: uv build
- name: Check the distribution files with `twine`
run: poetry run twine check --strict dist/*
run: uv run --only-group build twine check --strict dist/*
- name: Upload artifact
id: artifact-upload-step
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -73,32 +66,16 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
# When upgrading poetry, remember to upgrade poetry-core in `pyproject.toml` (`build-system.requires`)
python -m pip install poetry==${{ env.POETRY_VERSION }}

- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true

- name: Cache the virtualenv
id: poetry-dependencies-cache
uses: actions/cache@v3
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dev dependencies
if: steps.poetry-dependencies-cache.outputs.cache-hit != 'true'
run: |
python -m poetry install --only=dev
run: uv sync --only-group dev

- name: Download artifact
uses: actions/download-artifact@v4
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ cover/
# Sublime
/*.sublime-*

#PyCharm
# PyCharm
/.idea

# Generated by the tox mypy env (poetry export)
/requirements.txt
/.venv
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ repos:
- id: ruff
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/python-poetry/poetry
rev: "811a12dae0fe81f199e3f1b88b8b8be9eed543c2" # frozen: 2.4.1
- repo: https://github.com/astral-sh/uv-pre-commit
rev: "4f783b6470be305483837130a5be2e21ed7ff52b" # frozen: 0.12.13
hooks:
- id: poetry-check
args: ["--lock"]
- id: uv-lock
16 changes: 7 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# How to setup development environment
- Install poetry: https://python-poetry.org/docs/#installation
- Install uv: https://docs.astral.sh/uv/getting-started/installation/
- (Optional) Install pre-commit: https://pre-commit.com/#install
- Run `poetry install` to install dependencies
- Run `uv sync` to install dependencies
- Run `pre-commit install` to install pre-commit hooks

# How to run tests
- Run `poetry run pytest`
- or run `tox`
- Run `uv run pytest`
- or run `tox` (or `uv run tox`)

# How to make a release

```shell
python -m pip install --upgrade build twine

# cleanup the ./dist folder
rm -rf ./dist

# Build the distributions
python -m build
uv build

# Upload them

twine upload dist/*
uv run --only-group build twine upload dist/*
```
2,504 changes: 0 additions & 2,504 deletions poetry.lock

This file was deleted.

56 changes: 29 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name = "pytest-bdd"
version = "8.1.0"
description = "BDD for pytest"
authors = [
{name="Oleg Pidsadnyi", email="oleg.pidsadnyi@gmail.com"},
{name="Anatoly Bubenkov", email="bubenkoff@gmail.com"},
{ name = "Oleg Pidsadnyi", email = "oleg.pidsadnyi@gmail.com" },
{ name = "Anatoly Bubenkov", email = "bubenkoff@gmail.com" },
]
maintainers = [
{name="Alessio Bogon", email="778703+youtux@users.noreply.github.com"},
]
license = "MIT"
requires-python = ">=3.10"
readme = "README.rst"
license = "MIT"
license-files = ["LICENSE.txt"]
maintainers = [{ name = "Alessio Bogon", email = "778703+youtux@users.noreply.github.com" }]
classifiers = [
"Development Status :: 6 - Mature",
"Intended Audience :: Developers",
Expand All @@ -29,7 +29,6 @@ classifiers = [
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
]
requires-python = ">=3.10"
dependencies = [
"Mako",
"parse",
Expand All @@ -46,31 +45,34 @@ homepage = "https://pytest-bdd.readthedocs.io/"
documentation = "https://pytest-bdd.readthedocs.io/"
repository = "https://github.com/pytest-dev/pytest-bdd"

[project.entry-points."pytest11"]
"pytest-bdd" = "pytest_bdd.plugin"

[project.scripts]
"pytest-bdd" = "pytest_bdd.scripts:main"
pytest-bdd = "pytest_bdd.scripts:main"

[project.entry-points.pytest11]
pytest-bdd = "pytest_bdd.plugin"

[tool.poetry.group.dev.dependencies]
tox = ">=4.11.3"
mypy = ">=1.6.0"
types-setuptools = ">=68.2.0.0"
pytest-xdist = ">=3.3.1"
coverage = {extras = ["toml"], version = ">=6.5.0"}
Pygments = ">=2.20.0" # for code-block highlighting
# Docs tooling is not needed by the CI test jobs; sphinx-autobuild pulls in
# watchfiles, which does not build (yet) on pre-release pythons.
sphinx = {version = "*", python = "<3.15"}
sphinx-autobuild = {version = "*", python = "<3.15"}
[dependency-groups]
dev = [
"tox>=4.22.0",
"mypy>=1.6.0",
"types-setuptools>=68.2.0.0",
"pytest-xdist>=3.3.1",
"coverage[toml]>=6.5.0",
"Pygments>=2.20.0",
"sphinx",
"sphinx-autobuild",
]
build = [
"build",
"twine",
]

[tool.poetry.group.build.dependencies]
build = "*"
twine = "*"
[tool.uv]
default-groups = "all"

[build-system]
requires = ["poetry-core==2.4.1"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.12.13,<0.13.0"]
build-backend = "uv_build"

[tool.ruff]
line-length = 120
Expand Down
10 changes: 1 addition & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,5 @@ deps =
commands = {env:_PYTEST_CMD:pytest} {env:_PYTEST_MORE_ARGS:} {posargs:-vvl}

[testenv:mypy]
deps =
poetry==2.4.3
poetry-plugin-export
allowlist_externals = sh
commands_pre =
sh -c "\
poetry export --only=dev --format requirements.txt > requirements.txt && \
pip install -r requirements.txt && \
:"
dependency_groups = dev
commands = mypy
Loading
Loading