python-package-template-pypi 0.2.3__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {python_package_template_pypi-0.2.3 → python_package_template_pypi-0.3.0}/LICENSE +1 -1
  2. python_package_template_pypi-0.3.0/PKG-INFO +73 -0
  3. python_package_template_pypi-0.3.0/README.md +33 -0
  4. python_package_template_pypi-0.3.0/pyproject.toml +47 -0
  5. {python_package_template_pypi-0.2.3 → python_package_template_pypi-0.3.0}/src/python_package_template/__init__.py +1 -4
  6. {python_package_template_pypi-0.2.3 → python_package_template_pypi-0.3.0}/src/python_package_template/main.py +6 -6
  7. python_package_template_pypi-0.2.3/.devcontainer/Dockerfile +0 -19
  8. python_package_template_pypi-0.2.3/.devcontainer/compose.yml +0 -15
  9. python_package_template_pypi-0.2.3/.devcontainer/devcontainer.json +0 -25
  10. python_package_template_pypi-0.2.3/.github/CODEOWNERS +0 -1
  11. python_package_template_pypi-0.2.3/.github/ISSUE_TEMPLATE/bug.yml +0 -42
  12. python_package_template_pypi-0.2.3/.github/ISSUE_TEMPLATE/config.yml +0 -10
  13. python_package_template_pypi-0.2.3/.github/ISSUE_TEMPLATE/feature.yml +0 -21
  14. python_package_template_pypi-0.2.3/.github/PULL_REQUEST_TEMPLATE.md +0 -3
  15. python_package_template_pypi-0.2.3/.github/dependabot.yml +0 -13
  16. python_package_template_pypi-0.2.3/.github/workflows/ci.yml +0 -24
  17. python_package_template_pypi-0.2.3/.github/workflows/release.yml +0 -45
  18. python_package_template_pypi-0.2.3/.github/workflows/stale.yml +0 -24
  19. python_package_template_pypi-0.2.3/.gitignore +0 -42
  20. python_package_template_pypi-0.2.3/.pre-commit-config.yaml +0 -46
  21. python_package_template_pypi-0.2.3/PKG-INFO +0 -240
  22. python_package_template_pypi-0.2.3/README.md +0 -189
  23. python_package_template_pypi-0.2.3/docs/_static/.gitkeep +0 -0
  24. python_package_template_pypi-0.2.3/docs/add_five.rst +0 -19
  25. python_package_template_pypi-0.2.3/docs/conf.py +0 -37
  26. python_package_template_pypi-0.2.3/docs/index.rst +0 -10
  27. python_package_template_pypi-0.2.3/docs/subtract_three.rst +0 -19
  28. python_package_template_pypi-0.2.3/pyproject.toml +0 -65
  29. python_package_template_pypi-0.2.3/readthedocs.yaml +0 -18
  30. python_package_template_pypi-0.2.3/requirements.txt +0 -1
  31. python_package_template_pypi-0.2.3/ruff.toml +0 -37
  32. python_package_template_pypi-0.2.3/src/python_package_template/__main__.py +0 -10
  33. python_package_template_pypi-0.2.3/src/python_package_template/cli.py +0 -23
  34. python_package_template_pypi-0.2.3/tests/__init__.py +0 -5
  35. python_package_template_pypi-0.2.3/tests/cli_test.py +0 -19
  36. python_package_template_pypi-0.2.3/tests/conftest.py +0 -5
  37. python_package_template_pypi-0.2.3/tests/main_test.py +0 -19
  38. python_package_template_pypi-0.2.3/tox.toml +0 -72
  39. {python_package_template_pypi-0.2.3 → python_package_template_pypi-0.3.0}/src/python_package_template/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Daniel Mizsak
