Skip to content

Commit

Permalink
Decouple generation tools and files from the rest of podio python files
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Nov 5, 2023
1 parent 01e1d05 commit 2c4d809
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 12 deletions.
5 changes: 5 additions & 0 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ else()
)
endif()

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/podio_gen
DESTINATION ${podio_PYTHON_INSTALLDIR}
REGEX __pycache__ EXCLUDE
)

#--- install templates ---------------------------------------------------------
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/templates
DESTINATION ${podio_PYTHON_INSTALLDIR})
Expand Down
2 changes: 0 additions & 2 deletions python/podio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

from .__version__ import __version__

from .podio_config_reader import * # noqa: F403, F401

import ROOT # pylint: disable=wrong-import-order

# Track whether we were able to dynamially load the library that is built by
Expand Down
4 changes: 2 additions & 2 deletions python/podio/test_ClassDefinitionValidator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import unittest
from copy import deepcopy

from podio.podio_config_reader import ClassDefinitionValidator, MemberVariable, DefinitionError
from podio.generator_utils import DataModel
from podio_gen.podio_config_reader import ClassDefinitionValidator, MemberVariable, DefinitionError
from podio_gen.generator_utils import DataModel


def make_dm(components, datatypes, options=None):
Expand Down
4 changes: 2 additions & 2 deletions python/podio/test_DataModelJSONEncoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

import unittest

from podio.generator_utils import DataModelJSONEncoder
from podio.podio_config_reader import MemberParser
from podio_gen.generator_utils import DataModelJSONEncoder
from podio_gen.podio_config_reader import MemberParser


def get_member_var_json(string):
Expand Down
2 changes: 1 addition & 1 deletion python/podio/test_MemberParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import unittest

from podio.podio_config_reader import MemberParser, DefinitionError
from podio_gen.podio_config_reader import MemberParser, DefinitionError


class MemberParserTest(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions python/podio_class_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

from podio_schema_evolution import DataModelComparator # dealing with cyclic imports
from podio_schema_evolution import RenamedMember, root_filter, RootIoRule
from podio.podio_config_reader import PodioConfigReader
from podio.generator_utils import DataType, DefinitionError, DataModelJSONEncoder
from podio_gen.podio_config_reader import PodioConfigReader
from podio_gen.generator_utils import DataType, DefinitionError, DataModelJSONEncoder

THIS_DIR = os.path.dirname(os.path.abspath(__file__))
TEMPLATE_DIR = os.path.join(THIS_DIR, 'templates')
Expand Down
Empty file added python/podio_gen/__init__.py
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import warnings
import yaml

from podio.generator_utils import MemberVariable, DefinitionError, BUILTIN_TYPES, DataModel
from podio_gen.generator_utils import MemberVariable, DefinitionError, BUILTIN_TYPES, DataModel


class MemberParser:
Expand Down
2 changes: 1 addition & 1 deletion python/podio_schema_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import yaml

from podio.podio_config_reader import PodioConfigReader
from podio_gen.podio_config_reader import PodioConfigReader


# @TODO: not really a good class model here
Expand Down
2 changes: 1 addition & 1 deletion tools/podio-vis
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import argparse
import yaml
from podio.podio_config_reader import PodioConfigReader
from podio_gen.podio_config_reader import PodioConfigReader
try:
from graphviz import Digraph
except ImportError:
Expand Down

0 comments on commit 2c4d809

Please sign in to comment.