coderefinery / sphinx-lesson

Sphinx extension for creating CodeRefinery lessons
https://coderefinery.github.io/sphinx-lesson/
MIT License
15 stars 20 forks source link

Unknown directive type "exercise". #68

Closed kevinsawade closed 3 years ago

kevinsawade commented 3 years ago

The .. exercise:: directive does not work for me.

Steps to reproduce: 1) sphinx-quickstart 2) pip install -r requirements.txt requirements.txt 3) change conf.py

project = 'test-sphinx-lesson'
copyright = '2021, Kevin Sawade'
author = 'Kevin Sawade'

# -- 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 = ['sphinx_lesson',
        'sphinx_lesson.directives',
        'sphinx.ext.autodoc',
        'sphinx.ext.napoleon',
        'sphinx.ext.todo',
        'sphinx.ext.coverage',
        'sphinx.ext.githubpages',
        'sphinxcontrib.yt',
        'sphinx.ext.mathjax',
        'sphinx_copybutton',
        'sphinx.ext.intersphinx',
        'sphinx_rtd_theme_ext_color_contrast',
        'sphinx.ext.githubpages'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

4) run make html

Error:

Running Sphinx v3.5.4
making output directory... done
myst v0.13.7: MdParserConfig(renderer='sphinx', commonmark_only=False, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, update_mathjax=True, enable_extensions=['dollarmath'], disable_syntax=[], url_schemes=None, heading_anchors=None, html_meta=[], footnote_transition=True, substitutions=[], sub_delimiters=['{', '}'])
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
D:\sphinx-lesson-test\index.rst:14: WARNING: Unknown directive type "exercise".

.. exercise::

   This is an exercise
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done

Tested systems: Ubuntu 18.04, python3.8, conda Windows 10, python3.8, conda

rkdarst commented 3 years ago

I wonder if this is too new and we need a new release to make the documentation match the PyPI version (being still testing I haven't been too on top of making new releases). I just released 0.8.4 - does it work now with that?

I tried to look at git history to see when we did our big renaming, I am not sure if it is after 0.8.3 but I think it might be.

kevinsawade commented 3 years ago

Yeah. It's working now with 0.8.4. Thank you!