python-package-template-pypi 0.1.0__tar.gz → 0.1.1__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 (35) hide show
  1. python_package_template_pypi-0.1.1/.devcontainer/devcontainer.json +25 -0
  2. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/workflows/ci.yml +1 -1
  3. python_package_template_pypi-0.1.1/.github/workflows/stale.yml +24 -0
  4. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.pre-commit-config.yaml +11 -1
  5. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/LICENSE +1 -1
  6. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/PKG-INFO +4 -4
  7. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/docs/add_five.rst +1 -1
  8. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/docs/index.rst +1 -0
  9. python_package_template_pypi-0.1.1/docs/subtract_three.rst +19 -0
  10. python_package_template_pypi-0.1.1/pyproject.toml +59 -0
  11. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/ruff.toml +1 -0
  12. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/tox.ini +2 -1
  13. python_package_template_pypi-0.1.0/.devcontainer/devcontainer.json +0 -4
  14. python_package_template_pypi-0.1.0/pyproject.toml +0 -59
  15. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/CODEOWNERS +0 -0
  16. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
  17. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  18. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/ISSUE_TEMPLATE/feature.yml +0 -0
  19. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  20. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.github/workflows/release.yml +0 -0
  21. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/.gitignore +0 -0
  22. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/README.md +0 -0
  23. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/docs/_static/.gitkeep +0 -0
  24. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/docs/conf.py +0 -0
  25. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/hatch.toml +0 -0
  26. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/readthedocs.yml +0 -0
  27. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/src/python_package_template/__init__.py +0 -0
  28. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/src/python_package_template/__main__.py +0 -0
  29. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/src/python_package_template/cli.py +0 -0
  30. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/src/python_package_template/main.py +0 -0
  31. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/src/python_package_template/py.typed +0 -0
  32. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/tests/__init__.py +0 -0
  33. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/tests/cli_test.py +0 -0
  34. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/tests/conftest.py +0 -0
  35. {python_package_template_pypi-0.1.0 → python_package_template_pypi-0.1.1}/tests/main_test.py +0 -0
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "Python 3.12 Development Environment",
3
+ "image": "python:3.12",
4
+ "customizations": {
5
+ "vscode": {
6
+ "extensions": [
7
+ "njpwerner.autodocstring",
8
+ "aaron-bond.better-comments",
9
+ "streetsidesoftware.code-spell-checker",
10
+ "tamasfe.even-better-toml",
11
+ "GitHub.copilot",
12
+ "eamodio.gitlens",
13
+ "oderwat.indent-rainbow",
14
+ "ms-python.mypy-type-checker",
15
+ "ms-python.python",
16
+ "charliermarsh.ruff"
17
+ ]
18
+ }
19
+ },
20
+ "postCreateCommand": "pip install -e '.[dev]'",
21
+ "runArgs": [
22
+ "--name",
23
+ "${localEnv:USER}_python_devcontainer"
24
+ ]
25
+ }
@@ -10,6 +10,6 @@ jobs:
10
10
  tox:
11
11
  uses: daniel-mizsak/workflows/.github/workflows/tox.yml@main
12
12
  with:
13
- python-version: "['3.11', '3.12']"
13
+ python-versions: "['3.11', '3.12']"
14
14
  codecov: true
15
15
  secrets: inherit
@@ -0,0 +1,24 @@
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
@@ -3,6 +3,10 @@
3
3
 
4
4
  # exclude: ""
5
5
 
6
+ # pre-commit ci
7
+ ci:
8
+ autoupdate_schedule: monthly
9
+
6
10
  # pre-commit
7
11
  repos:
8
12
  - repo: https://github.com/pre-commit/pre-commit-hooks
@@ -19,9 +23,15 @@ repos:
19
23
  - id: name-tests-test
20
24
  - id: trailing-whitespace
21
25
 
26
+ # gitleaks
27
+ - repo: https://github.com/gitleaks/gitleaks
28
+ rev: v8.18.4
29
+ hooks:
30
+ - id: gitleaks
31
+
22
32
  # ruff
