Repository: fusion-energy/paramak (language: python)

Issue:
compound instead of union
attempt to fix bug reported in issue #270 


Discussion / hints:

Fix patch:
diff --git a/Dockerfile b/Dockerfile
index 3da495027..91748c453 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -70,7 +70,7 @@ FROM dependencies as final
 ARG paramak_version=develop
 
 COPY run_tests.sh run_tests.sh
-COPY paramak paramak/
+COPY src src/
 COPY examples examples/
 
 COPY tests tests/
diff --git a/conda/meta.yaml b/conda/meta.yaml
index 1fb53ea24..d2a6dcde5 100644
--- a/conda/meta.yaml
+++ b/conda/meta.yaml
@@ -14,8 +14,8 @@ build:
 requirements:
   build:
     - python {{ python }}
-    - setuptools>=46.4.0
-    - setuptools_scm>=6.3.1
+    - setuptools>=65.4.1
+    - setuptools_scm>=7.0.5
   run:
     - python {{ python }}
     - cadquery {{ cadquery }}
diff --git a/examples/example_parametric_reactors/render_of_random_reactor_render_with_text_gif.py b/examples/example_parametric_reactors/render_of_random_reactor_render_with_text_gif.py
new file mode 100644
index 000000000..e20371341
--- /dev/null
+++ b/examples/example_parametric_reactors/render_of_random_reactor_render_with_text_gif.py
@@ -0,0 +1,134 @@
+# This examples creates Gif animation of 50 reactors by creating individual
+# images of reactors and stiching them together using Imagemagick into a Gif
+# animation. Two animations are made, of of a 3D render and one of a wireframe
+# line drawing.
+
+import math
+import os
+
+# to run this example you will need all of the following packages installed
+import matplotlib.pyplot as plt
+import numpy as np
+import paramak
+import pyrender
+import trimesh
+from PIL import Image, ImageFont, ImageDraw
+
+
+def create_reactor_renders(
+    render_number,
+    inner_blanket_radius,
+    blanket_thickness,
+    blanket_height,
+    lower_blanket_thickness,
+    upper_blanket_thickness,
+    blanket_vv_gap,
+    upper_vv_thickness,
+    vv_thickness,
+    lower_vv_thickness,
+):
+
+    # creates a blank figure for populating with subplots
+    plt.figure()
+
+    # creates a reactor from the input arguments
+    my_reactor = paramak.FlfSystemCodeReactor(
+        rotation_angle=180,
+        inner_blanket_radius=inner_blanket_radius,
+        blanket_thickness=blanket_thickness,
+        blanket_height=blanket_height,
+        lower_blanket_thickness=lower_blanket_thickness,
+        upper_blanket_thickness=upper_blanket_thickness,
+        blanket_vv_gap=blanket_vv_gap,
+        upper_vv_thickness=upper_vv_thickness,
+        vv_thickness=vv_thickness,
+        lower_vv_thickness=lower_vv_thickness,
+    )
+
+    # saves the reactor geometry as separate stl files that are later read in
+    # for the rendering
+    my_reactor.export_stl()
+
+    # assigns colours to each stl file
+    stl_files_with_colors = {
+        "blanket.stl": (255, 255, 0),
+        "vessel.stl": (128, 128, 128),
+        "upper_blanket.stl": (255, 255, 0),
+        "lower_blanket.stl": (255, 255, 0),
+        "lower_vessel.stl": (128, 128, 128),
+        "upper_vessel.stl": (128, 128, 128),
+    }
+
+    scene = pyrender.Scene()
+
+    # for each stl file and color combination
+    for key, value in stl_files_with_colors.items():
+        trimesh_obj = trimesh.load(key)
+        trimesh_obj.visual.vertex_colors = value
+        trimesh_obj.visual
+
+        render_mesh = pyrender.Mesh.from_trimesh(trimesh_obj, smooth=False)
+        scene.add(render_mesh)
+
+    camera = pyrender.camera.PerspectiveCamera(yfov=math.radians(90.0))  # aspectRatio=2.0 could be added here
+
+    # sets the position of the camera using a matrix
+    cam = 2**-0.5
+    camera_pose = np.array([[1, 0, 0, 0], [0, cam, -cam, -600], [0, cam, cam, 600], [0, 0, 0, 1]])
+
+    # adds a camera and a point light source at the same location
+    scene.add(camera, pose=camera_pose)
+    light = pyrender.PointLight(color=np.ones(3), intensity=300000.0)
+    scene.add(light, pose=camera_pose)
+
+    # renders the scene
+    my_render = pyrender.OffscreenRenderer(1000, 1000)
+    color, _ = my_render.render(scene)
+
+    # adds the render to the plot as a subplot in the correct location
+    plt.plot()
+    plt.axis("off")
+    plt.imshow(color)
+    # plt.show()
+    plt.savefig("tempfile.png", dpi=400)
+
+    my_image = Image.open("tempfile.png")
+    title_text = f"""
+    inner_blanket_radius={round(inner_blanket_radius,1)}
+    blanket_thickness={round(blanket_thickness,1)}
+    blanket_height={round(blanket_height,1)}
+    lower_blanket_thickness={round(lower_blanket_thickness,1)}
+    upper_blanket_thickness={round(upper_blanket_thickness,1)}
+    blanket_vv_gap={round(blanket_vv_gap,1)}
+    upper_vv_thickness={round(upper_vv_thickness,1)}
+    vv_thickness={round(vv_thickness,1)}
+    lower_vv_thickness={round(lower_vv_thickness,1)}
+    """
+    image_editable = ImageDraw.Draw(my_image)
+
+    # ttf file from https://fonts.google.com/
+    title_font = ImageFont.truetype("EncodeSansSemiExpanded-Medium.ttf", 50)
+    xy_location = (1000, 1000)
+    rgb = (0, 0, 0)
+    image_editable.text(xy_location, title_text, rgb, font=title_font)
+    my_image.save(f"render_{str(render_number).zfill(3)}.png")
+
+
+# loops through adding a random reactor render to the figure with each iteration
+for i in range(50):
+    create_reactor_renders(
+        render_number=i,
+        inner_blanket_radius=np.random.uniform(low=50, high=90),
+        blanket_thickness=np.random.uniform(low=50, high=140),
+        blanket_height=np.random.uniform(low=400, high=550),
+        lower_blanket_thickness=np.random.uniform(low=20, high=70),
+        upper_blanket_thickness=np.random.uniform(low=20, high=70),
+        blanket_vv_gap=np.random.uniform(low=10, high=90),
+        upper_vv_thickness=np.random.uniform(low=5, high=15),
+        vv_thickness=np.random.uniform(low=5, high=15),
+        lower_vv_thickness=np.random.uniform(low=5, high=15),
+    )
+
+# The convert comand requires imagemagick
+# saves the rendered png files as a gif
+os.system("convert -delay 40 -loop 0 render_*.png reactors.gif")
diff --git a/pyproject.toml b/pyproject.toml
index df655bb22..e6e9e9077 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,13 +1,48 @@
 [build-system]
 requires = [
-    "setuptools >= 46.4.0",
-    "wheel",
-    "setuptools_scm[toml] >= 6.3.1",
+    "setuptools >= 65.4.1",
+    "setuptools_scm[toml] >= 7.0.5",
 ]
 build-backend = "setuptools.build_meta"
 
