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
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/{{ project_name|replace('-', '_') }}
url: https://pypi.org/p/hatchit
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
- name: Install tox
run: uv tool install tox --with tox-uv

- name: Install dependencies
run: uv sync --all-extras --python ${{ matrix.python }}

- name: Run tests
run: |
tox -e default -- --cov --cov-branch --cov-report=xml
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,10 @@ repos:
# rev: v2.2.5
# hooks:
# - id: codespell

- repo: https://github.com/PyCQA/bandit
rev: 1.7.9
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.1.0 - 0.1.2
## 0.1.0 - 0.1.3

- Switch to copier and modify the templates
62 changes: 46 additions & 16 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
[project]
name = "hatchit"
dynamic = ["version"]
dynamic = [
"version",
]
description = "Modern Python project scaffolder combining uv and hatch"
readme = "README.md"
authors = [
{ name = "Jayaram Kancherla", email = "jayaram.kancherla@gmail.com" }
{ name = "Jayaram Kancherla", email = "jayaram.kancherla@gmail.com" },
]
requires-python = ">=3.10"
dependencies = ["uv", "copier>=9.0.0"]
keywords = ["scaffold", "uv", "hatch", "project", "generator", "template", "copier", "packaging", "pypi"]
dependencies = [
"uv",
"copier>=9.0.0",
]
keywords = [
"scaffold",
"uv",
"hatch",
"project",
"generator",
"template",
"copier",
"packaging",
"pypi",
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
Expand All @@ -20,7 +35,7 @@ classifiers = [
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Topic :: Software Development :: Code Generators"
"Topic :: Software Development :: Code Generators",
]

[project.urls]
Expand All @@ -33,30 +48,43 @@ Repository = "https://github.com/biocpy/hatchit"
hatchit = "hatchit.cli:main"

[build-system]
requires = ["hatchling", "hatch-vcs"]
requires = [
"hatchling",
"hatch-vcs",
]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel.force-include]
"copier.yml" = "hatchit/copier.yml"
"template" = "hatchit/template"
template = "hatchit/template"

[tool.hatch.version]
source = "vcs"
fallback-version = "0.1.0"

[tool.ruff]
line-length = 120
src = ["src"]
exclude = ["tests", "docs"]
src = [
"src",
]
exclude = [
"tests",
"docs",
]

[tool.ruff.lint]
extend-ignore = ["F821"]
extend-ignore = [
"F821",
]

[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"__init__.py" = [
"E402",
"F401",
]

[tool.ruff.format]
docstring-code-format = true
Expand All @@ -67,16 +95,18 @@ strict = true

[tool.pytest.ini_options]
addopts = "--cov --cov-report term-missing"
testpaths = ["tests"]
testpaths = [
"tests",
]

[dependency-groups]
dev = [
"furo",
"linkify-it-py",
"mypy",
"myst-nb",
"pytest",
"pytest-cov",
"sphinx",
"myst-nb",
"furo",
"sphinx-autodoc-typehints",
"linkify-it-py",
"mypy",
]
3 changes: 3 additions & 0 deletions template/.github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
- name: Install tox
run: uv tool install tox --with tox-uv

- name: Install dependencies
run: uv sync --all-extras --python ${{ matrix.python }}

- name: Run tests
run: |
tox -e default -- --cov --cov-branch --cov-report=xml
Expand Down
4 changes: 2 additions & 2 deletions template/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ description = Invoke pytest to run automated tests
allowlist_externals = uv
skip_install = True
commands =
uv run pytest {posargs}
uv run --all-extras pytest {posargs}

[testenv:typecheck]
description = Run static type checking with mypy
skip_install = True
commands =
uv run mypy src/
uv run --all-extras mypy src/

[testenv:lint]
description = Perform static analysis and style checks
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ description = Invoke pytest to run automated tests
allowlist_externals = uv
skip_install = True
commands =
uv run pytest {posargs}
uv run --all-extras pytest {posargs}

[testenv:typecheck]
description = Run static type checking with mypy
skip_install = True
commands =
uv run mypy src/
uv run --all-extras mypy src/

[testenv:lint]
description = Perform static analysis and style checks
Expand Down
Loading