Skip to content

Commit

Permalink
Simplify packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
elchupanebrej committed Sep 21, 2024
1 parent f6ecf72 commit 18ecb39
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 64 deletions.
51 changes: 50 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools", "wheel"]
requires = ["setuptools>=61.0", "wheel"]

[project]
authors = [
Expand Down Expand Up @@ -84,3 +84,52 @@ warn_unused_configs = true
ignore_missing_imports = true
module = [
]
# Wait until is ready: https://github.com/tox-dev/tox/issues/999
[tool.tox]
legacy_tox_ini = """
[tox]
requires =
tox>=4.2
env_list =
py312-pre-commit
py{312, 311, 310, 39, 38}-mypy
py{py310, py39, py38, 312, 311, 310, 39, 38}-pytest-coverage-lin
py312-pytest-coverage-{win, mac}
distshare = {homedir}/.tox/distshare
[testenv]
platform =
lin: linux
mac: darwin
win: win32
[testenv:py312-pre-commit]
skip_install = true
deps =
pre-commit
commands =
pre-commit run
[testenv:py{312, 311, 310, 39, 38}-mypy]
deps =
mypy
commands =
python -m mypy
[testenv:py{py310, py39, py38, 312, 311, 310, 39, 38}-pytest-coverage-{lin, win, mac}]
deps =
.[test-coverage]
commands =
coverage run --append -m pytest -vvl
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312
pypy-3.8: pypy38
pypy-3.9: pypy39
pypy-3.10: pypy310
"""
11 changes: 0 additions & 11 deletions python/setup.cfg

This file was deleted.

4 changes: 4 additions & 0 deletions python/src/cucumber_messages/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from python.src.cucumber_messages.messages import *

ExpressionType = Type1
del Type1
File renamed without changes.
3 changes: 0 additions & 3 deletions python/src/messages.py

This file was deleted.

File renamed without changes.
7 changes: 3 additions & 4 deletions python/tests/test_model_load.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import json
from itertools import chain
from pathlib import Path

from importlib_resources import files
from pytest import mark, param

from messages import Envelope
from cucumber_messages import Envelope

resource_path = Path(__file__).parent.absolute()

@mark.parametrize(
"ast_path",
map(
lambda file: param(file, id=file.name), # type: ignore[no-any-return]
chain.from_iterable(map(lambda p: p.glob("*.ndjson"), files("message_samples").iterdir())),
resource_path.rglob("*.ndjson"),
),
)
def test_simple_load_model(ast_path: Path):
Expand Down
45 changes: 0 additions & 45 deletions python/tox.ini

This file was deleted.

0 comments on commit 18ecb39

Please sign in to comment.