Skip to content

Commit

Permalink
refactor: Rework the structure of the GraphQL exporter
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Alvarez-Coello <[email protected]>
  • Loading branch information
jdacoello committed Nov 26, 2024
1 parent eae6f36 commit 50cadb6
Show file tree
Hide file tree
Showing 9 changed files with 1,219 additions and 215 deletions.
386 changes: 337 additions & 49 deletions docs/graphql.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ dependencies = [
"rich-click>=1.8.3",
"rich>=13.9.4",
"ruff>=0.7.3",
"graphene>=3.4.3",
"pandas>=2.2.3",
]
authors = [
{name="COVESA VSS", email="[email protected]"}
Expand Down
10 changes: 8 additions & 2 deletions src/vss_tools/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@
# https://www.mozilla.org/en-US/MPL/2.0/
#
# SPDX-License-Identifier: MPL-2.0
from typing import Any, Callable, Set
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable, Set

from vss_tools import log

if TYPE_CHECKING:
from vss_tools.model import VSSUnit

# Global objects to be extended by other code parts
dynamic_datatypes: Set[str] = set()
dynamic_struct_schemas: dict[str, dict[str, Any]] = {}
dynamic_quantities: list[str] = []
dynamic_units: dict[str, list] = {} # unit name -> allowed datatypes
# Map of unit name and VSSUnit
dynamic_units: dict[str, VSSUnit] = {}


class DatatypesException(Exception):
Expand Down
Loading

0 comments on commit 50cadb6

Please sign in to comment.