Skip to content

Commit f111e5d

Browse files
ZenithClownclaude
andcommitted
🛠️ fix: resolve all critical bugs, broken refs, and template gaps
A comprehensive audit and fix pass addressing 56 identified issues across build-breaking bugs, broken references, missing files, and best-practice violations. The template is now production-ready out-of-the-box. --- Critical Fixes (build-breaking) --- - pkg-name/VERSION: remove leading `v` (PEP 440 canonical form) - pkg-name/__init__.py: use context manager for VERSION file handle - .flake8: fix typo `exclue` → `exclude` (exclude directive was silently ignored) - Dockerfile: update base image python:3.8 → python:3.10-slim (EOL fix) - Dockerfile: fix `RUN pip install <pkg-name>` placeholder → `pip install .` - Dockerfile: rename INSTALL_PATH helloworld → app; remove nano/net-tools - docs/index.md: rewrite entirely (was copied from ds-gringotts with lorem ipsum, wrong title, wrong badges, wrong issue/contributing links) - docs/conf.py: comment out favicon pointing to non-existent path; use context manager for VERSION read; dynamic copyright year; sys.path.insert(0, ...) - docs/about/objective.md: create (referenced in toctree, file was missing) - docs/about/installation.md: create (referenced in toctree, file was missing) - .travis.yml: DELETE (legacy CI; tested Python 3.7/3.9 which violate requires-python >= 3.10; GitHub Actions already covers CI) --- High Priority Fixes --- - pyproject.toml: add Python 3.12 classifier (was skipped between 3.11→3.13) - pyproject.toml: fix URL keys to Title Case (Homepage, Repository per PEP 621) - pyproject.toml: add explicit `dependencies = []` - pyproject.toml: fix dynamic version to `{file = "pkg-name/VERSION"}` instead of `{attr = "pkg-name.__version__"}` (hyphen in module name breaks attr lookup) - pyproject.toml: add [tool.pytest.ini_options] (testpaths, addopts) - setup.py: DELETE (redundant with pyproject.toml; had unfilled placeholders for description, url, and author_email) - .github/workflows/code-linting.yml: downgrade actions/checkout@v6→@v4 and actions/setup-python@v6→@v5 (v6 does not exist); add pull_request: trigger - .readthedocs.yaml: set fail_on_warning: true; add `pip install .` so autodoc can import the package; remove unused submodules config - .dockerignore: expand from 2 entries to 20 (docs, assets, CI configs, __pycache__, dist, build, venv, .coverage, etc.) - CHANGELOG.md: fix unclosed </summary> tag; add proper [Unreleased] section - LICENSE: update copyright year 2021 → 2021-2026 - .gitattributes: fix typo `charecter` → `character` - .github/dependabot.yml: fix typo `dependecies` → `dependencies`; remove stale click/celery ignore entries (celery >=5.2 works with click >=8) - pkg-name/api/__init__.py: add `__all__ = []` to make wildcard export explicit - pkg-name/errors/errors.py: add PkgNameError base exception class - pkg-name/errors/warnings.py: add PkgNameWarning base warning class - docs/requirements-doc.txt: loosen pinning from `==` to `~=` for security patches --- New Files Added --- - .github/workflows/tests.yml: pytest CI on Python 3.10/3.12/3.13 - .github/workflows/publish.yml: PyPI publish via Trusted Publisher (OIDC) on release - .github/ISSUE_TEMPLATE/bug_report.md: structured bug report template - .github/ISSUE_TEMPLATE/feature_request.md: structured feature request template - .github/PULL_REQUEST_TEMPLATE.md: PR checklist template - CONTRIBUTING.md: dev setup, coding standards, test/docs build instructions - CODE_OF_CONDUCT.md: Contributor Covenant v2.1 - SECURITY.md: vulnerability disclosure policy - .pre-commit-config.yaml: pre-commit hooks (trailing-whitespace, end-of-file, check-yaml/toml/json, debug-statements, flake8 syntax errors) - tests/__init__.py + tests/test_package.py: placeholder test suite - conftest.py: pytest shared fixtures entrypoint - docs/_static/.gitkeep: required by docs/conf.py html_static_path - docs/_templates/.gitkeep: required by docs/conf.py templates_path Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a2f3e71 commit f111e5d

36 files changed

+556
-146
lines changed

.dockerignore

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,25 @@
11
.git
2-
.dockerignore
2+
.github
3+
.gitignore
4+
.gitattributes
5+
.travis.yml
6+
.readthedocs.yaml
7+
.flake8
8+
.pre-commit-config.yaml
9+
docs/
10+
assets/
11+
*.md
12+
__pycache__/
13+
*.pyc
14+
*.pyo
15+
.pytest_cache/
16+
.mypy_cache/
17+
htmlcov/
18+
.coverage
19+
dist/
20+
build/
21+
*.egg-info/
22+
venv/
23+
.venv/
24+
env/
25+
.env

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# docs: https://flake8.pycqa.org/en/latest/user/configuration.html
33
[flake8]
44
# Exclude the directory to reduce .flake8 traverse
5-
exclue =
5+
exclude =
66
# .git is for version control, no need to traverse
77
.git,
88

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*.eps binary
4040

