Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix import error that would display error in documentation #30

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions geos-mesh/src/geos/mesh/doctor/mesh_doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

import logging

from geos.mesh.doctor.parsing import CheckHelper
from geos.mesh.doctor.parsing.cli_parsing import parse_and_set_verbosity
import geos.mesh.doctor.register as register
from parsing import CheckHelper
from parsing.cli_parsing import parse_and_set_verbosity
import register as register


def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
List,
)

from geos.mesh.doctor.checks.collocated_nodes import Options, Result
from checks.collocated_nodes import Options, Result

from . import COLLOCATES_NODES

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from geos.mesh.doctor.checks.element_volumes import Options, Result
from checks.element_volumes import Options, Result

from . import ELEMENT_VOLUMES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
VTK_WEDGE,
)

from geos.mesh.doctor.checks.fix_elements_orderings import Options, Result
from checks.fix_elements_orderings import Options, Result

from . import vtk_output_parsing, FIX_ELEMENTS_ORDERINGS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from geos.mesh.doctor.checks.generate_cube import Options, Result, FieldInfo
from checks.generate_cube import Options, Result, FieldInfo

from . import vtk_output_parsing, generate_global_ids_parsing, GENERATE_CUBE
from .generate_global_ids_parsing import GlobalIdsInfo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from geos.mesh.doctor.checks.generate_fractures import Options, Result, FracturePolicy
from checks.generate_fractures import Options, Result, FracturePolicy

from . import vtk_output_parsing, GENERATE_FRACTURES

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dataclasses import dataclass
import logging

from geos.mesh.doctor.checks.generate_global_ids import Options, Result
from checks.generate_global_ids import Options, Result

from . import vtk_output_parsing, GENERATE_GLOBAL_IDS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
List,
)

from geos.mesh.doctor.checks.non_conformal import Options, Result
from checks.non_conformal import Options, Result

from . import NON_CONFORMAL

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import numpy

from geos.mesh.doctor.checks.self_intersecting_elements import Options, Result
from checks.self_intersecting_elements import Options, Result

from . import SELF_INTERSECTING_ELEMENTS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
import multiprocessing

from geos.mesh.doctor.checks.supported_elements import Options, Result
from checks.supported_elements import Options, Result

from . import SUPPORTED_ELEMENTS

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
import textwrap

from geos.mesh.doctor.checks.vtk_utils import VtkOutput
from checks.vtk_utils import VtkOutput

__OUTPUT_FILE = "output"
__OUTPUT_BINARY_MODE = "data-mode"
Expand Down
8 changes: 4 additions & 4 deletions geos-mesh/src/geos/mesh/doctor/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
import logging
from typing import Dict, Callable, Any, Tuple

import geos.mesh.doctor.parsing as parsing
from geos.mesh.doctor.parsing import CheckHelper, cli_parsing
import parsing as parsing
from parsing import CheckHelper, cli_parsing

__HELPERS: Dict[ str, Callable[ [ None ], CheckHelper ] ] = dict()
__CHECKS: Dict[ str, Callable[ [ None ], Any ] ] = dict()


def __load_module_check( module_name: str, check_fct="check" ):
module = importlib.import_module( "geos.mesh.doctor.checks." + module_name )
module = importlib.import_module( "checks." + module_name )
return getattr( module, check_fct )


def __load_module_check_helper( module_name: str, parsing_fct_suffix="_parsing" ):
module = importlib.import_module( "geos.mesh.doctor.parsing." + module_name + parsing_fct_suffix )
module = importlib.import_module( "parsing." + module_name + parsing_fct_suffix )
return CheckHelper( fill_subparser=module.fill_subparser,
convert=module.convert,
display_results=module.display_results )
Expand Down
Loading