23
33
  - repo: https://github.com/astral-sh/ruff-pre-commit
24
- rev: v0.4.1
34
+ rev: v0.5.6
25
35
  hooks:
26
36
  # Ruff linting
27
37
  - id: ruff
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Daniel Mizsak
3
+ Copyright (c) 2024 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
@@ -1,15 +1,15 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-package-template-pypi
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A github template with my python package configurations.
5
- Project-URL: Homepage, https://pythonvilag.hu/
6
5
  Project-URL: Documentation, https://python-package-template-pypi.readthedocs.io/en/latest/
7
- Project-URL: Repository, https://github.com/daniel-mizsak/python-package-template
6
+ Project-URL: Homepage, https://pythonvilag.hu/
8
7
  Project-URL: Issues, https://github.com/daniel-mizsak/python-package-template/issues
8
+ Project-URL: Repository, https://github.com/daniel-mizsak/python-package-template
9
9
  Author-email: Daniel Mizsak <info@pythonvilag.hu>
10
10
  License: MIT License
11
11
 
12
- Copyright (c) Daniel Mizsak
12
+ Copyright (c) 2024 Daniel Mizsak
13
13
 
14
14
  Permission is hereby granted, free of charge, to any person obtaining a copy
15
15
  of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ To increment the value of a number by five, use the `add_five` function.
16
16
  Description of the `add_five` function:
17
17
  ---------------------------------------
18
18
 
19
- .. autofunction:: python_package_template.main.add_five
19
+ .. autofunction:: python_package_template.add_five
@@ -7,3 +7,4 @@ This is a template repository for my python packages.
7
7
  :hidden:
8
8
 
9
9
  add_five
10
+ subtract_three
@@ -0,0 +1,19 @@
1
+ Subtract three
2
+ ==============
3
+
4
+ Example call
5
+ ------------
6
+
7
+ To decrement the value of a number by three, use the `subtract_three` function.
8
+
9
+ .. code-block:: python
10
+
11
+ from python_package_template import subtract_three
12
+
13
+ print(subtract_three(8))
14
+
15
+
16
+ Description of the `subtract_three` function:
17
+ ---------------------------------------------
18
+
19
+ .. autofunction:: python_package_template.subtract_three
@@ -0,0 +1,59 @@
1
+ # Build System
2
+ [build-system]
3
+ requires = ["hatchling"]
4
+ build-backend = "hatchling.build"
5
+
6
+ # Project Metadata
7
+ [project]
8
+ name = "python-package-template-pypi" # Name has to be unique on pypi.
9
+ version = "0.1.1"
10
+ description = "A github template with my python package configurations."
11
+ readme = "README.md"
12
+ requires-python = ">=3.11"
13
+ license = { file = "LICENSE" }
14
+ authors = [{ name = "Daniel Mizsak", email = "info@pythonvilag.hu" }]
15
+ keywords = ["python", "template", "package", "github", "pypi"]
16
+ classifiers = [
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ ]
22
+ dependencies = []
23
+ [project.optional-dependencies]
24
+ dev = ["hatch", "mypy", "pre-commit", "pytest-cov", "pytest", "ruff", "tox"]
25
+ docs = ["furo", "sphinx", "sphinx-copybutton"]
26
+
27
+ [project.scripts]
28
+ ppt = "python_package_template.cli:main"
29
+
30
+ [project.urls]
31
+ Documentation = "https://python-package-template-pypi.readthedocs.io/en/latest/"
32
+ Homepage = "https://pythonvilag.hu/"
33
+ Issues = "https://github.com/daniel-mizsak/python-package-template/issues"
34
+ Repository = "https://github.com/daniel-mizsak/python-package-template"
35
+
36
+ # Tools
37
+ # Hatch
38
+ [tool.hatch.build.targets.wheel]
39
+ packages = ["src/python_package_template"]
40
+
41
+ # MyPy
42
+ [tool.mypy]
43
+ ignore_missing_imports = true
44
+ pretty = true
45
+ show_column_numbers = true
46
+ show_error_context = true
47
+ strict = true
48
+ warn_unreachable = true
49
+ warn_unused_ignores = true
50
+
51
+ # Pytest
52
+ [tool.pytest.ini_options]
53
+ addopts = "--cov=python_package_template --cov=tests --cov-config=pyproject.toml --cov-report=term-missing --cov-report=html --cov-report=xml"
54
+ testpaths = ["tests"]
55
+
56
+ # Coverage
57
+ [tool.coverage.report]
58
+ exclude_also = ["if TYPE_CHECKING:", "if __name__ == '__main__':"]
59
+ omit = ["**/__main__.py"]
@@ -1,6 +1,7 @@
1
1
  # Exclude a variety of commonly ignored directories.
