{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9a81534a",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "c6e772bb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\python311.zip\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\DLLs\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\Lib\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\n",
      "\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\Lib\\site-packages\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\Lib\\site-packages\\win32\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\Lib\\site-packages\\win32\\lib\n",
      "c:\\Users\\florez_j\\.conda\\envs\\multiphase_chemistry_env\\Lib\\site-packages\\Pythonwin\n",
      "c:\\Users\\florez_j\\Documents\\Gitea\\acsmnode\n",
      "c:\\Users\\florez_j\\Documents\\Gitea\\acsmnode\\dima\n",
      "workflow_acsm_data_PAY_2024\n"
     ]
    }
   ],
   "source": [
    "import sys\n",
    "import os\n",
    "# Set up project root directory\n",
    "\n",
    "\n",
    "notebook_dir = os.getcwd()  # Current working directory (assumes running from notebooks/)\n",
    "project_path = os.path.normpath(os.path.join(notebook_dir, \"..\"))  # Move up to project root\n",
    "dima_path = os.path.normpath(os.path.join(project_path, \"dima\"))  # Move up to project root\n",
    "\n",
    "for item in sys.path:\n",
    "    print(item)\n",
    "\n",
    "\n",
    "if project_path not in sys.path:  # Avoid duplicate entries\n",
    "    sys.path.append(project_path)\n",
    "    print(project_path)\n",
    "if dima_path not in sys.path:\n",
    "    sys.path.insert(0,dima_path)\n",
    "    print(dima_path)\n",
    "    \n",
    "from pipelines.steps.utils import load_project_yaml_files\n",
    "campaign_descriptor = load_project_yaml_files(project_path, \"campaignDescriptor.yaml\")\n",
    "YEAR = campaign_descriptor['year']\n",
    "STATION_ABBR = campaign_descriptor['station_abbr']\n",
    "\n",
    "workflow_fname = f'workflow_acsm_data_{STATION_ABBR}_{YEAR}'\n",
    "\n",
    "print(workflow_fname)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "476bba8a",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "91519e18",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 2127484 characters]",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from workflows.utils import plot_workflow_graph\n",
    "import os\n",
    "\n",
    "workflow_file_path = '../workflows/workflow_acsm_data_PAY_2024.yaml'\n",
    "plot_workflow_graph(workflow_file_path, \n",
    "                    os.path.join(project_path,'figures/'),\n",
    "                    'workflow_acsm_data_PAY_2024',\n",
    "                    'png'\n",
    "                    )"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "multiphase_chemistry_env",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
