Skip to content

Commit

Permalink
Merge pull request #59 from fusion-energy/develop
Browse files Browse the repository at this point in the history
improved testing, corrected link and a few typos
  • Loading branch information
shimwell authored Dec 20, 2021
2 parents c5486e4 + 9db33be commit 548b427
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 24 deletions.
4 changes: 2 additions & 2 deletions tasks/task_04_make_sources/3_plasma_source_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"source": [
"import openmc_source_plotter as osp\n",
"\n",
"osp.create_initial_particles(source, openmc_exec='/opt/conda/envs/openmc_version_0_11_0/bin/openmc')\n",
"osp.create_initial_particles(my_source, openmc_exec='/opt/conda/envs/openmc_version_0_11_0/bin/openmc')\n",
"osp.plot_energy_from_initial_source()"
]
},
Expand Down Expand Up @@ -136,7 +136,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions tasks/task_12_CAD_mesh_fast_flux/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

## Task 1 - Cross sections
## Task 12 - CAD mesh tally of fast flux

Please allow 30 minutes for this task.

Expected outputs from this task are also in the [presentation](https://slides.com/neutronics_workshop/neutronics_workshop#/13.
Expected outputs from this task are also in the [presentation](https://slides.com/neutronics_workshop/neutronics_workshop#/13).

In this task you will be using OpenMC, DAGMC to perform neutronics simulations
on 2D meshes and 3D meshes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"number_of_simulations = 16\n",
"\n",
"# defines the parameter space to search over\n",
"# space = Space([(0., 100.), (0., 100.)])"
"space = Space([(0., 100.), (0., 100.)])"
]
},
{
Expand Down Expand Up @@ -362,7 +362,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.12"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
45 changes: 27 additions & 18 deletions tests/test_all_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,17 @@ def test_task_3(self):
nb, errors = _notebook_run(notebook)
assert errors == []

# ModuleNotFoundError: No module named 'source_extraction_utils
# def test_task_4(self):
# print(notebook)
# for notebook in Path().rglob("tasks/task_04_*/*.ipynb"):
# nb, errors = _notebook_run(notebook)
# assert errors == []
def test_task_4(self):
for notebook in Path().rglob("tasks/task_04_*/1_.ipynb"):
nb, errors = _notebook_run(notebook)
assert errors == []
for notebook in Path().rglob("tasks/task_04_*/4_.ipynb"):
nb, errors = _notebook_run(notebook)
assert errors == []
# failing tasks
# 2_ring_source.ipynb -> no ring source in openmc 0.11
# 3_plasma_source_plots.ipynb -> no ring source in openmc 0.11
# 5_gamma_source_example.ipynb -> gamma outside of nuclear data energy range

def test_task_5(self):
for notebook in Path().rglob("tasks/task_05_*/*.ipynb"):
Expand All @@ -79,12 +84,11 @@ def test_task_6(self):
nb, errors = _notebook_run(notebook)
assert errors == []

# ModuleNotFoundError: No module named 'plotting_utils'
# def test_task_7(self):
# for notebook in Path().rglob("tasks/task_07_*/*.ipynb"):
# print(notebook)
# nb, errors = _notebook_run(notebook)
# assert errors == []
def test_task_7(self):
for notebook in Path().rglob("tasks/task_07_*/*.ipynb"):
print(notebook)
nb, errors = _notebook_run(notebook)
assert errors == []

# ModuleNotFoundError: No module named 'statepoint_to_vtk'
# def test_task_8(self):
Expand All @@ -105,23 +109,28 @@ def test_task_10(self):
nb, errors = _notebook_run(notebook)
assert errors == []

# TimeoutError: Cell execution timed out
def test_task_11(self):
for notebook in Path().rglob("tasks/task_11_*/*.ipynb"):
print(notebook)
nb, errors = _notebook_run(notebook)
assert errors == []

# def test_task_12(self):
# for notebook in Path().rglob("tasks/task_12_*/*.ipynb"):
def test_task_12(self):
for notebook in Path().rglob("tasks/task_12_*/*.ipynb"):
print(notebook)
nb, errors = _notebook_run(notebook)
assert errors == []

# No module named 'openmc_model'
# def test_task_13(self):
# for notebook in Path().rglob("tasks/task_13_*/*.ipynb"):
# print(notebook)
# nb, errors = _notebook_run(notebook)
# assert errors == []

# No module named 'openmc_model'
# ModuleNotFoundError: No module named 'statepoint_to_vtk'
# def test_task_13(self):
# for notebook in Path().rglob("tasks/task_13_*/*.ipynb"):
# def test_task_14(self):
# for notebook in Path().rglob("tasks/task_14_*/*.ipynb"):
# print(notebook)
# nb, errors = _notebook_run(notebook)
# assert errors == []

0 comments on commit 548b427

Please sign in to comment.