Skip to content

Commit

Permalink
🔧 Set env_version for sphinx extension (#1313)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Oct 2, 2024
1 parent aa34901 commit ede3b06
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions sphinx_needs/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@

LOGGER = getLogger(__name__)

ENV_DATA_VERSION: Final = 2
"""Version of the data stored in the environment.
See https://www.sphinx-doc.org/en/master/extdev/index.html#extension-metadata
"""


class NeedsPartType(TypedDict):
"""Data for a single need part."""
Expand Down
8 changes: 7 additions & 1 deletion sphinx_needs/needs.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
build_needumls_pumls,
)
from sphinx_needs.config import NEEDS_CONFIG, LinkOptionsType, NeedsSphinxConfig
from sphinx_needs.data import NeedsCoreFields, SphinxNeedsData, merge_data
from sphinx_needs.data import (
ENV_DATA_VERSION,
NeedsCoreFields,
SphinxNeedsData,
merge_data,
)
from sphinx_needs.defaults import (
GRAPHVIZ_STYLE_DEFAULTS,
LAYOUTS,
Expand Down Expand Up @@ -303,6 +308,7 @@ def setup(app: Sphinx) -> dict[str, Any]:
"version": VERSION,
"parallel_read_safe": True,
"parallel_write_safe": True,
"env_version": ENV_DATA_VERSION,
}


Expand Down

0 comments on commit ede3b06

Please sign in to comment.