Skip to content

Commit c75cd0e

Browse files
authored
Use static YAMLSpecWriter.sort_keys (#93)
1 parent e6f5975 commit c75cd0e

File tree

4 files changed

+6
-19
lines changed

4 files changed

+6
-19
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,6 @@ docs/_build
5454
# Add Hatch
5555
.hatch/
5656
.venv/
57+
58+
# Hatch-vcs
59+
_version.py

hdmf_docutils/_version.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

hdmf_docutils/doctools/rst.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ def spec_to_yaml(spec):
294294

295295
# Convert to plain dict first
296296
clean_spec = json.loads(json.dumps(spec, indent=4, separators=(',', ': ')))
297+
297298
# Sort keys using YAMLSpecWriter's sort_keys method
298-
hdmf_yaml_writer = YAMLSpecWriter()
299-
sorted_spec = hdmf_yaml_writer.sort_keys(clean_spec)
299+
sorted_spec = YAMLSpecWriter.sort_keys(clean_spec)
300300

301301
yaml = YAML(pure=True)
302302
yaml.default_flow_style = False

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ keywords = [
4545
dependencies = [
4646
"matplotlib",
4747
"networkx",
48-
"hdmf",
48+
"hdmf>=4.1.0",
4949
"pillow",
5050
"sphinx",
5151
"sphinx-gallery",

0 commit comments

Comments
 (0)