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
4 changes: 2 additions & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changes here will be overwritten by Copier
_commit: a84eb20
_src_path: ../../templates/base
_commit: a669f79
_src_path: https://github.com/python-project-templates/base.git
add_extension: python
email: t.paine154@gmail.com
github: python-project-templates
Expand Down
23 changes: 8 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Build Status

on:
Expand Down Expand Up @@ -36,52 +35,46 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: actions-ext/python/setup@main
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'pyproject.toml'
version: ${{ matrix.python-version }}

- name: Install dependencies
run: make develop

- name: Lint
run: make lint
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Checks
run: make checks
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Build
run: make build

- name: Test
run: make coverage
if: ${{ matrix.os == 'ubuntu-latest' }}

- name: Upload test results (Python)
uses: actions/upload-artifact@v4
with:
name: pytest-results-${{ matrix.os }}-${{ matrix.python-version }}
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}
path: junit.xml
if: ${{ always() }}

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: |
**/junit.xml
if: ${{ matrix.os == 'ubuntu-latest' }}
files: '**/junit.xml'

- name: Upload coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: python-project-templates/yardang

- name: Make dist
run: make dist
if: ${{ matrix.os == 'ubuntu-latest' }}

- uses: actions/upload-artifact@v4
with:
name: dist-${{matrix.os}}
path: dist
17 changes: 17 additions & 0 deletions .github/workflows/copier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Copier Updates

on:
workflow_dispatch:
schedule:
- cron: "0 5 * * 0"

jobs:
update:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions-ext/copier-update@main
with:
token: ${{ secrets.WORKFLOW_TOKEN }}
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ docs/_build/
/site
docs/api
docs/index.md
docs/html
docs/jupyter_execute
index.md
_template/labextension

# Jupyter
Expand All @@ -143,3 +140,4 @@ _template/labextension

# Rust
target

17 changes: 7 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
.PHONY: develop build install

develop: ## install dependencies and build library
python -m pip install -e .[develop]
uv pip install -e .[develop]

build: ## build the python library
python setup.py build build_ext --inplace
python -m build -n

install: ## install library
python -m pip install .
uv pip install .

#########
# LINTS #
Expand All @@ -34,7 +34,7 @@ format: fix
################
# Other Checks #
################
.PHONY: check-manifest checks check annotate
.PHONY: check-manifest checks check

check-manifest: ## check python sdist manifest with check-manifest
check-manifest -v
Expand All @@ -44,19 +44,16 @@ checks: check-manifest
# Alias
check: checks

annotate: ## run python type annotation checks with mypy
python -m mypy ./yardang

#########
# TESTS #
#########
.PHONY: test coverage tests

test: ## run python tests
python -m pytest -v yardang/tests --junitxml=junit.xml
python -m pytest -v yardang/tests

coverage: ## run tests and collect test coverage
python -m pytest -v yardang/tests --junitxml=junit.xml --cov=yardang --cov-branch --cov-fail-under=1 --cov-report term-missing --cov-report xml
python -m pytest -v yardang/tests --cov=yardang --cov-report term-missing --cov-report xml

# Alias
tests: test
Expand Down Expand Up @@ -97,7 +94,7 @@ dist-build: # build python dists
dist-check: ## run python dist checker with twine
python -m twine check dist/*

dist: clean build dist-build dist-check ## build all dists
dist: clean dist-build dist-check ## build all dists

publish: dist # publish python assets

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ Or from `conda-forge` via `conda`:
```bash
conda install yardang -c conda-forge
```

> [!NOTE]
> This library was generated using [copier](https://copier.readthedocs.io/en/stable/) from the [Base Python Project Template repository](https://github.com/python-project-templates/base).
59 changes: 27 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend="hatchling.build"
[project]
name = "yardang"
authors = [{name = "the yardang authors", email = "t.paine154@gmail.com"}]
description="Easily generate sphinx documentation"
description = "Easily generate sphinx documentation"
readme = "README.md"
license = { text = "Apache-2.0" }
version = "0.2.3"
Expand All @@ -14,14 +14,15 @@ keywords = []

classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]

dependencies = [
Expand All @@ -39,10 +40,6 @@ dependencies = [
"typer",
]

[project.urls]
Repository = "https://github.com/python-project-templates/yardang"
Homepage = "https://yardang.python-templates.dev/"

[project.optional-dependencies]
develop = [
"build",
Expand All @@ -53,16 +50,21 @@ develop = [
"pytest-cov",
"ruff",
"twine",
"uv",
"wheel",
]

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

[project.urls]
Repository = "https://github.com/python-project-templates/yardang"
Homepage = "https://github.com/python-project-templates/yardang"

[tool.bumpversion]
current_version = "0.2.3"
commit = true
tag = false
tag = true

[[tool.bumpversion.files]]
filename = "yardang/__init__.py"
Expand All @@ -77,47 +79,40 @@ replace = 'version = "{new_version}"'
[tool.check-manifest]
ignore = [
".copier-answers.yml",
"docs/*",
"docs/**/*",
"Makefile",
"setup.py",
"docs/**/*",
]

[tool.coverage.run]
branch = true
omit = [
"yardang/tests/integration/",
]
[tool.coverage.report]
exclude_also = [
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
fail_under = 50

[tool.hatch.build]
artifacts = []

[tool.hatch.build.sources]
src = "/"

[tool.hatch.build.targets.sdist]
include = [
"/yardang",
"LICENSE",
"README.md",
]
exclude = [
"/.github",
"/.gitattributes",
"/.gitignore",
"/docs",
]
packages = ["yardang"]

[tool.hatch.build.targets.wheel]
include = [
"/yardang",
]
exclude = [
"/.github",
"/.gitattributes",
"/.gitignore",
"/docs",
"/pyproject.toml",
]
packages = ["yardang"]

[tool.hatch.build.targets.wheel.shared-data]

[tool.pytest.ini_options]
asyncio_mode = "strict"
addopts = ["-vvv", "--junitxml=junit.xml"]
testpaths = "yardang/tests"

[tool.ruff]
Expand Down
1 change: 0 additions & 1 deletion setup.py

This file was deleted.

Loading