Skip to content

Commit 95d2baa

Browse files
authored
migrate completely to ruamel.yaml to read and write decimals correctly (#638)
* migrate completely to ruamel.yaml to read and write decimals correctly * update docs dependencies * fix deps for docs build * add ruamel.yaml to readthedocs.yaml
1 parent e999f94 commit 95d2baa

File tree

6 files changed

+96
-105
lines changed

6 files changed

+96
-105
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ build:
2121
# Install the package in editable mode using pixi
2222
- $HOME/.pixi/bin/pixi run --environment docs pip install -e .
2323
# Install docs dependencies in the RTD Python environment too
24-
- pip install erdantic versioningit sphinx_rtd_theme sphinxcontrib-mermaid types-pyyaml h5py numpy matplotlib
24+
- pip install erdantic versioningit sphinx_rtd_theme sphinxcontrib-mermaid types-pyyaml h5py numpy matplotlib ruamel.yaml
2525

2626
sphinx:
2727
builder: html

docs/source/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ def import_mock(name, *args, **kwargs):
101101
imports = orig_import(name, *args, **kwargs)
102102
except ImportError:
103103
# Create a mock module for missing imports with better type handling
104+
if "ruamel.yaml" in name:
105+
raise ImportError("Module 'ruamel.yaml' is not available")
104106
imports = mock.MagicMock()
105107
# Set common attributes to avoid warnings
106108
imports.__name__ = name

0 commit comments

Comments
 (0)