3
+ Copyright (c) Daniel Mizsak
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,73 @@
1
+ Metadata-Version: 2.3
2
+ Name: python-package-template-pypi
3
+ Version: 0.3.0
4
+ Summary: Python package template configuration.
5
+ Keywords: python,template,package,github,pypi
6
+ Author: Daniel Mizsak
7
+ Author-email: Daniel Mizsak <info@pythonvilag.hu>
8
+ License: MIT License
9
+
10
+ Copyright (c) Daniel Mizsak
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ Classifier: License :: OSI Approved :: MIT License
30
+ Classifier: Programming Language :: Python :: 3 :: Only
31
+ Classifier: Programming Language :: Python :: 3.12
32
+ Classifier: Programming Language :: Python :: 3.13
33
+ Classifier: Programming Language :: Python :: 3.14
34
+ Requires-Dist: numpy==2.4.1
35
+ Requires-Python: >=3.12
36
+ Project-URL: Documentation, https://daniel-mizsak.github.io/python-package-template/
37
+ Project-URL: Issues, https://github.com/daniel-mizsak/python-package-template/issues/
38
+ Project-URL: Repository, https://github.com/daniel-mizsak/python-package-template/
39
+ Description-Content-Type: text/markdown
40
+
41
+ # <div align="center">🐍 python-package-template</div>
42
+
43
+ <div align="center">
44
+ <kbd>
45
+ <a href="https://github.com/daniel-mizsak/python-package-template/actions/workflows/ci.yml" target="_blank"><img src="https://github.com/daniel-mizsak/python-package-template/actions/workflows/ci.yml/badge.svg" alt="build status"></a>
46
+ <a href="https://codecov.io/gh/daniel-mizsak/python-package-template" target="_blank"><img src="https://codecov.io/gh/daniel-mizsak/python-package-template/graph/badge.svg?token=SDXG1S8PVM" alt="codecov"></a>
47
+ <a href="https://results.pre-commit.ci/latest/github/daniel-mizsak/python-package-template/main" target="_blank"><img src="https://results.pre-commit.ci/badge/github/daniel-mizsak/python-package-template/main.svg" alt="pre-commit.ci status"></a>
48
+ <a href="https://pypi.org/project/python-package-template-pypi" target="_blank"><img src="https://img.shields.io/pypi/v/python-package-template-pypi" alt="pypi version"></a>
49
+ <a href="https://img.shields.io/github/license/daniel-mizsak/python-package-template" target="_blank"><img src="https://img.shields.io/github/license/daniel-mizsak/python-package-template" alt="license"></a>
50
+ </kbd>
51
+ </div>
52
+
53
+ ## Overview
54
+
55
+ Python package template configuration.
56
+
57
+ ## Getting started
58
+
59
+ > [!CAUTION]
60
+ > This template represents my personal understanding of the current best practices.\
61
+ > It is advised to do further research before implementing these configurations in your environment.
62
+
63
+ Documentation is available at the [GitHub Pages of this repository](https://daniel-mizsak.github.io/python-package-template).
64
+
65
+ <hr>
66
+
67
+ <div align="center">
68
+ <strong>⭐ Star the repository if you found it useful ⭐</strong>
69
+ <br>
70
+ <a href="https://github.com/daniel-mizsak/repository-template" target="_blank">Repository Template</a> |
71
+ <a href="https://github.com/daniel-mizsak/workflows" target="_blank">Reusable Workflows</a> |
72
+ <a href="https://github.com/daniel-mizsak/mtjd" target="_blank">Development Environment </a>
73
+ </div>
@@ -0,0 +1,33 @@
1
+ # <div align="center">🐍 python-package-template</div>
2
+
3
+ <div align="center">
4
+ <kbd>
5
+ <a href="https://github.com/daniel-mizsak/python-package-template/actions/workflows/ci.yml" target="_blank"><img src="https://github.com/daniel-mizsak/python-package-template/actions/workflows/ci.yml/badge.svg" alt="build status"></a>
6
+ <a href="https://codecov.io/gh/daniel-mizsak/python-package-template" target="_blank"><img src="https://codecov.io/gh/daniel-mizsak/python-package-template/graph/badge.svg?token=SDXG1S8PVM" alt="codecov"></a>
7
+ <a href="https://results.pre-commit.ci/latest/github/daniel-mizsak/python-package-template/main" target="_blank"><img src="https://results.pre-commit.ci/badge/github/daniel-mizsak/python-package-template/main.svg" alt="pre-commit.ci status"></a>
8
+ <a href="https://pypi.org/project/python-package-template-pypi" target="_blank"><img src="https://img.shields.io/pypi/v/python-package-template-pypi" alt="pypi version"></a>
9
+ <a href="https://img.shields.io/github/license/daniel-mizsak/python-package-template" target="_blank"><img src="https://img.shields.io/github/license/daniel-mizsak/python-package-template" alt="license"></a>
10
+ </kbd>
11
+ </div>
12
+
13
+ ## Overview
14
+
15
+ Python package template configuration.
16
+
17
+ ## Getting started
18
+
19
+ > [!CAUTION]
20
+ > This template represents my personal understanding of the current best practices.\
21
+ > It is advised to do further research before implementing these configurations in your environment.
22
+
23
+ Documentation is available at the [GitHub Pages of this repository](https://daniel-mizsak.github.io/python-package-template).
24
+
25
+ <hr>
26
+
27
+ <div align="center">
28
+ <strong>⭐ Star the repository if you found it useful ⭐</strong>
29
+ <br>
30
+ <a href="https://github.com/daniel-mizsak/repository-template" target="_blank">Repository Template</a> |
31
+ <a href="https://github.com/daniel-mizsak/workflows" target="_blank">Reusable Workflows</a> |
32
+ <a href="https://github.com/daniel-mizsak/mtjd" target="_blank">Development Environment </a>
33
+ </div>
@@ -0,0 +1,47 @@
1
+ # Build System
2
+ [build-system]
3
+ requires = ["uv_build"]
4
+ build-backend = "uv_build"
5
+
6
+ # Project Metadata
7
+ [project]
8
+ name = "python-package-template-pypi" # Name has to be unique on pypi.
9
+ version = "0.3.0"
10
+ description = "Python package template configuration."
11
+ readme = "README.md"
12
+ license = { file = "LICENSE" }
13
+ authors = [{ name = "Daniel Mizsak", email = "info@pythonvilag.hu" }]
14
+ keywords = ["python", "template", "package", "github", "pypi"]
15
+ classifiers = [
16
+ "License :: OSI Approved :: MIT License",
17
+ "Programming Language :: Python :: 3 :: Only",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ ]
22
+ requires-python = ">=3.12"
23
+ dependencies = ["numpy==2.4.1"]
24
+
25
+ [project.urls]
26
+ Repository = "https://github.com/daniel-mizsak/python-package-template/"
27
+ Documentation = "https://daniel-mizsak.github.io/python-package-template/"
28
+ Issues = "https://github.com/daniel-mizsak/python-package-template/issues/"
29
+
30
+ [dependency-groups]
31
+ dev = ["coverage", "mypy", "nox", "pre-commit", "pytest", "ruff"]
32
+ docs = ["zensical", "mkdocstrings-python"]
33
+
34
+ # Tools
35
+ # Uv
36
+ [tool.uv.build-backend]
37
+ module-root = "src"
38
+ module-name = "python_package_template"
39
+
40
+ # MyPy
41
+ [tool.mypy]
42
+ ignore_missing_imports = true
43
+ pretty = true
44
+ show_column_numbers = true
45
+ show_error_context = true
46
+ strict = true
47
+ warn_unreachable = true
@@ -1,12 +1,9 @@
1
1
  """
2
- Init file for the package.
2
+ Python package template configuration.
3
3
 
4
4
  @author "Daniel Mizsak" <info@pythonvilag.hu>
5
5
  """
6
6
 
7
- import importlib.metadata
8
-
9
7
  from python_package_template.main import add_five, subtract_three
10
8
 
11
9
  __all__ = ["add_five", "subtract_three"]
12
- __version__ = importlib.metadata.version("python-package-template-pypi")
@@ -7,25 +7,25 @@ Main module of the package.
7
7
  import numpy as np
8
8
 
9
9
 
10
- def add_five(x: int) -> int:
10
+ def add_five(number: int) -> int:
11
11
  """Increment the input by 5.
12
12
 
13
13
  Args:
14
- x (int): The input number.
14
+ number (int): The input number.
15
15
 
16
16
  Returns:
17
17
  int: The input incremented by 5.
18
18
  """
19
- return x + 5
19
+ return number + 5
20
20
 
21
21
 
22
- def subtract_three(x: int) -> int:
22
+ def subtract_three(number: int) -> int:
23
23
  """Decrement the input by 3.
24
24
 
25
25
  Args:
26
- x (int): The input number.
26
+ number (int): The input number.
27
27
 
28
28
  Returns:
29
29
  int: The input decremented by 3.
30
30
  """
31
- return int(np.subtract(x, 3))
31
+ return int(np.subtract(number, 3))
@@ -1,19 +0,0 @@
1
- ARG BASE_IMAGE=python:3.12
2
- FROM ${BASE_IMAGE}
3
- LABEL maintainer="Daniel Mizsak"
4
-
5
- ARG USER=vscode
6
- ENV DEBIAN_FRONTEND=noninteractive
7
- ENV LANG=C.UTF-8
8
- ENV TZ=Europe/Copenhagen
9
-
10
- RUN apt update --quiet --quiet --yes && \
11
- apt install --no-install-recommends --quiet --quiet --yes \
12
- build-essential \
13
- curl \
14
- git && \
15
- apt clean --quiet --quiet && \
16
- rm --recursive --force /var/lib/apt/lists/* && \
17
- rm --recursive --force /tmp/*
18
-
19
- WORKDIR /workspace
@@ -1,15 +0,0 @@
1
- ---
2
- # Documentation:
3
- # - https://code.visualstudio.com/docs/devcontainers/create-dev-container#_use-docker-compose
4
- # - https://stackoverflow.com/questions/69635634/how-to-use-vs-code-dev-container-with-existing-docker-compose-file
5
- # - https://xebia.com/blog/how-to-create-a-devcontainer-for-your-python-project/
6
-
7
- services:
8
- ppt-devcontainer:
9
- build:
10
- context: ..
11
- dockerfile: .devcontainer/Dockerfile
12
- container_name: ppt-devcontainer
13
- tty: true
14
- volumes:
15
- - ../:/workspace
@@ -1,25 +0,0 @@
1
- {
2
- "name": "Python Package Template Development Environment",
3
- "dockerComposeFile": "compose.yml",
4
- "service": "ppt-devcontainer",
5
- "workspaceFolder": "/workspace",
6
- "postCreateCommand": "pip install -e '.[dev]'",
7
- "customizations": {
8
- "vscode": {
9
- "python.defaultInterpreterPath": "/usr/local/bin/python",
10
- "extensions": [
11
- "njpwerner.autodocstring",
12
- "aaron-bond.better-comments",
13
- "streetsidesoftware.code-spell-checker",
14
- "tamasfe.even-better-toml",
15
- "GitHub.copilot",
16
- "eamodio.gitlens",
17
- "oderwat.indent-rainbow",
18
- "ms-python.mypy-type-checker",
19
- "ms-python.python",
20
- "mechatroner.rainbow-csv",
21
- "charliermarsh.ruff"
22
- ]
23
- }
24
- }
25
- }
@@ -1 +0,0 @@
1
- * @daniel-mizsak
@@ -1,42 +0,0 @@
1
- ---
2
- name: Bug report
3
- description: Create a report to help us improve.
4
- labels: ["bug"]
5
- title: "[BUG]: "
6
- assignees:
7
- - daniel-mizsak
8
-
9
- body:
10
- - type: markdown
11
- attributes:
12
- value: |
13
- Thanks for taking the time to fill out this bug report!
14
-
15
- - type: input
16
- id: version
17
- attributes:
18
- label: Package version
19
- placeholder: vX.Y.Z
20
- validations:
21
- required: true
22
-
23
- - type: dropdown
24
- id: os
25
- attributes:
26
- label: Operating system
27
- description: The operating system you are using.
28
- options:
29
- - Windows
30
- - macOS
31
- - Linux
32
- default: 0
33
- validations:
34
- required: true
35
-
36
- - type: textarea
37
- id: bug
38
- attributes:
39
- label: Bug description
40
- description: A clear and concise description of what the bug is.
41
- validations:
42
- required: true
@@ -1,10 +0,0 @@
1
- # Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2
- blank_issues_enabled: true
3
- contact_links:
4
- - name: Documentation
5
- url: https://python-package-template-pypi.readthedocs.io/en/latest/
6
- about: Check the documentation before opening an issue.
7
-
8
- - name: PyPA Code of Conduct
9
- url: https://www.pypa.io/en/latest/code-of-conduct/
10
- about: Read and follow the PyPA Code of Conduct.
@@ -1,21 +0,0 @@
1
- ---
2
- name: Feature request
3
- description: Suggest an idea for this project.
4
- labels: ["enhancement"]
5
- title: "[FEATURE]: "
6
- assignees:
7
- - daniel-mizsak
8
-
9
- body:
10
- - type: markdown
11
- attributes:
12
- value: |
13
- Thanks for taking the time to fill out this feature request!
14
-
15
- - type: textarea
16
- id: feature
17
- attributes:
18
- label: Feature description
19
- description: A clear and concise description of what the feature is.
20
- validations:
21
- required: true
@@ -1,3 +0,0 @@
1
- - [ ] Linting passes
2
- - [ ] Tests are added and passing
3
- - [ ] Documentation is updated
@@ -1,13 +0,0 @@
1
- ---
2
- version: 2
3
-
4
- updates:
5
- - package-ecosystem: "github-actions"
6
- directory: "/"
7
- schedule:
8
- interval: "weekly"
9
-
10
- - package-ecosystem: "pip"
11
- directory: "/"
12
- schedule:
13
- interval: "weekly"
@@ -1,24 +0,0 @@
1
- ---
2
- name: CI
3
- on:
4
- workflow_dispatch:
5
- push:
6
- branches:
7
- - main
8
- pull_request:
9
- branches:
10
- - main
11
- schedule:
12
- - cron: '0 12 * * 6' # Every Saturday at 12:00
13
-
14
- concurrency:
15
- group: ${{ github.workflow }}-${{ github.ref }}
16
- cancel-in-progress: true
17
-
18
- jobs:
19
- tox:
20
- uses: daniel-mizsak/workflows/.github/workflows/tox.yml@main
21
- with:
22
- python_versions: "['3.11', '3.12']"
23
- codecov: true
24
- secrets: inherit
@@ -1,45 +0,0 @@
1
- ---
2
- name: release
3
- on:
4
- push:
5
- tags:
6
- - "*"
7
-
8
- jobs:
9
- tox:
10
- uses: daniel-mizsak/workflows/.github/workflows/tox.yml@main
11
- with:
12
- python_versions: "['3.11', '3.12']"
13
- codecov: true
14
- secrets: inherit
15
-
16
-
17
- pypi-publish:
18
- needs: tox
19
- runs-on: ubuntu-latest
20
- permissions:
21
- id-token: write
22
-
23
- steps:
24
- - name: Download build artifacts
25
- uses: actions/download-artifact@v4
26
- with:
27
- name: build
28
- path: dist
29
-
30
- - name: Publish build artifacts to PyPI
31
- uses: pypa/gh-action-pypi-publish@release/v1
32
-
33
-
34
- gh-pages-publish:
35
- needs: tox
36
- runs-on: ubuntu-latest
37
- permissions:
38
- pages: write
39
- id-token: write
40
-
41
- steps:
42
- - name: Publish to GitHub Pages
43
- uses: actions/deploy-pages@v4
44
- with:
45
- artifact_name: docs
@@ -1,24 +0,0 @@
1
- ---
2
- name: stale
3
- on:
4
- schedule:
5
- - cron: "30 1 * * 1"
6
-
7
- jobs:
8
- stale:
9
- runs-on: ubuntu-latest
10
- permissions:
11
- issues: write
12
- pull-requests: write
13
-
14
- steps:
15
- - uses: actions/stale@v9
16
- with:
17
- stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
18
- stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
19
- close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
20
- close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
21
- days-before-issue-stale: 30
22
- days-before-pr-stale: 45
23
- days-before-issue-close: 5
24
- days-before-pr-close: 10
@@ -1,42 +0,0 @@
1
- # Project
2
-
3
- # System
4
- .DS_Store
5
- *.log
6
-
7
- # Byte-compiled
8
- __pycache__/
9
- *.py[cod]
10
- *$py.class
11
-
12
- # Distribution / Packaging
13
- .eggs/
14
- *.egg
15
- *.egg-info/
16
- build/
17
- dist/
18
- eggs/
19
- sdist/
20
- wheels/
21
-
22
- # Unit test / Coverage reports
23
- .coverage
24
- .mypy_cache
25
- .pytest_cache
26
- .ruff_cache
27
- .tox
28
- coverage.xml
29
- htmlcov/
30
-
31
- # Jupyter Notebook
32
- .ipynb_checkpoints
33
-
34
- # Environments
35
- .env
36
- .venv
37
- env/
38
- venv/
39
-
40
- # IDE
41
- .idea/
42
- .vscode/
@@ -1,46 +0,0 @@
1
- # See https://pre-commit.com for more information
2
- # See https://pre-commit.com/hooks.html for more hooks
3
-
4
- # exclude: ""
5
-
6
- # pre-commit ci
7
- ci:
8
- autoupdate_schedule: monthly
9
-
10
- # pre-commit
11
- repos:
12
- - repo: https://github.com/pre-commit/pre-commit-hooks
13
- rev: v5.0.0
14
- hooks:
15
- - id: check-added-large-files
16
- args: [--maxkb=2000]
17
- - id: check-docstring-first
18
- - id: check-merge-conflict
19
- - id: check-toml
20
- - id: check-yaml
21
- - id: detect-private-key
22
- - id: end-of-file-fixer
23
- - id: name-tests-test
24
- - id: trailing-whitespace
25
-
26
- # gitleaks
27
- - repo: https://github.com/gitleaks/gitleaks
28
- rev: v8.22.1
29
- hooks:
30
- - id: gitleaks
31
-
32
- # ruff
33
- - repo: https://github.com/astral-sh/ruff-pre-commit
34
- rev: v0.8.6
35
- hooks:
36
- # Ruff linting
37
- - id: ruff
38
- args: [--line-length=120]
39
- # Ruff formatting
40
- - id: ruff-format
41
-
42
- # codespell
43
- - repo: https://github.com/codespell-project/codespell
44
- rev: v2.3.0
45
- hooks:
46
- - id: codespell