Skip to content

Commit

Permalink
Build with hatch and release tap2junit v0.1.6 (#49)
Browse files Browse the repository at this point in the history
* Build with hatch

* hatch version micro

* Add changelog URL
  • Loading branch information
cclauss authored Mar 30, 2023
1 parent cc835ec commit 0cfd030
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
with:
python-version: 3.x
- run: pip install --upgrade pip setuptools wheel
- run: pip install black codespell junit_xml mypy pytest pytest-clarity ruff safety yamlish
- run: pip install --editable ".[dev]"
- run: codespell .
- run: ruff --format=github .
- run: black --check .
- run: codespell --skip="*.tap" --skip "*.xml" # --ignore-words-list=""
- run: mypy .
- run: pytest -vv .
- run: pytest --doctest-modules .
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Improvements are welcome.

To install from https://pypi.org/project/tap2junit (recommended):

`pip install tap2junit` or `pipx install tap2junit`
`pipx install tap2junit`

To install directly from this repo (not recommended):

Expand Down Expand Up @@ -36,6 +36,6 @@ optional arguments:

Suggested code hygiene:
```
$ ruff .
$ ruff --show-fixes --show-source .
$ black .
```
95 changes: 79 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,49 +1,112 @@
[project]
name = "tap2junit"
version = "0.1.5"
description = "Tap13 to jUnit"
description = "A utility that converts TAP version 12 and 13 to JUnit. That's it."
dynamic = ["version"]
keywords = ["tap13", "junit"]
license = {text = "Apache-2.0"}
readme = "README.md"
requires-python = ">=3.7"
authors = [
{name = "Node.js contributor", email = "[email protected]"}
{ name = "Node.js contributor", email = "[email protected]" }
]
keywords = ["tap13", "junit"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache License, Version 2.0",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Build Tools",
]
dependencies = [
"junit_xml",
"yamlish"
"junit_xml",
"yamlish"
]

[project.optional-dependencies]
dev = [
"black",
"codespell[toml]",
"mypy",
"pytest",
"pytest-clarity",
"ruff",
"safety",
]

[project.scripts]
tap2junit = "tap2junit.__main__:main"

[project.urls]
repository = "https://github.com/nodejs/tap2junit"
Homepage = "https://github.com/nodejs/tap2junit"
Changelog = "https://github.com/nodejs/tap2junit/blob/main/CHANGELOG.md"

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/backend",
]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.version]
path = "tap2junit/__init__.py"

[tool.codespell]
quiet-level = 3
skip = '*.tap,*.xml'

[tool.mypy]
exclude = ["build/"]
ignore_missing_imports = true

[tool.ruff]
select = ["A", "B", "C4", "C9", "E", "F", "I", "PL", "S", "UP", "W", "YTT"]
select = [
"A",
"B",
"BLE",
"C4",
"C9",
"DTZ",
"E",
"EXE",
"F",
"G",
"I",
"ICN",
"ISC",
"N",
"PGH",
"PIE",
"PL",
"PT",
"PYI",
"RUF",
"S",
"SIM",
"UP",
"W",
"YTT",
]
line-length = 88 # Recommended: 88
target-version = "py37"

[tool.ruff.mccabe]
max-complexity = 24

[tool.ruff.per-file-ignores]
"test/*" = ["S101"] # Use of assert detected which is OK in pytests.
max-complexity = 24 # Recommended: 10

[tool.ruff.pylint]
max-args = 6
max-branches = 25
max-statements = 89
max-args = 6 # Recommended: 5
max-branches = 25 # Recommended: 12
max-returns = 6 # Recommended: 6
max-statements = 89 # Recommended: 50

[tool.ruff.per-file-ignores]
"test/*" = ["C406", "S101", "SIM115"]
1 change: 1 addition & 0 deletions tap2junit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1.6"
2 changes: 1 addition & 1 deletion tap2junit/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import yamlish
from junit_xml import TestCase, TestSuite

from tap2junit.tap13 import TAP13 as tap13
from tap2junit.tap13 import TAP13 as tap13 # noqa: N811


def extract_test_info_from_description(description):
Expand Down
2 changes: 1 addition & 1 deletion test/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from _common import normalize_output


class Test_Outputs:
class TestOutputs:
filelist = glob.glob("test/fixtures/*.tap")
print(filelist)

Expand Down

0 comments on commit 0cfd030

Please sign in to comment.