Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
teqp_fork_old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sven Michael Pohl
teqp_fork_old
Commits
1988c067
Commit
1988c067
authored
2 years ago
by
Ian Bell
Browse files
Options
Downloads
Patches
Plain Diff
Autogenerate the API documentation
parent
1638c830
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/source/conf.py
+7
-2
7 additions, 2 deletions
doc/source/conf.py
doc/source/index.rst
+1
-0
1 addition, 0 deletions
doc/source/index.rst
with
8 additions
and
2 deletions
doc/source/conf.py
+
7
−
2
View file @
1988c067
...
...
@@ -28,20 +28,25 @@ import teqp
release
=
teqp
.
__version__
# -- Exeucute all notebooks --------------------------------------------------
subprocess
.
check_output
(
f
'
jupyter nbconvert --version
'
,
shell
=
True
)
#
subprocess.check_output(f'jupyter nbconvert --version', shell=True)
for
path
,
dirs
,
files
in
os
.
walk
(
'
.
'
):
for
file
in
files
:
if
file
.
endswith
(
'
.ipynb
'
)
and
'
.ipynb_checkpoints
'
not
in
path
:
subprocess
.
check_output
(
f
'
jupyter nbconvert --to notebook --output
{
file
}
--execute
{
file
}
'
,
shell
=
True
,
cwd
=
path
)
# --ExecutePreprocessor.allow_errors=True (this allows you to allow errors globally, but a raises-exception cell tag is better)
### -- Auto-generate API documentation -----------------------------------------
here
=
os
.
path
.
dirname
(
__file__
)
subprocess
.
check_output
(
f
'
sphinx-apidoc -e -f -o source/api
{
os
.
path
.
dirname
(
teqp
.
__file__
)
}
'
,
shell
=
True
,
cwd
=
here
)
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions
=
[
'
nbsphinx
'
'
nbsphinx
'
,
'
sphinx.ext.autodoc
'
]
# Add any paths that contain templates here, relative to this directory.
...
...
This diff is collapsed.
Click to expand it.
doc/source/index.rst
+
1
−
0
View file @
1988c067
...
...
@@ -9,6 +9,7 @@ Welcome to teqp's documentation!
models/index
derivs/index
algorithms/index
api
Indices and tables
==================
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment