-
Notifications
You must be signed in to change notification settings - Fork 37
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
Elpi sphinx documentation preview #149
Comments
awesome! The main missing thing w.r.t. what we discussed is a
which would fail if the captured output does not match (and possibly be able to repeat this directive) |
Final preview before submitting MR on
NOTE:
|
Merge requested: #152. |
the preview looks good, but the test is somewhat wrong. The injection when the regex does not match should fail, and the command to build the doc exit non zero, hence the ci job fail. here it seems the injection successfully prints an error, which makes sense but is not how I plan to use the feature: I do not want to review the doc looking for red boxes. I'll review the pr tomorrow, thanks! |
Alright, I didn't get the intent for the assertion at first. So if it is a matter of integration through the examples, we can surely disseminate Also, sanity checks do not pass on the PR, which seems to be related to the artefacts' binaries we added on Friday for deployment. Not sure how to deal with that, as the branches seem to be in sync, I'll leave this to you. |
Hi,
Here is a preview for Elpi's sphinx based documentation to be: https://dream.inria.fr/elpi/
The Test Bed (https://dream.inria.fr/elpi/playground.html#test-bed) is so far only applied to 3 elpi test source files. Will list exhaustively all examples for validation before merging upstream.
For the reference, here are listed current sources for
about
andplayground
doc sources.Before merging all proof of concepts repositories from Inria's Gitlab to Github, everything lies here:
TODO:
elpi
syntax highlightingdune build $(DUNE_OPTS) @doc
outputgh-pages
, throughsphinx.ext.githubpages
About
This page is both an introspection and self documentation for this documentation stack.
Prerequisites
Before building this documentation, make sure to have
sphinx
installed:To match the visuals used in the community (e.g. https://coq.inria.fr/distrib/current/refman/):
Extensions
This documentation can make use of the following plugins:
Namely,
intersphinx
(https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html) can generate links to the documentation of objects in external projects, either explicitly through the external role, or as a fallback resolution for any other cross-reference, and,githubpages
(https://www.sphinx-doc.org/en/master/usage/extensions/githubpages.html#module-sphinx.ext.githubpages) which creates a.nojekyll
file on generated HTML directory to publish the document on GitHub Pages.Building
sphinx
comes with its own helpers to build the documentation but are not meant to be used directly, see :doc:playground
section for injection points.Instead, use the
doc-sphinx
target of the source tree's root'sMakefile
to build the documentation:Playground
This page will be used to test hooks in order to run
elpi
on code snippets and inject its output withinsphinx
documentation sources.Prerequisites
Before running the hooks, make sure to have
elpi
built locally:It doesn't hurt to check that
dune
runs the locally builtelpi
correctly:Syntax
Elpi code blocks to be evaluated and injection from
docs/base
todocs/source
are conventionally denoted inreStructuredText
as.. elpi:: FILE
and turned into:The injection engine will:
.. elpi::
directives for anyrst
sourceliteralinclude
in the generated source with relevant optionsdune exec elpi -- -test FILE
on theFILE
containing theelpi
snippet, test or example.stdout
&stderr
).. code-block:: console
just after it to inject the captured console outputResult should look as follows:
Test Bed
The text was updated successfully, but these errors were encountered: