python-package-template-pypi 0.2.0__tar.gz → 0.2.3__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 (37) hide show
  1. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/workflows/release.yml +7 -12
  2. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/PKG-INFO +11 -21
  3. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/README.md +10 -20
  4. python_package_template_pypi-0.2.3/requirements.txt +1 -0
  5. python_package_template_pypi-0.2.0/requirements.txt +0 -1
  6. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.devcontainer/Dockerfile +0 -0
  7. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.devcontainer/compose.yml +0 -0
  8. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.devcontainer/devcontainer.json +0 -0
  9. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/CODEOWNERS +0 -0
  10. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/ISSUE_TEMPLATE/bug.yml +0 -0
  11. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  12. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/ISSUE_TEMPLATE/feature.yml +0 -0
  13. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  14. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/dependabot.yml +0 -0
  15. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/workflows/ci.yml +0 -0
  16. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.github/workflows/stale.yml +0 -0
  17. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.gitignore +0 -0
  18. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/.pre-commit-config.yaml +0 -0
  19. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/LICENSE +0 -0
  20. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/docs/_static/.gitkeep +0 -0
  21. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/docs/add_five.rst +0 -0
  22. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/docs/conf.py +0 -0
  23. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/docs/index.rst +0 -0
  24. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/docs/subtract_three.rst +0 -0
  25. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/pyproject.toml +0 -0
  26. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/readthedocs.yaml +0 -0
  27. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/ruff.toml +0 -0
  28. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/src/python_package_template/__init__.py +0 -0
  29. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/src/python_package_template/__main__.py +0 -0
  30. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/src/python_package_template/cli.py +0 -0
  31. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/src/python_package_template/main.py +0 -0
  32. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/src/python_package_template/py.typed +0 -0
  33. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/tests/__init__.py +0 -0
  34. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/tests/cli_test.py +0 -0
  35. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/tests/conftest.py +0 -0
  36. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/tests/main_test.py +0 -0
  37. {python_package_template_pypi-0.2.0 → python_package_template_pypi-0.2.3}/tox.toml +0 -0
@@ -11,7 +11,6 @@ jobs:
11
11
  with:
12
12
  python_versions: "['3.11', '3.12']"
13
13
  codecov: true
14
- docs: true
15
14
  secrets: inherit
16
15
 
17
16
 
@@ -19,7 +18,7 @@ jobs:
19
18
  needs: tox
20
19
  runs-on: ubuntu-latest
21
20
  permissions:
22
- id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
21
+ id-token: write
23
22
 
24
23
  steps:
25
24
  - name: Download build artifacts
@@ -35,16 +34,12 @@ jobs:
35
34
  gh-pages-publish:
36
35
  needs: tox
37
36
  runs-on: ubuntu-latest
37
+ permissions:
38
+ pages: write
39
+ id-token: write
38
40
 
39
41
  steps:
40
- - name: Download docs artifacts
41
- uses: actions/download-artifact@v4
42
- with:
43
- name: docs
44
- path: docs
45
-
46
- - name: Publish docs artifacts to gh-pages
47
- uses: peaceiris/actions-gh-pages@v4
42
+ - name: Publish to GitHub Pages
43
+ uses: actions/deploy-pages@v4
48
44
  with:
49
- github_token: ${{ secrets.GITHUB_TOKEN }}
50
- publish_dir: docs
45
+ artifact_name: docs
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-package-template-pypi
3
- Version: 0.2.0
3
+ Version: 0.2.3
4
4
  Summary: A GitHub template with my python package configurations.
5
5
  Project-URL: Documentation, https://python-package-template-pypi.readthedocs.io/en/latest/
6
6
  Project-URL: Homepage, https://pythonvilag.hu/
@@ -97,7 +97,7 @@ For documentation:
97
97
  Codecov is used to check the code coverage of the tests.\
98
98
  It also provides a badge that can be added to the README file.
99
99
 
100
- Codecov is set up to be part of the [tox reusable workflow](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/tox.yml), but for this action it is important to generate the coverage report using the `--cov-report=xml` flag in the `pyproject.toml` file.
100
+ Codecov is set up to be part of the [tox reusable workflow](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/tox.yml), but for this action it is important to generate the coverage report. Currently it is achieved by adding `--cov-report=xml:{work_dir}/artifacts/coverage.xml` as part of the `tox.toml` configuration and uploading/downloading the results using [GitHub Artifacts](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow).
101
101
 
