Skip to content

Commit 37dc5fd

Browse files
committed
Updated docs
1 parent e362b66 commit 37dc5fd

5 files changed

Lines changed: 173 additions & 0 deletions

File tree

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/source/conf.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
import os
7+
import shutil
8+
9+
10+
def copy_tutorials(app):
11+
src = os.path.abspath("../tutorials")
12+
dst = os.path.abspath("source/tutorials")
13+
14+
# Remove existing target directory if it exists
15+
if os.path.exists(dst):
16+
shutil.rmtree(dst)
17+
18+
shutil.copytree(src, dst)
19+
20+
21+
def setup(app):
22+
app.connect("builder-inited", copy_tutorials)
23+
24+
25+
# -- Project information -----------------------------------------------------
26+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
27+
28+
project = "python-template"
29+
copyright = "2025, Max Lindqvist"
30+
author = "Max Lindqvist"
31+
32+
# -- General configuration ---------------------------------------------------
33+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
34+
35+
extensions = [
36+
"nbsphinx",
37+
"sphinx.ext.mathjax",
38+
"sphinx.ext.autodoc",
39+
]
40+
41+
templates_path = ["_templates"]
42+
exclude_patterns = []
43+
44+
45+
# -- Options for HTML output -------------------------------------------------
46+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
47+
48+
html_theme = "sphinx_rtd_theme"
49+
html_static_path = ["_static"]

docs/source/index.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.. Documentation master file, created by
2+
sphinx-quickstart on Sun Jun 22 11:14:00 2025.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
python-template documentation
7+
========================
8+
9+
Add your content using ``reStructuredText`` syntax. See the
10+
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
11+
documentation for details.
12+
13+
14+
.. toctree::
15+
:maxdepth: 2
16+
:caption: Tutorials:
17+
18+
tutorials/tutorial_01
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"id": "efb79425-958b-412c-afa9-055e27a69baa",
6+
"metadata": {},
7+
"source": [
8+
"# Tutorial 1"
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": 1,
14+
"id": "68ad1562-4953-444c-96c7-9026bcc54cc7",
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"name": "stdout",
19+
"output_type": "stream",
20+
"text": [
21+
"Example tutorial which will be published in the docs!\n"
22+
]
23+
}
24+
],
25+
"source": [
26+
"print(\"Example tutorial which will be published in the docs!\")"
27+
]
28+
}
29+
],
30+
"metadata": {
31+
"kernelspec": {
32+
"display_name": "Python 3 (ipykernel)",
33+
"language": "python",
34+
"name": "python3"
35+
},
36+
"language_info": {
37+
"codemirror_mode": {
38+
"name": "ipython",
39+
"version": 3
40+
},
41+
"file_extension": ".py",
42+
"mimetype": "text/x-python",
43+
"name": "python",
44+
"nbconvert_exporter": "python",
45+
"pygments_lexer": "ipython3",
46+
"version": "3.13.3"
47+
}
48+
},
49+
"nbformat": 4,
50+
"nbformat_minor": 5
51+
}

0 commit comments

Comments
 (0)