Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start conversion to markdown #781

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ airfares.txt
wages.txt
ScientificPythonLectures-simple.pdf
ScientificPythonLectures.pdf
junk.txt
sg_execution_times.rst
test.pkl
11 changes: 0 additions & 11 deletions advanced/mathematical_optimization/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -540,23 +540,12 @@ each step an approximation of the Hessian.
.. |bfgs_gauss_icond_conv| image:: auto_examples/images/sphx_glr_plot_gradient_descent_032.png
:scale: 75%

Full code examples
==================

.. include the gallery. Skip the first line to avoid the "orphan"
declaration

.. include:: auto_examples/index.rst
:start-line: 1


.. |bfgs_rosen_icond| image:: auto_examples/images/sphx_glr_plot_gradient_descent_014.png
:scale: 90%

.. |bfgs_rosen_icond_conv| image:: auto_examples/images/sphx_glr_plot_gradient_descent_033.png
:scale: 75%


.. list-table::
:widths: 1 1 1

Expand Down
23 changes: 21 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
# General configuration
# ---------------------

exclude_patterns = ["README.rst"]
exclude_patterns = [
"README.rst",
".jupyter_cache",
"jupyter_execute",
"pyximages/README.md",
]

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
Expand All @@ -23,6 +28,7 @@
"sphinx.ext.extlinks",
"sphinx_gallery.gen_gallery",
"sphinx_copybutton",
"myst_nb",
]

# See https://sphinx-copybutton.readthedocs.io/en/latest/use.html#automatic-exclusion-of-prompts-from-the-copies
Expand Down Expand Up @@ -72,7 +78,7 @@
templates_path = ["_templates"]

# The suffix of source filenames.
source_suffix = ".rst"
source_suffix = [".rst", ".md"]

# General information about the project.
project = "Scientific Python Lectures"
Expand All @@ -91,6 +97,17 @@
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"

# Enable executable .md files support
myst_enable_extensions = [
"colon_fence",
"dollarmath",
"substitution",
"tasklist",
"attrs_inline",
]

nb_output_stderr = "show"

# Monkey-patch sphinx to set the lineseparator option of pygment, to
# have indented line wrapping

Expand Down Expand Up @@ -288,6 +305,8 @@ def add_per_page_js(app, pagename, templatename, context, doctree):


def setup(app):
# Do not execute .ipynb files generated by the gallery
app.registry.source_suffix.pop(".ipynb", None)
app.add_js_file("https://code.jquery.com/jquery-3.7.0.min.js")
app.add_js_file("scroll_highlight_toc.js")

Expand Down
Loading
Loading