Skip to content

Commit

Permalink
Merge branch 'main' into schema-id
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp authored Dec 13, 2024
2 parents aa11263 + 55f9e18 commit bdd568b
Show file tree
Hide file tree
Showing 6 changed files with 907 additions and 334 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
run: |
python -I -m pytest tests/ --cov-append --cov-report=xml --cov=menuinst -vvv
- uses: codecov/codecov-action@5c47607acb93fed5485fdbf7232e8a31425f672a #v5.0.2
- uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a #v5.0.7
with:
name: ${{ matrix.os }}-py${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }} # required
Expand Down
1 change: 1 addition & 0 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- cffi=1.15.1
- charset-normalizer=2.1.1
- colorama=0.4.6
- commonmark=0.9.1
- cryptography=38.0.3
- docutils=0.19
- idna=3.4
Expand Down
20 changes: 20 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import json
import os
from pathlib import Path

import commonmark

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

Expand Down Expand Up @@ -117,3 +120,20 @@
sitemap_locales = [None]
# We're hard-coding stable here since that's what we want Google to point to.
sitemap_url_scheme = "{link}"


# Custom hooks
os.environ["SPHINX_RUNNING"] = "1"


def docstring(app, what, name, obj, options, lines):
"""Transform MD to RST for autodoc"""
md = '\n'.join(lines)
ast = commonmark.Parser().parse(md)
rst = commonmark.ReStructuredTextRenderer().render(ast)
lines.clear()
lines += rst.splitlines()


def setup(app):
app.connect('autodoc-process-docstring', docstring)
Loading

0 comments on commit bdd568b

Please sign in to comment.