Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/docker_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
- name: Build and test with Docker
run: |
docker build -t paramak --build-arg include_neutronics=true --build-arg cq_version=2.1 --build-arg compile_cores=2 .
docker run --rm paramak /bin/bash -c "cd .. && bash run_tests.sh && curl -s https://codecov.io/bash | bash"
docker run --rm paramak /bin/bash -c "bash run_tests.sh && curl -s https://codecov.io/bash | bash"
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# docker run --rm ukaea/paramak pytest /tests
# docker run --rm ukaea/paramak /bin/bash -c "cd .. && bash run_tests.sh"

FROM continuumio/miniconda3
FROM continuumio/miniconda3:4.9.2

# By default this Dockerfile builds with the latest release of CadQuery 2
ARG cq_version=2
Expand Down Expand Up @@ -213,5 +213,3 @@ COPY README.md README.md

# using setup.py instead of pip due to https://github.com/pypa/pip/issues/5816
RUN python setup.py install

WORKDIR examples
2 changes: 1 addition & 1 deletion DockerfileDependencies
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# docker run --rm ukaea/paramak pytest /tests
# docker run --rm ukaea/paramak /bin/bash -c "cd .. && bash run_tests.sh"

FROM continuumio/miniconda3
FROM continuumio/miniconda3:4.9.2

# By default this Dockerfile builds with the latest release of CadQuery 2
ARG cq_version=2
Expand Down
8 changes: 5 additions & 3 deletions examples/example_parametric_reactors/make_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
them into gif animations using the command line tool convert, you will need to
have imagemagick installed to convert the svg images to a gif animation """

import os
import subprocess

import numpy as np
import paramak
Expand Down Expand Up @@ -60,7 +60,8 @@ def rotate_single_reactor(number_of_images=100):

print("made", str(i + 1), "models out of", str(number_of_images))

os.system("convert -delay 15 rotation_*.svg rotated.gif")
subprocess.check_call(
["convert", "-delay", "15", "rotation_*.svg", "rotated.gif"])

print("animation file made as saved as rotated.gif")

Expand Down Expand Up @@ -102,7 +103,8 @@ def make_random_reactors(number_of_images=11):

print("made", str(i + 1), "models out of", str(number_of_images))

os.system("convert -delay 40 random_*.svg randoms.gif")
subprocess.check_call(
["convert", "-delay", "40", "random_*.svg", "randoms.gif"])

print("animation file made as saved as randoms.gif")

Expand Down
2 changes: 1 addition & 1 deletion paramak/neutronics_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def add_stl_to_moab_core(

group_set = moab_core.create_meshset()
moab_core.tag_set_data(tags['category'], group_set, "Group")
print("mat:{}".format(material_name))

moab_core.tag_set_data(
tags['name'],
group_set,
Expand Down
4 changes: 3 additions & 1 deletion run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
pytest tests/test_neutronics_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
#!/bin/bash

pytest tests/test_neutronics_utils.py -v --cov=paramak --cov-report term --cov-report xml
pytest tests/test_example_neutronics_simulations.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_utils.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
pytest tests/test_Shape.py -v --cov=paramak --cov-append --cov-report term --cov-report xml
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="paramak",
version="0.2.2",
version="0.2.3",
author="The Paramak Development Team",
author_email="jonathan.shimwell@ukaea.uk",
description="Create 3D fusion reactor CAD models based on input parameters",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parametric_reactors/test_BallReactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_creation_with_narrow_divertor(self):
assert self.test_reactor.solid is not None
assert len(self.test_reactor.shapes_and_components) == 7

def test_creation_with_narrow_divertor(self):
def test_creation_with_wide_divertor(self):
"""Creates a BallReactor with a wide divertor and checks that the correct
number of components are created."""

Expand Down