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
68 changes: 47 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,36 @@ jobs:
with:
python-version: '3.12'

- name: Install Build Dependencies
run: |
python -m pip install --upgrade pip
pip install build ruff pytest
- name: Install Hatch
run: pip install hatch

- name: Lint with Ruff
run: ruff check .
- name: Install dependencies
run: hatch env create dev

test-build:
- name: Run ruff lint
run: hatch run dev:lint

run-acceptance-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Hatch
run: pip install hatch

- name: Install dependencies
run: hatch env create dev

- name: Run ruff lint
run: hatch run dev:atest

test-python-compatibility:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -52,19 +73,24 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install Build Dependencies
run: |
python -m pip install --upgrade pip
pip install build pytest

- name: Build Package
run: python -m build

- name: Test CLI Command
run: |
pip install .
testdoc --help
- name: Install Hatch
run: pip install hatch

- name: Install dependencies
run: hatch env create dev

- name: Build wheel with Hatch
run: hatch build

- name: Install built wheel
run: pip install dist/*.whl

- name: Test import
run: python -c "import testdoc"

- name: Check version
run: hatch version

- name: Run Unit Tests
run: pytest atest/
- name: Verify CLI usage
run: testdoc --help | grep -q "Welcome to robotframework-testdoc" || exit 1

4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
python-version: '3.12'

- name: Install Hatch
run: pip install twine build
run: pip install twine hatch

- name: Build package
run: python -m build
run: hatch build

- name: Publish to PyPI
env:
Expand Down
62 changes: 51 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "robotframework-testdoc"
dynamic = ["version"]
description = "A CLI Tool to generate a Test Documentation for your RobotFramework Test Scripts."
readme = "README.md"
requires-python = ">=3.7"
requires-python = ">=3.9"
authors = [
{ name = "Marvin Klerx", email = "marvinklerx20@gmail.com" }
]
Expand All @@ -16,7 +16,6 @@ license = { text = "Apache-2.0" }
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
# "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -30,22 +29,63 @@ dependencies = [
"tomli"
]

[project.optional-dependencies]
dev = [
"hatch",
"ruff",
"pytest",
"pre-commit",
"mypy",
"robotframework-robocop"
]

[project.scripts]
testdoc = "testdoc.cli:main"

[project.urls]
Repository = "https://github.com/MarvKler/robotframework-testdoc"
Issues = "https://github.com/MarvKler/robotframework-testdoc/issues"

[tool.setuptools]
include-package-data = true

[tool.setuptools.package-data]
"testdoc" = [
"html/images/*.svg",
"html/templates/**/*.html",
"default.toml"
[tool.hatch.build.targets.wheel]
require-runtime-dependencies = true
only-include = ["src/testdoc"]
sources = ["src"]
include = [
"src/testdoc/html/images/*.svg",
"src/testdoc/html/templates/**/*.html",
"src/testdoc/default.toml",
]

[tool.hatch.build.targets.sdist]
include = [
"src/testdoc/html/images/*.svg",
"src/testdoc/html/templates/**/*.html",
"src/testdoc/default.toml",
"README.md",
]

[tool.hatch.version]
path = "src/testdoc/__about__.py"

[tool.hatch.build]
dev-mode-dirs = ["src"]

[tool.hatch.envs.types]
extra-dependencies = [
"mypy>=1.0.0",
]
[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/Tables tests}"

[tool.hatch.envs.dev]
dependencies = [
"ruff",
"pytest"
]
[tool.hatch.envs.dev.scripts]
lint = "ruff check ."
atest = "pytest atest/"

[tool.ruff]
line-length = 150
Expand Down
Loading