Skip to content

Commit

Permalink
change path finding
Browse files Browse the repository at this point in the history
  • Loading branch information
ammarcsj committed Oct 16, 2024
1 parent 8b3da65 commit b82ed08
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/quicktests/run_pipeline_w_different_input_formats.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@
"source": [
"import os\n",
"import alphabase.test_data_downloader\n",
"from IPython import get_ipython\n",
"\n",
"# Use the current working directory as a starting point\n",
"current_dir = os.getcwd()\n",
"# Get the directory of the current notebook\n",
"notebook_path = get_ipython().kernel.path\n",
"notebook_dir = os.path.dirname(notebook_path)\n",
"\n",
"# Navigate up two levels to reach the project root\n",
"project_root = os.path.abspath(os.path.join(current_dir, '..', '..','..'))\n",
"# Navigate up three levels to reach the project root\n",
"project_root = os.path.abspath(os.path.join(notebook_dir, '..', '..'))\n",
"\n",
"output_dir = os.path.join(project_root, 'test_data', 'system_tests')\n",
"\n",
"os.makedirs(output_dir, exist_ok=True)\n",
"# Now use the absolute path in the DataShareDownloader call\n",
"alphabase.test_data_downloader.DataShareDownloader(url=\"https://datashare.biochem.mpg.de/s/VJm70w0p2P86tE1\", output_dir=output_dir).download()"
"alphabase.test_data_downloader.DataShareDownloader(url=\"https://datashare.biochem.mpg.de/s/VJm70w0p2P86tE1\", output_dir=output_dir).download()\n"
]
},
{
Expand All @@ -28,7 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"quicktest_folder_mq_peptides = \"../../test_data/system_tests/quicktests/mq_peptides\"\n",
"quicktest_folder_mq_peptides = f\"../../test_data/system_tests/quicktests/mq_peptides\"\n",
"\n",
"quicktest_folder_mq_evidence = \"../../test_data/system_tests/quicktests/mq_evidence\"\n",
"\n",
Expand Down

0 comments on commit b82ed08

Please sign in to comment.