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

Update docs with confval definitions #628

Open
fmigneault opened this issue Sep 14, 2024 · 0 comments
Open

Update docs with confval definitions #628

fmigneault opened this issue Sep 14, 2024 · 0 comments
Assignees
Labels
doc Documentation improvements or building problem enhancement Improvements in term of performance or behaviour

Comments

@fmigneault
Copy link
Collaborator

fmigneault commented Sep 14, 2024

Description

Currently, configuration settings are defined using envvar definitions with custom structures for default/types. For example:

.. envvar:: MAGPIE_PORT
[:class:`int`]
(Default: ``2001``)
Port URL part of `Magpie` application to rebuild the full :envvar:`MAGPIE_URL`.

Sphinx provides a way to define confval directives, which can be referenced by :confval:`<ref>` (rather than :envvar:`<ref>`).

Using confval allows to directly making use of the directive to define :type: and :default::

.. confval:: the_answer
   :type: ``int`` (a *number*)
   :default: **42**

   This is a setting that controls the value of the answer.

Which would be rendered as:


the_answer
Type:
int (a number)
Default:
42

This is a setting that controls the value of the answer.


References

@fmigneault fmigneault added enhancement Improvements in term of performance or behaviour doc Documentation improvements or building problem labels Sep 14, 2024
@fmigneault fmigneault self-assigned this Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Documentation improvements or building problem enhancement Improvements in term of performance or behaviour
Projects
None yet
Development

No branches or pull requests

1 participant