+[project]
+name = "paramak"
+dynamic = ["version"]
+description = "Create 3D fusion reactor CAD models based on input parameters"
+readme = "README.md"
+classifiers = [
+    "Programming Language :: Python :: 3",
+    "License :: OSI Approved :: MIT License",
+    "Operating System :: OS Independent",
+]
+authors = [
+  { name="The Paramak Development Team" },
+]
+license = {file = "LICENSE.txt"}
+requires-python = ">=3.8"
+dependencies = [
+    "plotly>=5.1.0",
+    "scipy>=1.7.0",
+    "sympy>=1.8",
+    "numpy>=1.21.1",
+    "matplotlib>=3.4.2",
+    "plasmaboundaries>=0.1.8",
+    "jupyter-client < 7",
+    "jupyter-cadquery>=3.2.0",
+    "brep_part_finder>=0.5.0",
+    "brep_to_h5m>=0.4.0",
+]
+
+[project.urls]
+"Homepage" = "https://github.com/fusion-energy/paramak"
+"Bug Tracker" = "https://github.com/fusion-energy/paramak/issues"
+"Documentation" = "https://paramak.readthedocs.io"
+
 [tool.setuptools_scm]
-write_to = "paramak/_version.py"
+write_to = "src/_version.py"
 
 [tool.black]
 line-length = 120
+
+[tool.setuptools]
+package-dir = {"" = "src"}
diff --git a/setup.cfg b/setup.cfg
index 7ef783c5a..4e430fe1c 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,43 +1,10 @@
 [metadata]