2
2
  # exclude = [""]
3
3
 
4
+ src = ["src", "test"]
4
5
  line-length = 120
5
6
  indent-width = 4
6
7
 
@@ -35,4 +35,5 @@ commands =
35
35
  extras =
36
36
  docs
37
37
  commands =
38
- sphinx-build -b html -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" --color
38
+ sphinx-build --builder html --doctree-dir "{envtmpdir}{/}doctree" \
39
+ docs "{toxworkdir}{/}docs_out" --color --fail-on-warning
@@ -1,4 +0,0 @@
1
- {
2
- "name": "Python Development Environment",
3
- "image": "python:3.12"
4
- }
@@ -1,59 +0,0 @@
1
- # Build System
2
- [build-system]
3
- requires = ["hatchling"]
4
- build-backend = "hatchling.build"
5
-
6
- # Project Metadata
7
- [project]
8
- name = "python-package-template-pypi" # Name has to be unique on pypi.
9
- version = "0.1.0"
10
- description = "A github template with my python package configurations."
11
- readme = "README.md"
12
- requires-python = ">=3.11"
13
- license = { file = "LICENSE" }
14
- authors = [{ name = "Daniel Mizsak", email = "info@pythonvilag.hu" }]
15
- keywords = ["python", "template", "package", "github", "pypi"]
16
- classifiers = [
17
- "License :: OSI Approved :: MIT License",
18
- "Programming Language :: Python :: 3 :: Only",
19
- "Programming Language :: Python :: 3.11",
20
- "Programming Language :: Python :: 3.12",
21
- ]
22
- dependencies = []
23
- [project.optional-dependencies]
24
- dev = ["hatch", "mypy", "pre-commit", "pytest-cov", "pytest", "ruff", "tox"]
25
- docs = ["furo", "sphinx", "sphinx-copybutton"]
26
-
27
- [project.scripts]
28
- ppt = "python_package_template.cli:main"
29
-
30
- [project.urls]
31
- Homepage = "https://pythonvilag.hu/"
32
- Documentation = "https://python-package-template-pypi.readthedocs.io/en/latest/"
33
- Repository = "https://github.com/daniel-mizsak/python-package-template"
34
- Issues = "https://github.com/daniel-mizsak/python-package-template/issues"
35
-
36
- # Tools
37
- # Hatch
38
- [tool.hatch.build.targets.wheel]
39
- packages = ["src/python_package_template"]
40
-
41
- # MyPy
42
- [tool.mypy]
43
- ignore_missing_imports = true
44
- pretty = true
45
- show_column_numbers = true
46
- show_error_context = true
47
- strict = true
48
- warn_unreachable = true
49
- warn_unused_ignores = true
50
-
51
- # Pytest
52
- [tool.pytest.ini_options]
53
- addopts = "--cov=python_package_template --cov=tests --cov-config=pyproject.toml --cov-report=term-missing --cov-report=html --cov-report=xml"
54
- testpaths = ["tests"]
55
-
56
- # Coverage
57
- [tool.coverage.report]
58
- exclude_also = ["if TYPE_CHECKING:", "if __name__ == '__main__':"]
59
- omit = ["**/__main__.py"]