Skip to content

Commit 86a87cc

Browse files
authored
Merge pull request #2 from robert-lieck/dev
merge dev branch
2 parents 7aa2726 + b46ce98 commit 86a87cc

File tree

9 files changed

+52
-7
lines changed

9 files changed

+52
-7
lines changed

Diff for: .github/workflows/docs.yml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches:
66
- main
77
tags: '*'
8-
pull_request:
98
workflow_dispatch:
109

1110
permissions:

Diff for: .github/workflows/docs_dev.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: doc_dev
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
tags: '*'
8+
pull_request:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
20+
- name: generate doc
21+
run: |
22+
pip install -r requirements.txt
23+
pip install -r doc/requirements.txt
24+
cd doc/
25+
make html
26+
make linkcheck

Diff for: .github/workflows/tests.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: tests
33
on:
44
push:
55
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
86
workflow_dispatch:
97

108
jobs:
@@ -39,7 +37,7 @@ jobs:
3937
run: |
4038
pytest --cov=pythontemplatepackage --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml
4139
- name: Upload coverage to Codecov
42-
uses: codecov/codecov-action@v2
40+
uses: codecov/codecov-action@v3
4341
with:
4442
env_vars: OS,PYTHON
4543
fail_ci_if_error: true

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ instance/
7070

7171
# Sphinx documentation
7272
doc/_build/
73+
doc/_autosummary
74+
doc/auto_examples
7375

7476
# PyBuilder
7577
target/

Diff for: doc/conf.py

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@
6161
imgmath_image_format='svg'
6262
# intersphinx mappings
6363
intersphinx_mapping = {}
64+
# report broken links
65+
nitpicky = True
6466

6567
# Add any paths that contain custom static files (such as style sheets) here,
6668
# relative to this directory. They are copied after the builtin static files,

Diff for: doc/index.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ Welcome to PythonTemplatePackage's documentation!
77
:maxdepth: 4
88
:caption: Contents:
99

10+
auto_examples/index.rst
1011
api_summary
1112

1213
.. ...add more elements to table of contents
1314
14-
Code examples are automatically tested
15+
You can include code as part of the documentation, which is automatically tested
1516

1617
>>> print("Hello World")
1718
Hello World
1819

20+
You can also include examples, which are shown in the :doc:`auto_examples/index`.
21+
1922

2023
.. autoclass:: pythontemplatepackage.myclass.MyClass
2124
:members:

Diff for: doc/requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ sphinx-rtd-theme
33
myst-parser
44
sphinx-autodoc-typehints
55
autoclasstoc
6-
sphinx-gallery
6+
sphinx-gallery
7+
matplotlib

Diff for: examples/plot_example.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Example
3+
===========================
4+
5+
An example Python file.
6+
"""
7+
8+
# %%
9+
# Some Python Code
10+
# ------------------------
11+
#
12+
# Example code will be executed and shown in the documentation:
13+
14+
print("Hello World")

Diff for: setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name="pythontemplatepackage",
11-
version="0.0.3",
11+
version="0.0.4",
1212
author="Robert Lieck",
1313
author_email="[email protected]",
1414
description="A template repo for Python packages with GitHub actions and documentation",

0 commit comments

Comments
 (0)