diff --git a/.copier-answers.yaml b/.copier-answers.yaml index 5b097d6..29aa8e5 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,8 +1,9 @@ # Changes here will be overwritten by Copier -_commit: c53b04c +_commit: 2d0c192 _src_path: https://github.com/python-project-templates/base.git add_docs: false add_extension: python +add_wiki: false email: t.paine154@gmail.com github: python-project-templates project_description: Hatch plugin for CMake/C++ builds diff --git a/.gitignore b/.gitignore index 92ac12e..c9f4873 100644 --- a/.gitignore +++ b/.gitignore @@ -139,10 +139,13 @@ js/dist js/lib js/node_modules js/*.tgz +hatch_cmake/extension # Jupyter .ipynb_checkpoints .autoversion +!hatch_cmake/extension/hatch_cmake.json +!hatch_cmake/extension/install.json hatch_cmake/nbextension hatch_cmake/labextension diff --git a/Makefile b/Makefile index 05d2f62..8846f7b 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,11 @@ develop: ## install dependencies and build library uv pip install -e .[develop] +requirements: ## install prerequisite python build requirements + python -m pip install --upgrade pip toml + python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))'` + python -m pip install `python -c 'import toml; c = toml.load("pyproject.toml"); print(" ".join(c["project"]["optional-dependencies"]["develop"]))'` + build: ## build the python library python -m build -n @@ -15,20 +20,27 @@ install: ## install library ######### # LINTS # ######### -.PHONY: lint lints fix format +.PHONY: lint-py lint-docs fix-py fix-docs lint lints fix format -lint: ## run python linter with ruff +lint-py: ## lint python with ruff python -m ruff check hatch_cmake python -m ruff format --check hatch_cmake -# Alias -lints: lint +lint-docs: ## lint docs with mdformat and codespell + python -m mdformat --check README.md + python -m codespell_lib README.md -fix: ## fix python formatting with ruff +fix-py: ## autoformat python code with ruff python -m ruff check --fix hatch_cmake python -m ruff format hatch_cmake -# alias +fix-docs: ## autoformat docs with mdformat and codespell + python -m mdformat README.md + python -m codespell_lib --write README.md + +lint: lint-py lint-docs ## run all linters +lints: lint +fix: fix-py fix-docs ## run all autoformatters format: fix ################ diff --git a/README.md b/README.md index 059035d..fc7c02f 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Hatch plugin for CMake/C++ builds [![PyPI](https://img.shields.io/pypi/v/hatch-cmake.svg)](https://pypi.python.org/pypi/hatch-cmake) ## Overview + Wrapper for [hatch-cpp](https://github.com/python-project-templates/hatch-cpp). > [!NOTE] diff --git a/pyproject.toml b/pyproject.toml index be10078..046908a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,7 +41,10 @@ develop = [ "build", "bump-my-version", "check-manifest", + "codespell>=2.4,<2.5", "hatchling", + "mdformat>=0.7.22,<0.8", + "mdformat-tables>=1", "pytest", "pytest-cov", "ruff", @@ -60,6 +63,7 @@ Homepage = "https://github.com/python-project-templates/hatch-cmake" current_version = "0.1.0" commit = true tag = true +commit_args = "-s" [[tool.bumpversion.files]] filename = "hatch_cmake/__init__.py"