Skip to content

Commit f4dd109

Browse files
committed
chore(build): Switch the build backend to Hatch
1 parent 82a5a01 commit f4dd109

File tree

6 files changed

+69
-310
lines changed

6 files changed

+69
-310
lines changed

.coveragerc

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010
- '.pydocstyle'
1111
- '.relint.yml'
1212
- '.yamllint'
13-
- 'poetry.lock'
1413
- 'pyproject.toml'
1514
- 'tox.ini'
1615
- 'mypy.ini'
@@ -81,19 +80,11 @@ jobs:
8180
with:
8281
python-version: ${{ matrix.python }}
8382

84-
- run: pip install tox coverage
83+
- run: pip install tox tox-gh-actions
8584

86-
- name: Run ${{ matrix.python }} tox job
87-
run: tox -e py${TOX_JOB//.} # Strip dot from python version to match tox job
88-
env:
89-
TOX_JOB: ${{ matrix.python }}
90-
91-
- run: coverage combine
92-
- run: coverage report
93-
- run: coverage xml -i
85+
- run: python -m tox
9486

9587
- name: Upload coverage to Codecov
9688
uses: codecov/codecov-action@v3.1.0
9789
with:
98-
file: ./coverage.xml
9990
name: codecov-${{ matrix.python }}

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased] - TBD
44

5+
### Changed
6+
7+
- **Build**: Switch the build backend to [Hatch](https://hatch.pypa.io/>).
8+
59
### Removed
610

711
- Python 3.6 support.

poetry.lock

Lines changed: 0 additions & 261 deletions
This file was deleted.

pyproject.toml

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
[tool.poetry]
1+
[build-system]
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
4+
5+
[project]
26
name = "hypothesis-graphql"
37
version = "0.9.2"
48
description = "Hypothesis strategies for GraphQL queries"
@@ -19,19 +23,34 @@ classifiers = [
1923
"Programming Language :: Python :: Implementation :: CPython",
2024
"Topic :: Software Development :: Testing",
2125
]
22-
authors = ["Dmitry Dygalo <dadygalo@gmail.com>"]
26+
authors = [{ name = "Dmitry Dygalo", email = "dadygalo@gmail.com" }]
27+
maintainers = [{ name = "Dmitry Dygalo", email = "dadygalo@gmail.com" }]
2328
readme = "README.md"
24-
repository = "https://github.com/Stranger6667/hypothesis-graphql"
2529
license = "MIT"
2630
include = ["src/hypothesis_graphql/py.typed"]
31+
requires-python = ">=3.7"
32+
dependencies = [
33+
"hypothesis>=5.8.0,<7.0",
34+
"graphql-core>=3.1.0,<3.3.0",
35+
]
2736

28-
[tool.poetry.dependencies]
29-
python = "^3.7"
30-
hypothesis = ">=5.8.0,<7.0"
31-
graphql-core = ">=3.1.0,<3.3.0"
37+
[project.optional-dependencies]
38+
tests = [
39+
"coverage>=7",
40+
"pytest>=6.2.0,<8",
41+
"pytest-xdist>=2.5,<3.0",
42+
]
43+
cov = [
44+
"coverage-enable-subprocess",
45+
"coverage[toml]>=7",
46+
]
47+
dev = ["hypothesis_graphql[tests,cov]"]
3248

33-
[tool.poetry.dev-dependencies]
34-
pytest = "^6.2.0"
49+
[project.urls]
50+
Changelog = "https://github.com/Stranger6667/hypothesis-graphql/blob/master/CHANGELOG.md"
51+
"Bug Tracker" = "https://github.com/Stranger6667/hypothesis-graphql"
52+
Funding = "https://github.com/sponsors/Stranger6667"
53+
"Source Code" = "https://github.com/Stranger6667/hypothesis-graphql"
3554

3655
[tool.black]
3756
line-length = 120
@@ -45,6 +64,20 @@ include_trailing_comma = true
4564
known_first_party = "hypothesis_graphql"
4665
known_third_party =["graphql", "hypothesis", "hypothesis_graphql", "pytest"]
4766

48-
[build-system]
49-
requires = ["poetry-core>=1.0"]
50-
build-backend = "poetry.core.masonry.api"
67+
[tool.coverage.run]
68+
parallel = true
69+
branch = true
70+
source_pkgs = ["hypothesis_graphql"]
71+
72+
[tool.coverage.paths]
73+
source = ["src", ".tox/*/site-packages"]
74+
75+
[tool.coverage.report]
76+
show_missing = true
77+
skip_covered = true
78+
precision = 2
79+
exclude_lines = [
80+
"raise NotImplementedError",
81+
"if TYPE_CHECKING:",
82+
"pass"
83+
]

0 commit comments

Comments
 (0)