4141
# Scripts
42-
# lf = line feeds, used by most *.nix for end-line charecter
42+
# lf = line feeds, used by most *.nix for end-line character
4343
# cr = carriage return used as crlf in windows operating system
4444
*.sh text eol=lf
4545
*.bash text eol=lf
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug or unexpected behaviour
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ZenithClown
7+
---
8+
9+
## Description
10+
11+
A clear and concise description of what the bug is.
12+
13+
## Steps to Reproduce
14+
15+
1. Step 1
16+
2. Step 2
17+
3. ...
18+
19+
## Expected Behaviour
20+
21+
What you expected to happen.
22+
23+
## Actual Behaviour
24+
25+
What actually happened. Include error messages, stack traces, or screenshots if applicable.
26+
27+
## Environment
28+
29+
- OS: [e.g. Ubuntu 22.04, Windows 11]
30+
- Python version: [e.g. 3.12.0]
31+
- Package version: [e.g. 1.0.0]
32+
33+
## Additional Context
34+
35+
Any other context about the problem.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: '[FEAT] '
5+
labels: enhancement
6+
assignees: ZenithClown
7+
---
8+
9+
## Summary
10+
11+
A clear and concise description of the feature you would like.
12+
13+
## Motivation
14+
15+
Why is this feature needed? What problem does it solve?
16+
17+
## Proposed Solution
18+
19+
Describe the solution you would like, including API design if relevant.
20+
21+
## Alternatives Considered
22+
23+
Any alternative solutions or features you have considered.
24+
25+
## Additional Context
26+
27+
Any other context, mockups, or examples.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
## Summary
2+
3+
<!-- Provide a brief description of the changes in this PR -->
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change that fixes an issue)
8+
- [ ] New feature (non-breaking change that adds functionality)
9+
- [ ] Breaking change (fix or feature that causes existing functionality to change)
10+
- [ ] Documentation update
11+
- [ ] Refactor / Code efficiency improvement
12+
13+
## Related Issues
14+
15+
Closes #<!-- issue number -->
16+
17+
## Checklist
18+
19+
- [ ] My code follows the project's coding style
20+
- [ ] I have updated `CHANGELOG.md` with a note about this change
21+
- [ ] I have added or updated tests for the changed functionality
22+
- [ ] All existing tests pass (`python -m pytest tests/ -v`)
23+
- [ ] Flake8 linting passes (`flake8 . --count --select=E9,F63,F7,F82`)
24+
- [ ] I have updated the documentation if applicable
25+
26+
## Testing Done
27+
28+
<!-- Describe how you tested these changes -->

.github/dependabot.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
version: 2
77
updates:
88

9-
# maintain dependecies for python-packages using pip
9+
# maintain dependencies for python-packages using pip
1010
- package-ecosystem: "pip"
1111
directory: "/" # Location of package manifests
1212
schedule:
@@ -24,15 +24,8 @@ updates:
2424
include: "scope"
2525
# increase pull request limit to 10 for pip dependencies
2626
open-pull-requests-limit: 10
27-
ignore:
28-
# ignore all version check for click as:
29-
# celery 5.1.2 depends on click<8.0 and >=7.0
30-
- dependency-name: "click"
31-
# also ignore celery update
32-
# uncomment when dependency issue is resolved
33-
- dependency-name: "celery"
34-
35-
# maintain dependecies for github-actions
27+
28+
# maintain dependencies for github-actions
3629
- package-ecosystem: "github-actions"
3730
directory: "/" # Location of package manifests
3831
schedule:

.github/workflows/code-linting.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ name: Code Linting (flake8)
66
on:
77
push:
88
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
911

1012
jobs:
1113
build:
@@ -17,9 +19,9 @@ jobs:
1719
python-version: ["3.10", "3.13", "3.14"]
1820

1921
steps:
20-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@v4
2123
- name: Setup Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v6
24+
uses: actions/setup-python@v5
2325
with:
2426
python-version: ${{ matrix.python-version }}
2527
- name: Installing flake8 and Upgrade pip

.github/workflows/publish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow publishes the package to PyPI on GitHub Release creation.
2+
# Uses Trusted Publisher (OIDC) — no API tokens required.
3+
# Docs: https://docs.pypi.org/trusted-publishers/
4+
#
5+
# Before first use, configure a Trusted Publisher on PyPI:
6+
# https://pypi.org/manage/account/publishing/
7+
8+
name: Publish to PyPI
9+
10+
on:
11+
release:
12+
types: [published]
13+
14+
jobs:
15+
publish:
16+
name: Publish to PyPI
17+
runs-on: ubuntu-latest
18+
environment: pypi-publish
19+
permissions:
20+
id-token: write # Required for Trusted Publisher (OIDC)
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.12"
28+
- name: Install build tools
29+
run: |
30+
python -m pip install --upgrade pip
31+
python -m pip install build
32+
- name: Build package
33+
run: python -m build
34+
- name: Publish to PyPI
35+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/tests.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow runs the test suite across the Python version matrix.
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Run Tests (pytest)
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
test:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: ["3.10", "3.12", "3.13"]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Setup Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
python -m pip install pytest
31+
python -m pip install -e .
32+
- name: Run tests with pytest
33+
run: |
34+
python -m pytest tests/ -v --tb=short

0 commit comments

Comments
 (0)