Skip to content

Commit 0bce952

Browse files
author
samumantha
committed
slidetext to sphinxlesson
1 parent 31cf505 commit 0bce952

File tree

10 files changed

+667
-0
lines changed

10 files changed

+667
-0
lines changed

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 = content
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)

content/conf.py

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
# import os
14+
# import sys
15+
# sys.path.insert(0, os.path.abspath('.'))
16+
17+
18+
# -- Project information -----------------------------------------------------
19+
20+
project = "LESSON NAME"
21+
copyright = "2020, The contributors"
22+
author = "The contributors"
23+
github_user = "coderefinery"
24+
github_repo_name = "" # auto-detected from dirname if blank
25+
github_version = "main"
26+
conf_py_path = "/content/" # with leading and trailing slash
27+
28+
# -- General configuration ---------------------------------------------------
29+
30+
# Add any Sphinx extension module names here, as strings. They can be
31+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32+
# ones.
33+
extensions = [
34+
# githubpages just adds a .nojekyll file
35+
"sphinx.ext.githubpages",
36+
"sphinx_lesson",
37+
# remove once sphinx_rtd_theme updated for contrast and accessibility:
38+
"sphinx_rtd_theme_ext_color_contrast",
39+
]
40+
41+
# Settings for myst_nb:
42+
# https://myst-nb.readthedocs.io/en/latest/use/execute.html#triggering-notebook-execution
43+
# jupyter_execute_notebooks = "off"
44+
# jupyter_execute_notebooks = "auto" # *only* execute if at least one output is missing.
45+
# jupyter_execute_notebooks = "force"
46+
jupyter_execute_notebooks = "cache"
47+
48+
# Add any paths that contain templates here, relative to this directory.
49+
# templates_path = ['_templates']
50+
51+
# List of patterns, relative to source directory, that match files and
52+
# directories to ignore when looking for source files.
53+
# This pattern also affects html_static_path and html_extra_path.
54+
exclude_patterns = [
55+
"README*",
56+
"_build",
57+
"Thumbs.db",
58+
".DS_Store",
59+
"jupyter_execute",
60+
"*venv*",
61+
]
62+
63+
64+
# -- Options for HTML output -------------------------------------------------
65+
66+
# The theme to use for HTML and HTML Help pages. See the documentation for
67+
# a list of builtin themes.
68+
#
69+
html_theme = "sphinx_rtd_theme"
70+
71+
# Add any paths that contain custom static files (such as style sheets) here,
72+
# relative to this directory. They are copied after the builtin static files,
73+
# so a file named "default.css" will overwrite the builtin "default.css".
74+
# html_static_path = ['_static']
75+
76+
77+
# HTML context:
78+
from os.path import basename, dirname, realpath
79+
80+
html_context = {
81+
"display_github": True,
82+
"github_user": github_user,
83+
# Auto-detect directory name. This can break, but
84+
# useful as a default.
85+
"github_repo": github_repo_name or basename(dirname(realpath(__file__))),
86+
"github_version": github_version,
87+
"conf_py_path": conf_py_path,
88+
}
89+
90+
# Intersphinx mapping. For example, with this you can use
91+
# :py:mod:`multiprocessing` to link straight to the Python docs of that module.
92+
# List all available references:
93+
# python -msphinx.ext.intersphinx https://docs.python.org/3/objects.inv
94+
# extensions.append('sphinx.ext.intersphinx')
95+
# intersphinx_mapping = {
96+
# #'python': ('https://docs.python.org/3', None),
97+
# #'sphinx': ('https://www.sphinx-doc.org/', None),
98+
# #'numpy': ('https://numpy.org/doc/stable/', None),
99+
# #'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
100+
# #'pandas': ('https://pandas.pydata.org/docs/', None),
101+
# #'matplotlib': ('https://matplotlib.org/', None),
102+
# 'seaborn': ('https://seaborn.pydata.org/', None),
103+
# }

content/guide.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Instructor's guide
2+
------------------

content/index.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
LESSON NAME
2+
===========
3+
4+
In this lesson we will discuss how and why to share code, what kind of licenses are used in what situation and
5+
how software can be cited.
6+
7+
.. prereq::
8+
9+
No computational prerequisites required for this lesson.
10+
11+
12+
13+
.. csv-table::
14+
:widths: auto
15+
:delim: ;
16+
17+
5 min ; :doc:`social_coding`
18+
5 min ; :doc:`licensing`
19+
5 min ; :doc:`software_citation`
20+
21+
22+
23+
.. toctree::
24+
:maxdepth: 1
25+
:caption: The lesson
26+
27+
social_coding
28+
licensing
29+
software_citation
30+
31+
32+
.. toctree::
33+
:maxdepth: 1
34+
:caption: Reference
35+
36+
social_coding
37+
licensing
38+
software_citation
39+
quick-reference
40+
guide
41+
42+
43+
.. _learner-personas:
44+
45+
Who is the course for?
46+
----------------------
47+
48+
* Someone writing their own relatively small material
49+
* Someone who wants to incorporate other code/libraries into their own projects
50+
* Group leader who wants to decide how to balance openness and long-term strategy
51+
52+
About the course
53+
----------------
54+
55+
* Social coding
56+
* Licensing
57+
* Software citation
58+
59+
See also
60+
--------
61+
62+
-
63+
64+
Credits
65+
-------
66+
Radovan Bast, Richard Darst, Sabry Razick, Jyry Suvilehto
67+
68+
Thanks for great suggestions/corrections: Anne Fouilloux, Oxana Smirnova, Lucy Whalley

0 commit comments

Comments
 (0)