{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "#| hide\n", "from uoh_software_project_time_report.project import *" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# uoh-software-project-time-report\n", "\n", "> Time reporting WebApp for software project in UoH" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This file will become your README and also the index of your documentation." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Install" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "```sh\n", "pip install uoh_software_project_time_report\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## How to use" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Fill me in please! Don't forget code examples:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1DNoNf4glcuMxKoVzHVrFo-MktmsVji1wf4IHeraWH84" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pr = Project('../keys.json')\n", "pr" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[['name', 'backlog item #', 'hours spent', 'date', 'comment'],\n", " ['Hiroshi Doyu', '25', '1', '2022/1/16'],\n", " ['Michihito Mizutani', '28', '1', '2022/1/16'],\n", " ['Hiroshi Doyu', '25', '1', '2022/1/17'],\n", " ['Hiroshi Doyu', '27', '1.5', '2023-01-30', 'test']]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "pr.get()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[['name', 'backlog item #', 'hours spent', 'date', 'comment'],\n", " ['Hiroshi Doyu', '25', '1', '2022/1/16'],\n", " ['Michihito Mizutani', '28', '1', '2022/1/16'],\n", " ['Hiroshi Doyu', '25', '1', '2022/1/17'],\n", " ['Hiroshi Doyu', '27', '1.5', '2023-01-30', 'test']]" ] }, "execution_count": null, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df = pd.DataFrame(pr.get())\n", "df.columns = df.iloc[0]\n", "df = df[1:]\n", "df['backlog item #'] = df['backlog item #'].astype(int)\n", "df['hours spent'] = df['hours spent'].astype(float)\n", "df.date = pd.to_datetime(df.date)\n", "df.date = df.date.dt.strftime(\"%Y-%m-%d\")\n", "pr.put([df.columns.tolist()] + df.values.tolist())\n", "pr.get()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" } }, "nbformat": 4, "nbformat_minor": 4 }