Skip to content

Commit

Permalink
fixing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell committed Dec 17, 2023
1 parent b517686 commit c8be3d9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,4 @@ dmypy.json
*.vtk
*.stp
src/_version.py
*.msh
7 changes: 1 addition & 6 deletions src/cad_to_dagmc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@

__all__ = ["__version__"]

from .core import CadToDagmc
from .vertices_to_h5m import vertices_to_h5m
from .brep_part_finder import *
from .brep_to_h5m import *

[CadToDagmc, vertices_to_h5m]
from .core import *
2 changes: 0 additions & 2 deletions tests/test_h5m_in_transport.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import openmc
from cad_to_dagmc import CadToDagmc
import math
import cadquery as cq


Expand Down Expand Up @@ -31,7 +30,6 @@ def transport_particles_on_h5m_geometry(
"""

import openmc
from openmc.data import NATURAL_ABUNDANCE

if nuclides is None:
Expand Down
11 changes: 6 additions & 5 deletions tests/test_loading_from_file_vs_shape_object.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# TODO test brep_part_finder
from cad_to_dagmc import order_material_ids_by_brep_order
# from cad_to_dagmc import order_material_ids_by_brep_order
import cad_to_dagmc

# def get_ids_from_assembly(assembly):
# ids = []
Expand All @@ -17,23 +18,23 @@

def test_order_material_ids_by_brep_order():
# two entries, reverse order
new_order = order_material_ids_by_brep_order(["1", "2"], ["2", "1"], ["m1", "m2"])
new_order = cad_to_dagmc.order_material_ids_by_brep_order(["1", "2"], ["2", "1"], ["m1", "m2"])
assert new_order == ["m2", "m1"]

# three entries, partly duplicate materials
new_order = order_material_ids_by_brep_order(
new_order = cad_to_dagmc.order_material_ids_by_brep_order(
["1", "2", "3"], ["2", "1", "3"], ["m1", "m2", "m2"]
)
assert new_order == ["m2", "m1", "m2"]

# three entries, unique materials
new_order = order_material_ids_by_brep_order(
new_order = cad_to_dagmc.order_material_ids_by_brep_order(
["1", "2", "3"], ["2", "1", "3"], ["m1", "m2", "m3"]
)
assert new_order == ["m2", "m1", "m3"]

# three entries, duplicate materials
new_order = order_material_ids_by_brep_order(
new_order = cad_to_dagmc.order_material_ids_by_brep_order(
["1", "2", "3"], ["2", "1", "3"], ["m1", "m1", "m1"]
)
assert new_order == ["m1", "m1", "m1"]
2 changes: 1 addition & 1 deletion tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pymoab as mb
from pymoab import core, types

from cad_to_dagmc import vertices_to_h5m
# from cad_to_dagmc import vertices_to_h5m

"""
Tests that check that:
Expand Down

0 comments on commit c8be3d9

Please sign in to comment.