102
102
  ### Pre-Commit
103
103
  Pre-Commit is used to run certain checks on the code before it is committed.\
@@ -152,12 +152,13 @@ ruff check src tests
152
152
  ```
153
153
 
154
154
  ### Tox
155
- Tox is useful for running the above tools in an isolated environment.\
155
+ Tox is useful for running the above tools in isolated environments.\
156
156
  It makes sure that the package setup is consistent and that the tools are working as expected.\
157
157
  It can be used to test different python versions and different testing scenarios.
158
+ I am also using it to automatically generate the documentation and build the package.
158
159
 
159
- In this repository tox is set up to use python 3.11, 3.12 and run pytest, ruff, mypy and documentation tests.
160
- The settings are specified in the `tox.ini` file.
160
+ In this repository tox is set up to use python 3.11, 3.12 and run codecov, pytest, ruff, mypy, docs and package building.\
161
+ The settings are specified in the `tox.toml` file.
161
162
 
162
163
  Call tox by running:
163
164
 
@@ -167,7 +168,7 @@ tox
167
168
 
168
169
  ### Documentation
169
170
  The documentation is built with Sphinx and it is hosted both on ReadTheDocs and GitHub Pages.\
170
- Both of these services are recommended, however ReadTheDocs requires a bit more setup, but I prefer it as it does not require an extra feature branch to be present.
171
+ Both of these services are recommended, however ReadTheDocs requires a bit more setup.
171
172
 
172
173
  ## GitHub repository settings
173
174
  The following settings are enabled in my repository settings:
@@ -211,20 +212,10 @@ Target branches: `Default`
211
212
 
212
213
  <br>
213
214
 
214
- Environments:\
215
- `pypi`
216
-
217
- - Deployment protection rules:
218
- - Required reviewers:
219
- `daniel-mizsak`
220
- - Allow administrators to bypass configured protection rules
221
-
222
- <br>
223
-
224
215
  Pages/Build and deployment:
225
216
 
226
- - Source: Deploy from branch
227
- - Branch: `gh-pages` (root)
217
+ - Source: Github Actions
218
+ The actual deployment is done by the `release` workflow.
228
219
 
229
220
  ## Setup PyPi trusted publishing
230
221
  [PyPI publishing settings](https://pypi.org/manage/account/publishing/)
@@ -236,8 +227,7 @@ Add a new pending publisher:
236
227
  - Repository name: `python-package-template`
237
228
  - Workflow name: `release.yml`
238
229
 
239
- (I am currently not using trusted publishing, as it does not support getting called from a reusable GitHub workflow.\
240
- Instead, I am calling my [PyPI publishing workflow](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/pypi.yml) with an API token.)
230
+ Currently I am using a reusable GitHub workflow to test and build the package ([tox](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/tox.yml)), and do the publishing with a separate "non-reusble" workflow, so that trusted publishing can be used.
241
231
 
242
232
  ## More examples
243
233
  I am trying to use this template in all of my repositories and also contribute back here with new best practices I find.
@@ -247,4 +237,4 @@ Some of my other repositories that may be interesting to look at:
247
237
  - [pythonvilag-website](https://github.com/PythonVilag/pythonvilag-website) - Source code that powers the Python Világ website.
248
238
  - [private-lecture-automation](https://github.com/PythonVilag/private-lecture-automation) - Automation tools for private lecture management.
249
239
 
250
- I have also integrated some of the above mentioned tools into my `vscode` settings. You can find them in my [macos-setup](https://github.com/daniel-mizsak/macos-setup/blob/main/dotfiles/vscode/settings.json) repository.
240
+ I have also integrated some of the above mentioned tools into my `vscode` settings. You can find them in my [more-than-just-dotfiles](https://github.com/daniel-mizsak/mtjd/blob/main/dotfiles/vscode/settings.json) repository.
@@ -46,7 +46,7 @@ For documentation:
46
46
  Codecov is used to check the code coverage of the tests.\
47
47
  It also provides a badge that can be added to the README file.
48
48
 
49
- Codecov is set up to be part of the [tox reusable workflow](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/tox.yml), but for this action it is important to generate the coverage report using the `--cov-report=xml` flag in the `pyproject.toml` file.
49
+ Codecov is set up to be part of the [tox reusable workflow](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/tox.yml), but for this action it is important to generate the coverage report. Currently it is achieved by adding `--cov-report=xml:{work_dir}/artifacts/coverage.xml` as part of the `tox.toml` configuration and uploading/downloading the results using [GitHub Artifacts](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/storing-and-sharing-data-from-a-workflow).
50
50
 
51
51
  ### Pre-Commit
52
52
  Pre-Commit is used to run certain checks on the code before it is committed.\
@@ -101,12 +101,13 @@ ruff check src tests
101
101
  ```