-name = paramak
 version = attr: paramak.__version__
 author = The Paramak Development Team
 author_email = mail@jshimwell.com
-description = Create 3D fusion reactor CAD models based on input parameters
 long_description = file: README.md
 long_description_content_type = text/markdown
-url = https://github.com/fusion-energy/paramak
-license = MIT
-license_file = LICENSE.txt
-classifiers =
-    Natural Language :: English
-    Topic :: Scientific/Engineering
-    Programming Language :: Python :: 3
-    Programming Language :: Python :: 3.6
-    Programming Language :: Python :: 3.7
-    Programming Language :: Python :: 3.8
-    Programming Language :: Python :: 3.9
-    License :: OSI Approved :: MIT License
-    Operating System :: OS Independent
-project_urls =
-    Source = https://github.com/fusion-energy/paramak
-    Tracker = https://github.com/fusion-energy/paramak/issues
 
-[options]
-packages = find:
-python_requires= >=3.8
-install_requires=
-    plotly >= 5.1.0
-    scipy >= 1.7.0
-    sympy >= 1.8
-    numpy >= 1.21.1
-    matplotlib >= 3.4.2
-    plasmaboundaries >= 0.1.8
-    jupyter-client < 7
-    jupyter-cadquery >= 3.2.0
-    brep_part_finder >= 0.5.0
-    brep_to_h5m >= 0.4.0
-    setuptools_scm
 
 [options.extras_require]
 tests =
