diff --git a/00.Setup/Setup.ipynb b/00.Setup/Setup.ipynb index da8d61e..20e2d98 100755 --- a/00.Setup/Setup.ipynb +++ b/00.Setup/Setup.ipynb @@ -20,7 +20,6 @@ "source": [ "import configparser\n", "import os\n", - "from unittest import SkipTest\n", "\n", "OVERRIDE_EXISTING = False\n", "FULL_PATH = os.path.expanduser('~/.spynnaker.cfg')\n", @@ -50,23 +49,23 @@ " return True\n", "\n", " # SkipTest as unittest considers this neither a failure nor a success\n", - " raise SkipTest(f\"{FULL_PATH} already exists. \"\n", - " \"To replace it change OVERRIDE_EXISTING to True\")\n", + " print(f\"{FULL_PATH} already exists.)\n", + " print(\"To replace it change OVERRIDE_EXISTING to True\")\"\n", + " return False\n", "\n", "\n", - "check_should_create()\n", - "\n", "# Make sure there is a spynnaker.cfg file\n", - "with open(FULL_PATH, 'w') as cfg:\n", - " cfg.write(\"[Machine]\\n\")\n", - " cfg.write(\"spalloc_server = https://spinnaker.cs.man.ac.uk/spalloc/\\n\")\n", - " cfg.write(\"\\n\")\n", - " cfg.write(\"[Java]\\n\")\n", - " cfg.write(\"use_java=True\\n\")\n", - " cfg.write(\"\\n\")\n", - " cfg.write(\"[Reports]\\n\")\n", - " cfg.write(\"read_provenance_data = False\\n\")\n", - " print(f\"New {FULL_PATH} created\")\n" + "if check_should_create():\n", + " with open(FULL_PATH, 'w') as cfg:\n", + " cfg.write(\"[Machine]\\n\")\n", + " cfg.write(\"spalloc_server = https://spinnaker.cs.man.ac.uk/spalloc/\\n\")\n", + " cfg.write(\"\\n\")\n", + " cfg.write(\"[Java]\\n\")\n", + " cfg.write(\"use_java=True\\n\")\n", + " cfg.write(\"\\n\")\n", + " cfg.write(\"[Reports]\\n\")\n", + " cfg.write(\"read_provenance_data = False\\n\")\n", + " print(f\"New {FULL_PATH} created\")\n" ] }, { @@ -82,8 +81,7 @@ ] } ], - "metadata": { - }, + "metadata": {}, "nbformat": 4, "nbformat_minor": 2 } \ No newline at end of file