102
102
 
103
103
  ### Tox
104
- Tox is useful for running the above tools in an isolated environment.\
104
+ Tox is useful for running the above tools in isolated environments.\
105
105
  It makes sure that the package setup is consistent and that the tools are working as expected.\
106
106
  It can be used to test different python versions and different testing scenarios.
107
+ I am also using it to automatically generate the documentation and build the package.
107
108
 
108
- In this repository tox is set up to use python 3.11, 3.12 and run pytest, ruff, mypy and documentation tests.
109
- The settings are specified in the `tox.ini` file.
109
+ In this repository tox is set up to use python 3.11, 3.12 and run codecov, pytest, ruff, mypy, docs and package building.\
110
+ The settings are specified in the `tox.toml` file.
110
111
 
111
112
  Call tox by running:
112
113
 
@@ -116,7 +117,7 @@ tox
116
117
 
117
118
  ### Documentation
118
119
  The documentation is built with Sphinx and it is hosted both on ReadTheDocs and GitHub Pages.\
119
- Both of these services are recommended, however ReadTheDocs requires a bit more setup, but I prefer it as it does not require an extra feature branch to be present.
120
+ Both of these services are recommended, however ReadTheDocs requires a bit more setup.
120
121
 
121
122
  ## GitHub repository settings
122
123
  The following settings are enabled in my repository settings:
@@ -160,20 +161,10 @@ Target branches: `Default`
160
161
 
161
162
  <br>
162
163
 
163
- Environments:\
164
- `pypi`
165
-
166
- - Deployment protection rules:
167
- - Required reviewers:
168
- `daniel-mizsak`
169
- - Allow administrators to bypass configured protection rules
170
-
171
- <br>
172
-
173
164
  Pages/Build and deployment:
174
165
 
175
- - Source: Deploy from branch
176
- - Branch: `gh-pages` (root)
166
+ - Source: Github Actions
167
+ The actual deployment is done by the `release` workflow.
177
168
 
178
169
  ## Setup PyPi trusted publishing
179
170
  [PyPI publishing settings](https://pypi.org/manage/account/publishing/)
@@ -185,8 +176,7 @@ Add a new pending publisher:
185
176
  - Repository name: `python-package-template`
186
177
  - Workflow name: `release.yml`
187
178
 
188
- (I am currently not using trusted publishing, as it does not support getting called from a reusable GitHub workflow.\
189
- Instead, I am calling my [PyPI publishing workflow](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/pypi.yml) with an API token.)
179
+ Currently I am using a reusable GitHub workflow to test and build the package ([tox](https://github.com/daniel-mizsak/workflows/blob/main/.github/workflows/tox.yml)), and do the publishing with a separate "non-reusble" workflow, so that trusted publishing can be used.
190
180
 
191
181
  ## More examples
192
182
  I am trying to use this template in all of my repositories and also contribute back here with new best practices I find.
@@ -196,4 +186,4 @@ Some of my other repositories that may be interesting to look at:
196
186
  - [pythonvilag-website](https://github.com/PythonVilag/pythonvilag-website) - Source code that powers the Python Világ website.
197
187
  - [private-lecture-automation](https://github.com/PythonVilag/private-lecture-automation) - Automation tools for private lecture management.
198
188
 
199
- I have also integrated some of the above mentioned tools into my `vscode` settings. You can find them in my [macos-setup](https://github.com/daniel-mizsak/macos-setup/blob/main/dotfiles/vscode/settings.json) repository.
189
+ I have also integrated some of the above mentioned tools into my `vscode` settings. You can find them in my [more-than-just-dotfiles](https://github.com/daniel-mizsak/mtjd/blob/main/dotfiles/vscode/settings.json) repository.
@@ -0,0 +1 @@
1
+ numpy==2.2.2
@@ -1 +0,0 @@
1
- numpy==2.2.1