diff --git a/examples/01_icetray/01_convert_i3_files.py b/examples/01_icetray/01_convert_i3_files.py index 40b304327..9d9f80033 100644 --- a/examples/01_icetray/01_convert_i3_files.py +++ b/examples/01_icetray/01_convert_i3_files.py @@ -16,7 +16,17 @@ from graphnet.utilities.imports import has_icecube_package from graphnet.utilities.logging import Logger -from _common_icetray import ERROR_MESSAGE_MISSING_ICETRAY +ERROR_MESSAGE_MISSING_ICETRAY = ( + "This example requires IceTray to be installed, which doesn't seem to be " + "the case. Please install IceTray; run this example in the GraphNeT " + "Docker container which comes with IceTray installed; or run an example " + "script in one of the other folders:" + "\n * examples/02_data/" + "\n * examples/03_weights/" + "\n * examples/04_training/" + "\n * examples/05_pisa/" + "\nExiting." +) CONVERTER_CLASS = { "sqlite": SQLiteDataConverter, diff --git a/examples/01_icetray/04_i3_module_in_native_icetray_example.py b/examples/01_icetray/04_i3_module_in_native_icetray_example.py index 730eb5bc1..957fb108d 100644 --- a/examples/01_icetray/04_i3_module_in_native_icetray_example.py +++ b/examples/01_icetray/04_i3_module_in_native_icetray_example.py @@ -26,7 +26,17 @@ GraphNeTI3Module, ) -from _common_icetray import ERROR_MESSAGE_MISSING_ICETRAY +ERROR_MESSAGE_MISSING_ICETRAY = ( + "This example requires IceTray to be installed, which doesn't seem to be " + "the case. Please install IceTray; run this example in the GraphNeT " + "Docker container which comes with IceTray installed; or run an example " + "script in one of the other folders:" + "\n * examples/02_data/" + "\n * examples/03_weights/" + "\n * examples/04_training/" + "\n * examples/05_pisa/" + "\nExiting." +) def apply_to_files( diff --git a/examples/01_icetray/_common_icetray.py b/examples/01_icetray/_common_icetray.py deleted file mode 100644 index c1d3b10a0..000000000 --- a/examples/01_icetray/_common_icetray.py +++ /dev/null @@ -1,11 +0,0 @@ -ERROR_MESSAGE_MISSING_ICETRAY = ( - "This example requires IceTray to be installed, which doesn't seem to be " - "the case. Please install IceTray; run this example in the GraphNeT " - "Docker container which comes with IceTray installed; or run an example " - "script in one of the other folders:" - "\n * examples/02_data/" - "\n * examples/03_weights/" - "\n * examples/04_training/" - "\n * examples/05_pisa/" - "\nExiting." -) diff --git a/tests/examples/01_icetray/test_icetray_examples.py b/tests/examples/01_icetray/test_icetray_examples.py index 538a67d36..ddd99423e 100644 --- a/tests/examples/01_icetray/test_icetray_examples.py +++ b/tests/examples/01_icetray/test_icetray_examples.py @@ -26,7 +26,5 @@ def test_03_i3_deployer_example() -> None: def test_04_i3_module_in_native_icetray_example() -> None: """Test for 04_i3_module_in_native_icetray_example.""" runpy.run_path( - os.path.join( - EXAMPLE_PATH, "04_i3_module_in_naticve_icetray_example.py" - ) + os.path.join(EXAMPLE_PATH, "04_i3_module_in_native_icetray_example.py") )