From 365888573db27b092f2fc068f421fef493ff77e9 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Tue, 12 Mar 2024 15:11:47 +0000 Subject: [PATCH] Create .readthedocs.yaml and update ruamel.yaml usage (#26) --- .readthedocs.yaml | 19 +++++++++++++++++++ source/conf.py | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..1847922 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,19 @@ +# Read the Docs configuration file for https://hdmf-schema-language.readthedocs.io/ +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +build: + os: ubuntu-22.04 + tools: + python: "3.12" + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: source/conf.py + +# Optionally set the version of Python and requirements required to build your docs +python: + install: + - requirements: requirements-doc.txt diff --git a/source/conf.py b/source/conf.py index d28a436..34e66bf 100644 --- a/source/conf.py +++ b/source/conf.py @@ -107,7 +107,8 @@ html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] with open('namespace_map.yml', 'r') as f: - namespace_map = yaml.safe_load(f) + yaml_obj = yaml.YAML(typ='safe', pure=True) + namespace_map = yaml_obj.load(f) def rstjinja(app, docname, source):