diff --git a/paramak/__init__.py b/src/paramak/__init__.py
similarity index 100%
rename from paramak/__init__.py
rename to src/paramak/__init__.py
diff --git a/paramak/parametric_components/__init__.py b/src/paramak/parametric_components/__init__.py
similarity index 100%
rename from paramak/parametric_components/__init__.py
rename to src/paramak/parametric_components/__init__.py
diff --git a/paramak/parametric_components/blanket_constant_thickness_arc_h.py b/src/paramak/parametric_components/blanket_constant_thickness_arc_h.py
similarity index 100%
rename from paramak/parametric_components/blanket_constant_thickness_arc_h.py
rename to src/paramak/parametric_components/blanket_constant_thickness_arc_h.py
diff --git a/paramak/parametric_components/blanket_constant_thickness_arc_v.py b/src/paramak/parametric_components/blanket_constant_thickness_arc_v.py
similarity index 100%
rename from paramak/parametric_components/blanket_constant_thickness_arc_v.py
rename to src/paramak/parametric_components/blanket_constant_thickness_arc_v.py
diff --git a/paramak/parametric_components/blanket_cutter_parallels.py b/src/paramak/parametric_components/blanket_cutter_parallels.py
similarity index 100%
rename from paramak/parametric_components/blanket_cutter_parallels.py
rename to src/paramak/parametric_components/blanket_cutter_parallels.py
diff --git a/paramak/parametric_components/blanket_cutters_star.py b/src/paramak/parametric_components/blanket_cutters_star.py
similarity index 100%
rename from paramak/parametric_components/blanket_cutters_star.py
rename to src/paramak/parametric_components/blanket_cutters_star.py
diff --git a/paramak/parametric_components/blanket_fp.py b/src/paramak/parametric_components/blanket_fp.py
similarity index 100%
rename from paramak/parametric_components/blanket_fp.py
rename to src/paramak/parametric_components/blanket_fp.py
diff --git a/paramak/parametric_components/blanket_poloidal_segment.py b/src/paramak/parametric_components/blanket_poloidal_segment.py
similarity index 100%
rename from paramak/parametric_components/blanket_poloidal_segment.py
rename to src/paramak/parametric_components/blanket_poloidal_segment.py
diff --git a/paramak/parametric_components/capsule_vacuum_vessel.py b/src/paramak/parametric_components/capsule_vacuum_vessel.py
similarity index 100%
rename from paramak/parametric_components/capsule_vacuum_vessel.py
rename to src/paramak/parametric_components/capsule_vacuum_vessel.py
diff --git a/paramak/parametric_components/center_column_circular.py b/src/paramak/parametric_components/center_column_circular.py
similarity index 100%
rename from paramak/parametric_components/center_column_circular.py
rename to src/paramak/parametric_components/center_column_circular.py
diff --git a/paramak/parametric_components/center_column_cylinder.py b/src/paramak/parametric_components/center_column_cylinder.py
similarity index 100%
rename from paramak/parametric_components/center_column_cylinder.py
rename to src/paramak/parametric_components/center_column_cylinder.py
diff --git a/paramak/parametric_components/center_column_flat_top_circular.py b/src/paramak/parametric_components/center_column_flat_top_circular.py
similarity index 100%
rename from paramak/parametric_components/center_column_flat_top_circular.py
rename to src/paramak/parametric_components/center_column_flat_top_circular.py
diff --git a/paramak/parametric_components/center_column_flat_top_hyperbola.py b/src/paramak/parametric_components/center_column_flat_top_hyperbola.py
similarity index 100%
rename from paramak/parametric_components/center_column_flat_top_hyperbola.py
rename to src/paramak/parametric_components/center_column_flat_top_hyperbola.py
diff --git a/paramak/parametric_components/center_column_hyperbola.py b/src/paramak/parametric_components/center_column_hyperbola.py
similarity index 100%
rename from paramak/parametric_components/center_column_hyperbola.py
rename to src/paramak/parametric_components/center_column_hyperbola.py
diff --git a/paramak/parametric_components/center_column_plasma_dependant.py b/src/paramak/parametric_components/center_column_plasma_dependant.py
similarity index 100%
rename from paramak/parametric_components/center_column_plasma_dependant.py
rename to src/paramak/parametric_components/center_column_plasma_dependant.py
diff --git a/paramak/parametric_components/circular_port.py b/src/paramak/parametric_components/circular_port.py
similarity index 100%
rename from paramak/parametric_components/circular_port.py
rename to src/paramak/parametric_components/circular_port.py
diff --git a/paramak/parametric_components/constant_thickness_dome.py b/src/paramak/parametric_components/constant_thickness_dome.py
similarity index 100%
rename from paramak/parametric_components/constant_thickness_dome.py
rename to src/paramak/parametric_components/constant_thickness_dome.py
diff --git a/paramak/parametric_components/coolant_channel_ring_curved.py b/src/paramak/parametric_components/coolant_channel_ring_curved.py
similarity index 100%
rename from paramak/parametric_components/coolant_channel_ring_curved.py
rename to src/paramak/parametric_components/coolant_channel_ring_curved.py
diff --git a/paramak/parametric_components/coolant_channel_ring_straight.py b/src/paramak/parametric_components/coolant_channel_ring_straight.py
similarity index 100%
rename from paramak/parametric_components/coolant_channel_ring_straight.py
rename to src/paramak/parametric_components/coolant_channel_ring_straight.py
diff --git a/paramak/parametric_components/cutting_wedge.py b/src/paramak/parametric_components/cutting_wedge.py
similarity index 100%
rename from paramak/parametric_components/cutting_wedge.py
rename to src/paramak/parametric_components/cutting_wedge.py
diff --git a/paramak/parametric_components/cutting_wedge_fs.py b/src/paramak/parametric_components/cutting_wedge_fs.py
similarity index 100%
rename from paramak/parametric_components/cutting_wedge_fs.py
rename to src/paramak/parametric_components/cutting_wedge_fs.py
diff --git a/paramak/parametric_components/dished_vacuum_vessel.py b/src/paramak/parametric_components/dished_vacuum_vessel.py
similarity index 95%
rename from paramak/parametric_components/dished_vacuum_vessel.py
rename to src/paramak/parametric_components/dished_vacuum_vessel.py
index 2555df8d2..d1308a866 100644
--- a/paramak/parametric_components/dished_vacuum_vessel.py
+++ b/src/paramak/parametric_components/dished_vacuum_vessel.py
@@ -1,3 +1,4 @@
+from cadquery import Compound
 from paramak import RotateMixedShape, CenterColumnShieldCylinder, ConstantThicknessDome
 
 
@@ -117,5 +118,5 @@ def create_solid(self):
             rotation_angle=self.rotation_angle,
         )
 
