]> apps.delaporte.us Git - dotfiles.git/commitdiff
MERGE BWHAHAHAHAHA
authorEdTheDev <edward@delaporte.us>
Sat, 9 Mar 2024 21:07:31 +0000 (15:07 -0600)
committerEdTheDev <edward@delaporte.us>
Sat, 9 Mar 2024 21:07:31 +0000 (15:07 -0600)
data/issues.ipynb [deleted file]
data/requirements.txt [deleted file]
psmodules/dash.psm1

diff --git a/data/issues.ipynb b/data/issues.ipynb
deleted file mode 100644 (file)
index d718bbf..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "import platform\n",
-    "import matplotlib.pyplot as plt\n",
-    "print(platform.python_version())"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": []
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "# Todo List\n",
-    "\n",
-    "- [x] add calculated year to the metadata\n",
-    "- [ ] make one chart per year\n",
-    "- [x] make sure all the data files are getting loaded"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "# Get ye data\n",
-    "import glob\n",
-    "import os\n",
-    "\n",
-    "data_files = glob.glob(os.path.expanduser('~\\\\Data\\\\*.json'))\n",
-    "\n",
-    "for file in data_files:\n",
-    "\tprint(f\"{file}\", os.path.getsize(file))\n",
-    "\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "import pandas as pd\n",
-    "\n",
-    "data_frames = []\n",
-    "for file in data_files:\n",
-    "\n",
-    "\tf = open(file, encoding='utf-8')\n",
-    "\tdf_temp = pd.read_json(f)\n",
-    "\tdata_frames.append(df_temp)\n",
-    "\n",
-    "df = pd.concat(data_frames, ignore_index=True)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "import numpy as np\n",
-    "df['count'] = np.zeros(len(df))\n",
-    "\n"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "#### Pie Chart"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "\n",
-    "dfp = df\n",
-    "# dfp['mile'] = [m.get('title') if m else None for m in dfp.milestone]\n",
-    "dfp['mile'] = [m.get('title') if hasattr(m, 'get') else None for m in dfp['milestone']]\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "closed_dates = pd.to_datetime(df['closedAt'], format='ISO8601')\n",
-    "dfp['year'] = closed_dates.dt.year\n",
-    "\n",
-    "dfp.drop(columns=['closedAt','milestone', 'url'], inplace=True)\n",
-    "print(dfp)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "\n",
-    "mile_counts = dfp.groupby('mile')['title'].nunique()\n",
-    "dfp['count'] = dfp['mile'].map(mile_counts)\n",
-    "# dfp.drop(columns=['title'], inplace=True)\n",
-    "dfp['mile'] = df['mile'].drop_duplicates()\n",
-    "dfp.dropna(inplace=True)\n",
-    "dfp = dfp[dfp['count'] > 5]\n",
-    "print(dfp)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "mile_counts = df.groupby('mile')['count'].sum()\n",
-    "mile_counts = mile_counts.loc[lambda x: x > 5]\n",
-    "\n",
-    "\n",
-    "print(mile_counts)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "\n",
-    "plt.pie(mile_counts, labels=mile_counts.index, autopct='%0.1f%%')\n",
-    "plt.title(f\"Tasks by Milestone\")\n",
-    "plt.axis('equal')\n",
-    "plt.show()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "type(mile_counts)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "#### Plot of closed issues by month and milestone for one project\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "closed_months = pd.to_datetime(df['closedAt'], format='ISO8601')\n",
-    "df['closed_month'] = closed_months.dt.month\n",
-    "df.drop(columns=['closedAt'], inplace=True)"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "df['mile'] = [d.get('title') if d else None for d in df.milestone]"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "\n",
-    "dfg = df.groupby(['mile', 'closed_month']).count().reset_index()\n",
-    "dfg.drop(columns=['milestone', 'title', 'url'], inplace=True)\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "exclude_from_chart = [\n",
-    "\t'Job Aid Ideas']\n",
-    "\n",
-    "for ex in exclude_from_chart:\n",
-    "\tdfg = dfg[dfg['mile'] != ex]\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[1;31mRunning cells with '/bin/python3' requires the ipykernel package.\n",
-      "\u001b[1;31mRun the following command to install 'ipykernel' into the Python environment. \n",
-      "\u001b[1;31mCommand: '/bin/python3 -m pip install ipykernel -U --user --force-reinstall'"
-     ]
-    }
-   ],
-   "source": [
-    "import seaborn as sns\n",
-    "import matplotlib.pyplot as plt\n",
-    "sns.set_theme()"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "plt.figure(figsize=(10, 6))\n",
-    "sns.pie(x='closed_month', y='count', hue='mile', data=dfg)\n",
-    "plt.pie(dfg, )\n",
-    "plt.xlabel('Closed Month')\n",
-    "plt.ylabel('ClosedAt')\n",
-    "plt.title('Stacked Line Chart: Milestone Effort by Issue Close Date')\n",
-    "plt.xticks(rotation=45)\n",
-    "plt.legend(title='Mile', loc='upper left')\n",
-    "plt.show()"
-   ]
-  }
- ],
- "metadata": {
-  "kernelspec": {
-   "display_name": "Python 3",
-   "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.8.10"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}
diff --git a/data/requirements.txt b/data/requirements.txt
deleted file mode 100644 (file)
index 0fa37c4..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-ipykernel
-jupyter_core
-matplotlib
-pandas
-pyarrow
-seaborn
\ No newline at end of file
index 4b9f3b8ca881bc222aac43929855483e4026b281..e6c881d11d481ec0acd837f2f96bb1d9e5f26040 100644 (file)
@@ -68,7 +68,13 @@ function Show-MyDashBoard() {
        if($blocked){
                Write-Host ""
                Write-Host "## Blocked & Blocker Issues:"
-               Invoke-AgileCmd "gh issue list -S 'label:blocked,blocker,needs context,question'"
+               $blockerQuery = "label:blocker,blight,bug,blocked"
+               Invoke-AgileCmd "gh issue list -S '$blockerQuery'"
+               Write-Host ""
+               Write-Host "## Open Questions"
+               $questionQuery = 'label:"phone a friend",question,"needs context"'
+               Invoke-AgileCmd "gh issue list -S '$questionQuery'"
+
        }
        if($bugs) {
                Write-Host ""
@@ -114,14 +120,6 @@ function Show-MyDashBoard() {
        }
 }
 
-function Show-MyTeamWork() {
-       $team = @('ddriddle', 'zcarrington', 'tzturner', 'mpitcel', 'edthedev')
-       $team | ForEach-Object {
-               "## $_ - Issues Assigned"
-               Get-AgileQuery -Assignee $_ | Invoke-AgileQuery | Show-MarkdownFromGitHub
-       }
-}
-
 function Write-AgileClosedData() {
        $gh_cmd = 'gh issue list --state closed --json title,closedAt,milestone,url'
        Write-AgileToFile -gh_command $gh_cmd