Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/black-ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
black-format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: psf/black@stable
with:
options: "--diff --check"
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:

- uses: tlylt/install-graphviz@v1

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: Install pandoc
run: sudo apt-get install pandoc
Expand All @@ -35,7 +35,7 @@ jobs:
run: python -m pip install -r requirements-dev.txt

- name: Cache pip
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
Expand Down Expand Up @@ -77,9 +77,9 @@ jobs:
grep ERROR doc.txt
exit 1
fi
if [[ $(grep WARNING doc.txt) ]]; then
if [[ $(grep WARNING doc.txt | grep -v 'term not in glossary') ]]; then
echo "Documentation produces warnings."
grep WARNING doc.txt
grep WARNING doc.txt | grep -v 'term not in glossary'
exit 1
fi

Expand All @@ -96,12 +96,12 @@ jobs:
grep ERROR doc.txt
exit 1
fi
if [[ $(grep WARNING doc.txt) ]]; then
if [[ $(grep WARNING doc.txt | grep -v 'term not in glossary') ]]; then
echo "Documentation produces warnings."
grep WARNING doc.txt
grep WARNING doc.txt | grep -v 'term not in glossary'
exit 1
fi

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./dist/**
24 changes: 24 additions & 0 deletions .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Spell Check

on:
push:
branches:
- main
pull_request:

jobs:
spell-check:
runs-on: ubuntu-latest

steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Install codespell
- name: Install codespell
run: pip install codespell

# Run codespell
- name: Run codespell
run: codespell --skip="*.png,*.jpg,*.jpeg,*.gif,*.svg,*.ico,*.pdf,*.js,*.css,*.map,./_unittests/ut__main/data/*,./_doc/api/quote.rst,./sphinx_runpython/language.py" --ignore-words-list="nd,te,OT" --check-filenames
6 changes: 3 additions & 3 deletions .github/workflows/wheels-any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.12'

- name: build wheel
run: python -m pip wheel .

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./sphinx_runpython*.whl
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ _doc/examples/*.html
_doc/examples/plot_*.png
_doc/_static/require.js
_doc/_static/viz.js
_doc/sg_execution_times.rst
_unittests/ut__main/*.png
_unittests/ut__main/data/*.rst
_unittests/ut__main/data/*.py
_unittests/ut__main/_cache/*
_unittests/ut__main/*.html
_unittests/ut_runpython/*.png
_unittests/ut_runpython/*.html
test_latex/*
1 change: 1 addition & 0 deletions CHANGELOGS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change Logs
0.3.0
+++++

* :pr:`36`: add tools to remove the use of new commands in latex formula
* :pr:`33`: add simple command line to convert images to pdf
* :pr:`28`: add syntax to check the readme syntax
* :pr:`27`: fix missing __text_signature__ in docassert
Expand Down
18 changes: 9 additions & 9 deletions _doc/api/blocdefs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,22 @@ An example:
::

.. blocref::
:title: How to add a bloc?
:tag: bloc
:label: l-this-bloc
:title: How to add a block?
:tag: block
:label: l-this-block

A bloc...
A block...

Which gives:

.. blocref::
:title: How to add a bloc?
:tag: bloc
:label: l-this-bloc
:title: How to add a block?
:tag: block
:label: l-this-block

A bloc...
A block...

A reference can be added to this bloc :ref:`Bloc A <l-this-bloc>`.
A reference can be added to this block :ref:`Block A <l-this-block>`.
The title needs to be recalled.

mathdef
Expand Down
6 changes: 3 additions & 3 deletions _doc/api/blocdefs_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
blocreflist, exreflist, mathdeflist
===================================

These extensions can recall the blocs defined by
These extensions can recall the blocks defined by
:ref:`l-blocdefs`.

exreflist
Expand Down Expand Up @@ -47,13 +47,13 @@ An example:
::

.. blocreflist::
:tag: bloc
:tag: block
:contents:

Which gives:

.. blocreflist::
:tag: bloc
:tag: block
:contents:

mathdeflist
Expand Down
2 changes: 1 addition & 1 deletion _doc/api/quote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
quote
=====

A bloc to insert a quote from a book, a film...
A block to insert a quote from a book, a film...

Usage
=====
Expand Down
2 changes: 1 addition & 1 deletion _doc/api/runpython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In *conf.py*:
Documentation means many examples which needs to be updated when a change
happen unless the documentation runs the example itself and update its output.
That's what this directive does. It adds as raw text whatever comes out
throught the standard output.
through the standard output.

One example:

Expand Down
8 changes: 7 additions & 1 deletion _doc/api/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
tools
=====


Checks the readme syntax
========================

Expand All @@ -28,3 +27,10 @@ into examples which can be used into a sphinx gallery.
::

python -m sphinx_runpython --help

Tools related to latex
======================

.. autofunction:: sphinx_runpython.tools.latex_functions.build_regex

.. autofunction:: sphinx_runpython.tools.latex_functions.replace_latex_command
4 changes: 3 additions & 1 deletion _doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# coding: utf-8
import os
import sys
from sphinx_runpython import __version__
Expand Down Expand Up @@ -83,13 +82,16 @@
nitpick_ignore = [
("py:class", "False"),
("py:class", "True"),
("py:class", "SphinxPostTransform"),
("py:meth", "Builder.get_relative_uri"),
]

nitpick_ignore_regex = [
("py:class", ".*numpy[.].*"),
("py:func", ".*[.]PyCapsule[.].*"),
("py:func", ".*numpy[.].*"),
("py:func", ".*scipy[.].*"),
("py:meth", "Builder[.].*"),
]

intersphinx_mapping = {
Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions _unittests/ut__main/data/float_and_double_rouding.ipynb

Large diffs are not rendered by default.

Loading
Loading