-        upper_dome_section.solid = upper_dome_section.solid.union(cylinder_section.solid)
-        self.solid = lower_dome_section.solid.union(upper_dome_section.solid)
+        shapes = [lower_dome_section.solid.val(), upper_dome_section.solid.val(), cylinder_section.solid.val()]
+        self.solid = Compound.makeCompound(shapes)
diff --git a/paramak/parametric_components/divertor_ITER.py b/src/paramak/parametric_components/divertor_ITER.py
similarity index 100%
rename from paramak/parametric_components/divertor_ITER.py
rename to src/paramak/parametric_components/divertor_ITER.py
diff --git a/paramak/parametric_components/divertor_ITER_no_dome.py b/src/paramak/parametric_components/divertor_ITER_no_dome.py
similarity index 100%
rename from paramak/parametric_components/divertor_ITER_no_dome.py
rename to src/paramak/parametric_components/divertor_ITER_no_dome.py
diff --git a/paramak/parametric_components/extrude_hollow_rectangle.py b/src/paramak/parametric_components/extrude_hollow_rectangle.py
similarity index 100%
rename from paramak/parametric_components/extrude_hollow_rectangle.py
rename to src/paramak/parametric_components/extrude_hollow_rectangle.py
diff --git a/paramak/parametric_components/extrude_rectangle.py b/src/paramak/parametric_components/extrude_rectangle.py
similarity index 100%
rename from paramak/parametric_components/extrude_rectangle.py
rename to src/paramak/parametric_components/extrude_rectangle.py
diff --git a/paramak/parametric_components/hexagon_pin.py b/src/paramak/parametric_components/hexagon_pin.py
similarity index 100%
rename from paramak/parametric_components/hexagon_pin.py
rename to src/paramak/parametric_components/hexagon_pin.py
diff --git a/paramak/parametric_components/hollow_cube.py b/src/paramak/parametric_components/hollow_cube.py
similarity index 100%
rename from paramak/parametric_components/hollow_cube.py
rename to src/paramak/parametric_components/hollow_cube.py
diff --git a/paramak/parametric_components/inboard_firstwall_fccs.py b/src/paramak/parametric_components/inboard_firstwall_fccs.py
similarity index 100%
rename from paramak/parametric_components/inboard_firstwall_fccs.py
rename to src/paramak/parametric_components/inboard_firstwall_fccs.py
diff --git a/paramak/parametric_components/inner_tf_coils_circular.py b/src/paramak/parametric_components/inner_tf_coils_circular.py
similarity index 100%
rename from paramak/parametric_components/inner_tf_coils_circular.py
rename to src/paramak/parametric_components/inner_tf_coils_circular.py
diff --git a/paramak/parametric_components/inner_tf_coils_flat.py b/src/paramak/parametric_components/inner_tf_coils_flat.py
similarity index 100%
rename from paramak/parametric_components/inner_tf_coils_flat.py
rename to src/paramak/parametric_components/inner_tf_coils_flat.py
diff --git a/paramak/parametric_components/poloidal_field_coil.py b/src/paramak/parametric_components/poloidal_field_coil.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil.py
rename to src/paramak/parametric_components/poloidal_field_coil.py
diff --git a/paramak/parametric_components/poloidal_field_coil_case.py b/src/paramak/parametric_components/poloidal_field_coil_case.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil_case.py
rename to src/paramak/parametric_components/poloidal_field_coil_case.py
diff --git a/paramak/parametric_components/poloidal_field_coil_case_fc.py b/src/paramak/parametric_components/poloidal_field_coil_case_fc.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil_case_fc.py
rename to src/paramak/parametric_components/poloidal_field_coil_case_fc.py
diff --git a/paramak/parametric_components/poloidal_field_coil_case_set.py b/src/paramak/parametric_components/poloidal_field_coil_case_set.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil_case_set.py
rename to src/paramak/parametric_components/poloidal_field_coil_case_set.py
diff --git a/paramak/parametric_components/poloidal_field_coil_case_set_fc.py b/src/paramak/parametric_components/poloidal_field_coil_case_set_fc.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil_case_set_fc.py
rename to src/paramak/parametric_components/poloidal_field_coil_case_set_fc.py
diff --git a/paramak/parametric_components/poloidal_field_coil_fp.py b/src/paramak/parametric_components/poloidal_field_coil_fp.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil_fp.py
rename to src/paramak/parametric_components/poloidal_field_coil_fp.py
diff --git a/paramak/parametric_components/poloidal_field_coil_set.py b/src/paramak/parametric_components/poloidal_field_coil_set.py
similarity index 100%
rename from paramak/parametric_components/poloidal_field_coil_set.py
rename to src/paramak/parametric_components/poloidal_field_coil_set.py
diff --git a/paramak/parametric_components/poloidal_segmenter.py b/src/paramak/parametric_components/poloidal_segmenter.py
similarity index 100%
rename from paramak/parametric_components/poloidal_segmenter.py
rename to src/paramak/parametric_components/poloidal_segmenter.py
diff --git a/paramak/parametric_components/port_cutters_circular.py b/src/paramak/parametric_components/port_cutters_circular.py
similarity index 100%
rename from paramak/parametric_components/port_cutters_circular.py
rename to src/paramak/parametric_components/port_cutters_circular.py
diff --git a/paramak/parametric_components/port_cutters_rectangular.py b/src/paramak/parametric_components/port_cutters_rectangular.py
similarity index 100%
rename from paramak/parametric_components/port_cutters_rectangular.py
rename to src/paramak/parametric_components/port_cutters_rectangular.py
diff --git a/paramak/parametric_components/port_cutters_rotated.py b/src/paramak/parametric_components/port_cutters_rotated.py
similarity index 100%
rename from paramak/parametric_components/port_cutters_rotated.py
rename to src/paramak/parametric_components/port_cutters_rotated.py
diff --git a/paramak/parametric_components/rotated_isosceles_triangle.py b/src/paramak/parametric_components/rotated_isosceles_triangle.py
similarity index 100%
rename from paramak/parametric_components/rotated_isosceles_triangle.py
rename to src/paramak/parametric_components/rotated_isosceles_triangle.py
diff --git a/paramak/parametric_components/rotated_trapezoid.py b/src/paramak/parametric_components/rotated_trapezoid.py
similarity index 100%
rename from paramak/parametric_components/rotated_trapezoid.py
rename to src/paramak/parametric_components/rotated_trapezoid.py
diff --git a/paramak/parametric_components/shell_fs.py b/src/paramak/parametric_components/shell_fs.py
similarity index 100%
rename from paramak/parametric_components/shell_fs.py
rename to src/paramak/parametric_components/shell_fs.py
diff --git a/paramak/parametric_components/tf_coil_casing.py b/src/paramak/parametric_components/tf_coil_casing.py
similarity index 100%
rename from paramak/parametric_components/tf_coil_casing.py
rename to src/paramak/parametric_components/tf_coil_casing.py
diff --git a/paramak/parametric_components/tokamak_plasma.py b/src/paramak/parametric_components/tokamak_plasma.py
similarity index 100%
rename from paramak/parametric_components/tokamak_plasma.py
rename to src/paramak/parametric_components/tokamak_plasma.py
diff --git a/paramak/parametric_components/tokamak_plasma_from_points.py b/src/paramak/parametric_components/tokamak_plasma_from_points.py
similarity index 100%
rename from paramak/parametric_components/tokamak_plasma_from_points.py
rename to src/paramak/parametric_components/tokamak_plasma_from_points.py
diff --git a/paramak/parametric_components/tokamak_plasma_plasmaboundaries.py b/src/paramak/parametric_components/tokamak_plasma_plasmaboundaries.py
similarity index 100%
rename from paramak/parametric_components/tokamak_plasma_plasmaboundaries.py
rename to src/paramak/parametric_components/tokamak_plasma_plasmaboundaries.py
diff --git a/paramak/parametric_components/toroidal_field_coil.py b/src/paramak/parametric_components/toroidal_field_coil.py
similarity index 100%
rename from paramak/parametric_components/toroidal_field_coil.py
rename to src/paramak/parametric_components/toroidal_field_coil.py
diff --git a/paramak/parametric_components/toroidal_field_coil_coat_hanger.py b/src/paramak/parametric_components/toroidal_field_coil_coat_hanger.py
similarity index 100%
rename from paramak/parametric_components/toroidal_field_coil_coat_hanger.py
rename to src/paramak/parametric_components/toroidal_field_coil_coat_hanger.py
diff --git a/paramak/parametric_components/toroidal_field_coil_princeton_d.py b/src/paramak/parametric_components/toroidal_field_coil_princeton_d.py
similarity index 100%
rename from paramak/parametric_components/toroidal_field_coil_princeton_d.py
rename to src/paramak/parametric_components/toroidal_field_coil_princeton_d.py
diff --git a/paramak/parametric_components/toroidal_field_coil_rectangle.py b/src/paramak/parametric_components/toroidal_field_coil_rectangle.py
similarity index 100%
rename from paramak/parametric_components/toroidal_field_coil_rectangle.py
rename to src/paramak/parametric_components/toroidal_field_coil_rectangle.py
diff --git a/paramak/parametric_components/toroidal_field_coil_round_corners.py b/src/paramak/parametric_components/toroidal_field_coil_round_corners.py
similarity index 100%
rename from paramak/parametric_components/toroidal_field_coil_round_corners.py
rename to src/paramak/parametric_components/toroidal_field_coil_round_corners.py
diff --git a/paramak/parametric_components/toroidal_field_coil_triple_arc.py b/src/paramak/parametric_components/toroidal_field_coil_triple_arc.py
similarity index 100%
rename from paramak/parametric_components/toroidal_field_coil_triple_arc.py
rename to src/paramak/parametric_components/toroidal_field_coil_triple_arc.py
diff --git a/paramak/parametric_components/vacuum_vessel.py b/src/paramak/parametric_components/vacuum_vessel.py
similarity index 100%
rename from paramak/parametric_components/vacuum_vessel.py
rename to src/paramak/parametric_components/vacuum_vessel.py
diff --git a/paramak/parametric_components/vacuum_vessel_inner_leg.py b/src/paramak/parametric_components/vacuum_vessel_inner_leg.py
similarity index 100%
rename from paramak/parametric_components/vacuum_vessel_inner_leg.py
rename to src/paramak/parametric_components/vacuum_vessel_inner_leg.py
diff --git a/paramak/parametric_reactors/__init__.py b/src/paramak/parametric_reactors/__init__.py
similarity index 100%
rename from paramak/parametric_reactors/__init__.py
rename to src/paramak/parametric_reactors/__init__.py
diff --git a/paramak/parametric_reactors/ball_reactor.py b/src/paramak/parametric_reactors/ball_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/ball_reactor.py
rename to src/paramak/parametric_reactors/ball_reactor.py
diff --git a/paramak/parametric_reactors/center_column_study_reactor.py b/src/paramak/parametric_reactors/center_column_study_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/center_column_study_reactor.py
rename to src/paramak/parametric_reactors/center_column_study_reactor.py
diff --git a/paramak/parametric_reactors/eu_demo_2015_reactor.py b/src/paramak/parametric_reactors/eu_demo_2015_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/eu_demo_2015_reactor.py
rename to src/paramak/parametric_reactors/eu_demo_2015_reactor.py
diff --git a/paramak/parametric_reactors/flf_system_code_reactor.py b/src/paramak/parametric_reactors/flf_system_code_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/flf_system_code_reactor.py
rename to src/paramak/parametric_reactors/flf_system_code_reactor.py
diff --git a/paramak/parametric_reactors/iter_paper_2020.py b/src/paramak/parametric_reactors/iter_paper_2020.py
similarity index 100%
rename from paramak/parametric_reactors/iter_paper_2020.py
rename to src/paramak/parametric_reactors/iter_paper_2020.py
diff --git a/paramak/parametric_reactors/negative_triangularity_reactor.py b/src/paramak/parametric_reactors/negative_triangularity_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/negative_triangularity_reactor.py
rename to src/paramak/parametric_reactors/negative_triangularity_reactor.py
diff --git a/paramak/parametric_reactors/segmented_blanket_ball_reactor.py b/src/paramak/parametric_reactors/segmented_blanket_ball_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/segmented_blanket_ball_reactor.py
rename to src/paramak/parametric_reactors/segmented_blanket_ball_reactor.py
diff --git a/paramak/parametric_reactors/single_null_ball_reactor.py b/src/paramak/parametric_reactors/single_null_ball_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/single_null_ball_reactor.py
rename to src/paramak/parametric_reactors/single_null_ball_reactor.py
diff --git a/paramak/parametric_reactors/single_null_submersion_reactor.py b/src/paramak/parametric_reactors/single_null_submersion_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/single_null_submersion_reactor.py
rename to src/paramak/parametric_reactors/single_null_submersion_reactor.py
diff --git a/paramak/parametric_reactors/sparc_paper_2020.py b/src/paramak/parametric_reactors/sparc_paper_2020.py
similarity index 100%
rename from paramak/parametric_reactors/sparc_paper_2020.py
rename to src/paramak/parametric_reactors/sparc_paper_2020.py
diff --git a/paramak/parametric_reactors/submersion_reactor.py b/src/paramak/parametric_reactors/submersion_reactor.py
similarity index 100%
rename from paramak/parametric_reactors/submersion_reactor.py
rename to src/paramak/parametric_reactors/submersion_reactor.py
diff --git a/paramak/parametric_shapes/__init__.py b/src/paramak/parametric_shapes/__init__.py
similarity index 100%
rename from paramak/parametric_shapes/__init__.py
rename to src/paramak/parametric_shapes/__init__.py
diff --git a/paramak/parametric_shapes/extruded_circle_shape.py b/src/paramak/parametric_shapes/extruded_circle_shape.py
similarity index 100%
rename from paramak/parametric_shapes/extruded_circle_shape.py
rename to src/paramak/parametric_shapes/extruded_circle_shape.py
diff --git a/paramak/parametric_shapes/extruded_mixed_shape.py b/src/paramak/parametric_shapes/extruded_mixed_shape.py
similarity index 100%
rename from paramak/parametric_shapes/extruded_mixed_shape.py
rename to src/paramak/parametric_shapes/extruded_mixed_shape.py
diff --git a/paramak/parametric_shapes/extruded_spline_shape.py b/src/paramak/parametric_shapes/extruded_spline_shape.py
similarity index 100%
rename from paramak/parametric_shapes/extruded_spline_shape.py
rename to src/paramak/parametric_shapes/extruded_spline_shape.py
diff --git a/paramak/parametric_shapes/extruded_straight_shape.py b/src/paramak/parametric_shapes/extruded_straight_shape.py
similarity index 100%
rename from paramak/parametric_shapes/extruded_straight_shape.py
rename to src/paramak/parametric_shapes/extruded_straight_shape.py
diff --git a/paramak/parametric_shapes/rotate_circle_shape.py b/src/paramak/parametric_shapes/rotate_circle_shape.py
similarity index 100%
rename from paramak/parametric_shapes/rotate_circle_shape.py
rename to src/paramak/parametric_shapes/rotate_circle_shape.py
diff --git a/paramak/parametric_shapes/rotate_mixed_shape.py b/src/paramak/parametric_shapes/rotate_mixed_shape.py
similarity index 100%
rename from paramak/parametric_shapes/rotate_mixed_shape.py
rename to src/paramak/parametric_shapes/rotate_mixed_shape.py
diff --git a/paramak/parametric_shapes/rotate_spline_shape.py b/src/paramak/parametric_shapes/rotate_spline_shape.py
similarity index 100%
rename from paramak/parametric_shapes/rotate_spline_shape.py
rename to src/paramak/parametric_shapes/rotate_spline_shape.py
diff --git a/paramak/parametric_shapes/rotate_straight_shape.py b/src/paramak/parametric_shapes/rotate_straight_shape.py
similarity index 100%
rename from paramak/parametric_shapes/rotate_straight_shape.py
rename to src/paramak/parametric_shapes/rotate_straight_shape.py
diff --git a/paramak/parametric_shapes/sweep_circle_shape.py b/src/paramak/parametric_shapes/sweep_circle_shape.py
similarity index 100%
rename from paramak/parametric_shapes/sweep_circle_shape.py
rename to src/paramak/parametric_shapes/sweep_circle_shape.py
diff --git a/paramak/parametric_shapes/sweep_mixed_shape.py b/src/paramak/parametric_shapes/sweep_mixed_shape.py
similarity index 100%
rename from paramak/parametric_shapes/sweep_mixed_shape.py
rename to src/paramak/parametric_shapes/sweep_mixed_shape.py
diff --git a/paramak/parametric_shapes/sweep_spline_shape.py b/src/paramak/parametric_shapes/sweep_spline_shape.py
similarity index 100%
rename from paramak/parametric_shapes/sweep_spline_shape.py
rename to src/paramak/parametric_shapes/sweep_spline_shape.py
diff --git a/paramak/parametric_shapes/sweep_straight_shape.py b/src/paramak/parametric_shapes/sweep_straight_shape.py
similarity index 100%
rename from paramak/parametric_shapes/sweep_straight_shape.py
rename to src/paramak/parametric_shapes/sweep_straight_shape.py
diff --git a/paramak/reactor.py b/src/paramak/reactor.py
similarity index 100%
rename from paramak/reactor.py
rename to src/paramak/reactor.py
diff --git a/paramak/shape.py b/src/paramak/shape.py
similarity index 100%
rename from paramak/shape.py
rename to src/paramak/shape.py
diff --git a/paramak/utils.py b/src/paramak/utils.py
similarity index 100%
rename from paramak/utils.py
rename to src/paramak/utils.py


Test patch:
diff --git a/tests/__init__.py b/tests/__init__.py
deleted file mode 100644
index e69de29bb..000000000