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
46 changes: 46 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Summary

_Describe the change and the user-facing or developer-facing impact._

## Related Issues

Closes #(issue number) or Relates to #(issue number)

## What Changed

- _Summarize the code, tests, docs, or tooling changes._
- _Call out any API, CLI, or behavior changes explicitly._

## Type of Change

- **Bugfix**: Fix an existing feature
- **Feature**: Introduces new functionality without breaking changes
- **Enhancement**: Improves existing functionality
- **Breaking Change**: Introduces breaking changes that require migration
- **Refactoring**: Code restructuring without behavioral changes
- **Build/Infrastructure**: Build system, CI/CD, dependencies, Docker
- **Documentation**: Documentation, comments, or changelog updates

## Validation

- `./tools/lint.sh --changed`
- `./tools/test.sh -q`
- `./tools/docs.sh` (if docs or public API changed)
- `python -m build` (if packaging or release files changed)
- Manual testing described below when automated coverage is not enough

## Breaking Changes

_Describe any migration, compatibility, or deprecation impact. Write `None` if not applicable._

## Notes for Reviewers

_Call out anything that deserves extra attention: edge cases, tradeoffs, follow-up work, or known limitations._

## Checklist

- Code follows project style guidelines
- Self-review completed
- Comments added for complex logic
- No breaking changes without documentation
- Commit messages follow semantic convention: `{type}({scope}): {message}`
30 changes: 20 additions & 10 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,43 @@ name: cmdcraft unit testing

on:
push:
branches: [master]
branches:
- master
- v*-rc
pull_request:
branches: [master, v*-rc]
workflow_dispatch:

jobs:
test:
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install Dependencies
cache: pip

- name: Install dependencies
run: |
sudo apt remove python3-pip
python -m pip install --upgrade pip
python -m pip install . ruff coverage pytest readme_renderer
- name: Analysis
run: ./tools/analyse.sh
pip install -e '.[dev]'

Comment on lines 34 to +36
- name: Lint
run: ./tools/lint.sh --changed

- name: Tests
run: ./tools/test.sh

- name: Validate README.rst
run: python -m readme_renderer README.rst
run: python -m readme_renderer.rst README.rst > /dev/null
111 changes: 109 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,110 @@
[build-system]
requires = ["setuptools>=69"]
build-backend = "setuptools.build_meta"

[project]
name = "cmdcraft"
dynamic = ["version"]
description = "Library for building interactive prompt-driven developer tools from Python callables"
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [{ name = "A. M. Weinsen Jr." }]
license = "BSD-3-Clause"
requires-python = ">=3.10"
dependencies = ["prompt_toolkit>=3.0.52,<4"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development",
]

[project.optional-dependencies]
dev = [
"build",
"coverage",
"pytest",
"readme_renderer",
"ruff",
]
docs = [
"furo",
"sphinx",
]

[project.urls]
Homepage = "https://github.com/weinsen/cmdcraft"
Repository = "https://github.com/weinsen/cmdcraft"

[tool.setuptools]
package-dir = {"" = "src"}

[tool.setuptools.dynamic]
version = {attr = "cmdcraft.__version__"}

[tool.setuptools.packages.find]
where = ["src"]

# git-cliff configuration lives in pyproject.toml and is extracted by
# tools/changelog.sh when generating release notes.
[tool.git-cliff.changelog]
header = """
Changelog
=========

"""
body = """
{% if version %}{{ version }}
------------------------------

{% else %}Unreleased
------------------------------

{% endif %}{% for group, commits in commits | group_by(attribute="group") %}{{ group }}
******************************

{% for commit in commits %}- {{ commit.message | trim | upper_first }}
{% endfor %}
{% endfor %}
"""
trim = true
render_always = false

[tool.git-cliff.git]
conventional_commits = true
filter_unconventional = false
split_commits = false
protect_breaking_commits = false
filter_commits = false
tag_pattern = "v[0-9].*"
topo_order = false
topo_order_commits = true
sort_commits = "oldest"
commit_preprocessors = [
{ pattern = "^new:\\s*", replace = "feat: " },
{ pattern = "^doc:\\s*", replace = "docs: " },
{ pattern = "^infra:\\s*", replace = "chore(infra): " },
]
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug fixes" },
{ message = "^docs", group = "Documentation" },
{ message = "^test", group = "Testing" },
{ message = "^chore\\(infra\\)", group = "Infrastructure" },
{ message = "^refactor", group = "Refactoring" },
{ message = "^Merge pull request", skip = true },
{ message = "^fixup", skip = true },
{ message = "^Update version$", skip = true },
{ message = "^.*$", group = "Other" },
]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
Expand Down Expand Up @@ -33,8 +140,8 @@ exclude = [
line-length = 88
indent-width = 4

# Assume Python 3.8
target-version = "py38"
# Assume Python 3.10
target-version = "py310"

[tool.ruff.lint]
select = ["RUF", "E", "W", "F", "I", "D", "UP"]
Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

17 changes: 0 additions & 17 deletions tools/analyse.sh

This file was deleted.

Loading
Loading