pylibtemplate 0.0.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.
- pylibtemplate-0.0.1/.coveragerc +19 -0
- pylibtemplate-0.0.1/.github/workflows/measure_code_coverage.yml +61 -0
- pylibtemplate-0.0.1/.github/workflows/publish_documentation_website.yml +56 -0
- pylibtemplate-0.0.1/.github/workflows/publish_release_to_pypi.yml +32 -0
- pylibtemplate-0.0.1/.github/workflows/test_library.yml +37 -0
- pylibtemplate-0.0.1/.gitignore +28 -0
- pylibtemplate-0.0.1/LICENSE +674 -0
- pylibtemplate-0.0.1/PKG-INFO +392 -0
- pylibtemplate-0.0.1/README.md +355 -0
- pylibtemplate-0.0.1/docs/INSTALL.rst +84 -0
- pylibtemplate-0.0.1/docs/Makefile +21 -0
- pylibtemplate-0.0.1/docs/_static/readthedocs_custom.css +34 -0
- pylibtemplate-0.0.1/docs/_templates/custom_class_template.rst +34 -0
- pylibtemplate-0.0.1/docs/_templates/custom_module_template.rst +68 -0
- pylibtemplate-0.0.1/docs/_templates/versions.html +26 -0
- pylibtemplate-0.0.1/docs/api.rst +11 -0
- pylibtemplate-0.0.1/docs/build_docs.py +115 -0
- pylibtemplate-0.0.1/docs/conf.py +207 -0
- pylibtemplate-0.0.1/docs/examples/generating_a_git_repository_template.rst +10 -0
- pylibtemplate-0.0.1/docs/examples.rst +13 -0
- pylibtemplate-0.0.1/docs/how_to_create_a_python_library_using_pylibtemplate.rst +243 -0
- pylibtemplate-0.0.1/docs/index.rst +55 -0
- pylibtemplate-0.0.1/docs/license.rst +8 -0
- pylibtemplate-0.0.1/docs/literature.rst +15 -0
- pylibtemplate-0.0.1/docs/make.bat +37 -0
- pylibtemplate-0.0.1/docs/private_members_to_publish_to_docs.rst +7 -0
- pylibtemplate-0.0.1/examples/generating_a_git_repository_template.py +56 -0
- pylibtemplate-0.0.1/pylibtemplate/__init__.py +918 -0
- pylibtemplate-0.0.1/pylibtemplate/version.py +34 -0
- pylibtemplate-0.0.1/pylibtemplate.egg-info/PKG-INFO +392 -0
- pylibtemplate-0.0.1/pylibtemplate.egg-info/SOURCES.txt +39 -0
- pylibtemplate-0.0.1/pylibtemplate.egg-info/dependency_links.txt +1 -0
- pylibtemplate-0.0.1/pylibtemplate.egg-info/entry_points.txt +2 -0
- pylibtemplate-0.0.1/pylibtemplate.egg-info/requires.txt +17 -0
- pylibtemplate-0.0.1/pylibtemplate.egg-info/top_level.txt +1 -0
- pylibtemplate-0.0.1/pyproject.toml +67 -0
- pylibtemplate-0.0.1/run_tests.sh +34 -0
- pylibtemplate-0.0.1/setup.cfg +4 -0
- pylibtemplate-0.0.1/setup.py +86 -0
- pylibtemplate-0.0.1/tests/test_root.py +166 -0
- pylibtemplate-0.0.1/tox.ini +38 -0
@@ -0,0 +1,19 @@
|
|
1
|
+
[paths]
|
2
|
+
source =
|
3
|
+
../pylibtemplate
|
4
|
+
*/site-packages/pylibtemplate
|
5
|
+
|
6
|
+
[run]
|
7
|
+
branch = true
|
8
|
+
source =
|
9
|
+
pylibtemplate
|
10
|
+
.
|
11
|
+
omit =
|
12
|
+
*/pylibtemplate/version.py
|
13
|
+
|
14
|
+
[report]
|
15
|
+
show_missing = true
|
16
|
+
precision = 2
|
17
|
+
|
18
|
+
exclude_lines =
|
19
|
+
if __name__ == .__main__.:
|
@@ -0,0 +1,61 @@
|
|
1
|
+
name: Measure code coverage
|
2
|
+
# This workflow measures the code coverage of the unit tests for the most recent
|
3
|
+
# version of Python on a virtual machine with the latest Ubuntu operating
|
4
|
+
# system. A badge displaying the code coverage percentage is subsequently made
|
5
|
+
# for the README located at the root of the repository.
|
6
|
+
|
7
|
+
on:
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- main
|
11
|
+
pull_request:
|
12
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
13
|
+
|
14
|
+
jobs:
|
15
|
+
build:
|
16
|
+
if: github.event.pull_request.draft == false
|
17
|
+
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
env:
|
20
|
+
PY_COLORS: 1
|
21
|
+
steps:
|
22
|
+
- name: Checkout
|
23
|
+
uses: actions/checkout@v4
|
24
|
+
|
25
|
+
- name: Setup Python
|
26
|
+
uses: actions/setup-python@v5
|
27
|
+
with:
|
28
|
+
python-version: "3.12"
|
29
|
+
|
30
|
+
- name: Install dependencies
|
31
|
+
run: |
|
32
|
+
python -m pip install --upgrade pip
|
33
|
+
python -m pip install tox
|
34
|
+
|
35
|
+
- name: Measure code coverage via tox
|
36
|
+
run: python -m tox -e py312,report
|
37
|
+
|
38
|
+
- name: Set environment variable for badge
|
39
|
+
run: |
|
40
|
+
echo "COV_PERCENT=$(jq .totals.percent_covered tests/coverage.json \
|
41
|
+
| xargs printf "%.0f")" >> $GITHUB_ENV
|
42
|
+
|
43
|
+
- name: Archive code coverage results
|
44
|
+
uses: actions/upload-artifact@v4
|
45
|
+
with:
|
46
|
+
name: code_coverage_report
|
47
|
+
path: tests/coverage.json
|
48
|
+
if-no-files-found: error
|
49
|
+
|
50
|
+
- name: Create badge
|
51
|
+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
52
|
+
uses: schneegans/dynamic-badges-action@v1.7.0
|
53
|
+
with:
|
54
|
+
auth: ${{ secrets.CODE_COVERAGE_SECRET }}
|
55
|
+
gistID: 7baba2a56d07b59cc49b8323f44416e5
|
56
|
+
filename: pylibtemplate_coverage_badge.json
|
57
|
+
label: Code Coverage
|
58
|
+
message: ${{ env.COV_PERCENT }}%
|
59
|
+
minColorRange: 50
|
60
|
+
maxColorRange: 100
|
61
|
+
valColorRange: ${{ env.COV_PERCENT }}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
name: Publish documentation website
|
2
|
+
# This workflow builds the static documentation site and then deploys it to
|
3
|
+
# GitHub pages.
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches:
|
8
|
+
- main
|
9
|
+
pull_request:
|
10
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
11
|
+
|
12
|
+
# Allows you to run this workflow manually from the Actions tab.
|
13
|
+
workflow_dispatch:
|
14
|
+
|
15
|
+
jobs:
|
16
|
+
build:
|
17
|
+
if: github.event.pull_request.draft == false
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
permissions:
|
21
|
+
id-token: write
|
22
|
+
pages: write
|
23
|
+
steps:
|
24
|
+
- name: Checkout
|
25
|
+
uses: actions/checkout@v4
|
26
|
+
|
27
|
+
- name: Setup Python
|
28
|
+
uses: actions/setup-python@v5
|
29
|
+
with:
|
30
|
+
python-version: "3.12"
|
31
|
+
|
32
|
+
- name: Install dependencies
|
33
|
+
run: |
|
34
|
+
python -m pip install --upgrade pip
|
35
|
+
python -m pip install .[docs]
|
36
|
+
|
37
|
+
- name: Generate documentation
|
38
|
+
run: |
|
39
|
+
git fetch --tags
|
40
|
+
cd docs
|
41
|
+
python build_docs.py
|
42
|
+
cd ../
|
43
|
+
|
44
|
+
- name: Setup pages
|
45
|
+
uses: actions/configure-pages@v5
|
46
|
+
|
47
|
+
- name: Upload artifact
|
48
|
+
uses: actions/upload-pages-artifact@v3
|
49
|
+
with:
|
50
|
+
path: './pages'
|
51
|
+
|
52
|
+
- name: Deploy to GitHub pages
|
53
|
+
id: deployment
|
54
|
+
uses: actions/deploy-pages@v4
|
55
|
+
with:
|
56
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
name: Publish Python Package
|
2
|
+
# This workflow publishes the current release to PyPI.
|
3
|
+
|
4
|
+
on:
|
5
|
+
release:
|
6
|
+
types: [created]
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
deploy:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
environment: release
|
12
|
+
permissions:
|
13
|
+
id-token: write
|
14
|
+
steps:
|
15
|
+
- name: Checkout
|
16
|
+
uses: actions/checkout@v4
|
17
|
+
|
18
|
+
- name: Setup Python
|
19
|
+
uses: actions/setup-python@v5
|
20
|
+
with:
|
21
|
+
python-version: "3.12"
|
22
|
+
|
23
|
+
- name: Install dependencies
|
24
|
+
run: |
|
25
|
+
python -m pip install --upgrade pip
|
26
|
+
python -m pip install setuptools wheel build
|
27
|
+
|
28
|
+
- name: Build wheel
|
29
|
+
run: |
|
30
|
+
python -m build
|
31
|
+
- name: Publish library
|
32
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Test library
|
2
|
+
# This workflow runs the unit tests for the Python versions 3.9, 3.10, and 3.11.
|
3
|
+
|
4
|
+
on:
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- main
|
8
|
+
pull_request:
|
9
|
+
types: [opened, synchronize, reopened, ready_for_review]
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
if: github.event.pull_request.draft == false
|
14
|
+
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
env:
|
17
|
+
PY_COLORS: 1
|
18
|
+
strategy:
|
19
|
+
max-parallel: 5
|
20
|
+
matrix:
|
21
|
+
python-version: ["3.9", "3.10", "3.11"]
|
22
|
+
steps:
|
23
|
+
- name: Checkout
|
24
|
+
uses: actions/checkout@v4
|
25
|
+
|
26
|
+
- name: Setup Python
|
27
|
+
uses: actions/setup-python@v5
|
28
|
+
with:
|
29
|
+
python-version: ${{ matrix.python-version }}
|
30
|
+
|
31
|
+
- name: Install dependencies
|
32
|
+
run: |
|
33
|
+
python -m pip install --upgrade pip
|
34
|
+
python -m pip install tox
|
35
|
+
|
36
|
+
- name: Measure code coverage via tox
|
37
|
+
run: python -m tox -e py
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Ignore select directories
|
2
|
+
__pycache__/
|
3
|
+
.ipynb_checkpoints/
|
4
|
+
examples/examples_data/
|
5
|
+
tests/pylibtemplate/
|
6
|
+
tests/test_data/
|
7
|
+
|
8
|
+
# Ignore select files
|
9
|
+
pylibtemplate/_version.py
|
10
|
+
pylibtemplate/version.py
|
11
|
+
tests/.coverage
|
12
|
+
tests/coverage.json
|
13
|
+
|
14
|
+
# Ignore .pyc files
|
15
|
+
*.pyc
|
16
|
+
|
17
|
+
# Ignore #*# files
|
18
|
+
\#*#
|
19
|
+
*.bak
|
20
|
+
*~
|
21
|
+
|
22
|
+
# Ignore pip install build files.
|
23
|
+
build/
|
24
|
+
*.egg-info/
|
25
|
+
*/_version.py
|
26
|
+
|
27
|
+
# Ignore SLURM output files.
|
28
|
+
slurm-*.out
|