Skip to content

Commit

Permalink
version 1.0 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
keanteng committed Sep 11, 2023
1 parent ea65b22 commit 12b3e06
Show file tree
Hide file tree
Showing 12 changed files with 351 additions and 725 deletions.
Binary file modified blueautomata/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified blueautomata/__pycache__/automation_report.cpython-311.pyc
Binary file not shown.
Binary file modified blueautomata/__pycache__/batch_export.cpython-311.pyc
Binary file not shown.
Binary file modified blueautomata/__pycache__/data_compilation.cpython-311.pyc
Binary file not shown.
Binary file modified blueautomata/__pycache__/inconsistency.cpython-311.pyc
Binary file not shown.
Binary file modified blueautomata/__pycache__/system_cube.cpython-311.pyc
Binary file not shown.
Binary file modified blueautomata/__pycache__/to_vba.cpython-311.pyc
Binary file not shown.
553 changes: 278 additions & 275 deletions blueautomata/automation_report.py

Large diffs are not rendered by default.

430 changes: 0 additions & 430 deletions function_draft.ipynb

This file was deleted.

2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ theme:
- content.code.copy
- content.code.select
- content.action.edit
- content.action.view
logo: assets/logo.png
favicon: assets/favicon.png

Expand Down Expand Up @@ -113,6 +114,7 @@ markdown_extensions:
plugins:
- git-revision-date
- git-revision-date-localized:
fallback_to_build_date: true
enable_creation_date: true
type: timeago
- mkdocs-jupyter:
Expand Down
87 changes: 69 additions & 18 deletions pilot_test2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 1,
"metadata": {},
"outputs": [
{
Expand All @@ -25,6 +25,7 @@
"source": [
"import pandas as pd\n",
"import time\n",
"\n",
"start_time = time.time()\n",
"print(\"🚀Execution time: {:.15f}\".format(start_time - time.time()))\n",
"del start_time"
Expand Down Expand Up @@ -74,15 +75,15 @@
"\n",
"test = BlueAutomata(\n",
" folder_path=r\"C:\\Users\\Khor Kean Teng\\Downloads\\AUP Automata\\data\\fakesystem\",\n",
" checklist = 'data/checklist.xlsx',\n",
" staff_data = 'data/fake_hr_data.xlsx',\n",
" name_key= ['BSE', 'HKEX', 'KLSE', 'LSE1', 'NASDAQ', 'NYSE', 'SGX', 'SSE', 'TSE'],\n",
" name_code= [1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
" checklist=\"data/checklist.xlsx\",\n",
" staff_data=\"data/fake_hr_data.xlsx\",\n",
" name_key=[\"BSE\", \"HKEX\", \"KLSE\", \"LSE1\", \"NASDAQ\", \"NYSE\", \"SGX\", \"SSE\", \"TSE\"],\n",
" name_code=[1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
")\n",
"df = test.automata_execution()\n",
"\n",
"print(df.head().to_markdown())\n",
"print('\\n Total number of rows: ', df.shape[0])\n",
"print(\"\\n Total number of rows: \", df.shape[0])\n",
"print(\"\\n🚀Execution time: {:.15f}\".format(time.time() - start_time))\n",
"del start_time"
]
Expand All @@ -93,7 +94,7 @@
"metadata": {},
"outputs": [],
"source": [
"df.to_excel('data/output.xlsx', index=False)"
"df.to_excel(\"data/output.xlsx\", index=False)"
]
},
{
Expand Down Expand Up @@ -137,15 +138,65 @@
"\n",
"test = AutomataReport(\n",
" folder_path=r\"C:\\Users\\Khor Kean Teng\\Downloads\\AUP Automata\\data\\fakesystem\",\n",
" checklist = 'data/checklist.xlsx',\n",
" staff_data = 'data/fake_hr_data.xlsx',\n",
" name_key= ['BSE', 'HKEX', 'KLSE', 'LSE1', 'NASDAQ', 'NYSE', 'SGX', 'SSE', 'TSE'],\n",
" name_code= [1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
" checklist=\"data/checklist.xlsx\",\n",
" staff_data=\"data/fake_hr_data.xlsx\",\n",
" name_key=[\"BSE\", \"HKEX\", \"KLSE\", \"LSE1\", \"NASDAQ\", \"NYSE\", \"SGX\", \"SSE\", \"TSE\"],\n",
" name_code=[1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
")\n",
"df = test.automata_report_summary()\n",
"\n",
"print(df.head(n = len(df)).to_markdown())\n",
"print('\\n Total number of matched: ', df['Match IDs'].sum())\n",
"print(df.head(n=len(df)).to_markdown())\n",
"print(\"\\n Total number of matched: \", df[\"Match IDs\"].sum())\n",
"print(\"\\n🚀Execution time: {:.15f}\".format(time.time() - start_time))\n",
"del start_time"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"| | User ID | check | System1 | Name |\n",
"|---:|:------------------|:--------|:----------|:-------------------|\n",
"| 0 | chgzsprz5pwc0mnx7 | False | BSE | Jennifer Sandoval |\n",
"| 1 | l3ur5zaf6eefpvslw | False | BSE | Jessica Evans |\n",
"| 2 | r31p76vr2f5n3x1e8 | False | BSE | William Robinson |\n",
"| 3 | 0dnjw78m083l0e0p7 | False | BSE | Lisa Brown |\n",
"| 4 | 84vmzt0j5ev4z4pta | False | BSE | Dr. Nichole Thomas |\n",
"| 5 | g7jvd2nb55b88hdbu | False | BSE | Carlos Walls |\n",
"| 6 | 3a1wukpcxkxah6d05 | False | BSE | William Morgan |\n",
"| 7 | 41u8tlyj6nm1scwvx | False | BSE | David Wilson |\n",
"| 8 | g7h6efjk5z4xlhwzu | False | BSE | Maria Watson |\n",
"| 9 | 8b2t34bvxburnjc5b | False | BSE | Nicholas Burton |\n",
"| 10 | 57s8x0bext7v1hhkx | False | BSE | Sean Ramirez |\n",
"| 11 | jk0g4vfbx83a256lg | False | BSE | Alexis Vang |\n",
"| 12 | 2zh9mag3x6ph2n5ee | False | BSE | Debra Nelson |\n",
"| 13 | 53rgf9kh8zddv0kxr | False | BSE | Stacy Johnson |\n",
"| 14 | kket7v5u14cz618u5 | False | BSE | Dillon Aguirre |\n",
"\n",
"🚀Execution time: 1.007138967514038\n"
]
}
],
"source": [
"from blueautomata.automation_report import AutomataReport\n",
"\n",
"start_time = time.time()\n",
"\n",
"test = AutomataReport(\n",
" folder_path=r\"C:\\Users\\Khor Kean Teng\\Downloads\\AUP Automata\\data\\fakesystem\",\n",
" checklist=\"data/checklist.xlsx\",\n",
" staff_data=\"data/fake_hr_data.xlsx\",\n",
" name_key=[\"BSE\", \"HKEX\", \"KLSE\", \"LSE1\", \"NASDAQ\", \"NYSE\", \"SGX\", \"SSE\", \"TSE\"],\n",
" name_code=[1, 1, 1, 1, 1, 1, 1, 1, 1],\n",
")\n",
"df = test.automata_report_unmatch()\n",
"\n",
"print(df.head(n=15).to_markdown())\n",
"print(\"\\n🚀Execution time: {:.15f}\".format(time.time() - start_time))\n",
"del start_time"
]
Expand Down Expand Up @@ -185,11 +236,11 @@
"\n",
"start_time = time.time()\n",
"\n",
"df = pd.read_excel('data/output.xlsx')\n",
"df = pd.read_excel(\"data/output.xlsx\")\n",
"\n",
"temp = BatchExport(\n",
" destination='data/dept',\n",
" masterlist= df,\n",
" destination=\"data/dept\",\n",
" masterlist=df,\n",
")\n",
"\n",
"temp.batch_export()\n",
Expand Down Expand Up @@ -226,8 +277,8 @@
"start_time = time.time()\n",
"\n",
"temp = automate_vba(\n",
" filepath=r'C:\\\\Users\\\\Khor Kean Teng\\\\Downloads\\\\AUP Automata\\\\vbanew.xlsm',\n",
" macro = 'vbanew.xlsm!Module1.kt_template' \n",
" filepath=r\"C:\\\\Users\\\\Khor Kean Teng\\\\Downloads\\\\AUP Automata\\\\vbanew.xlsm\",\n",
" macro=\"vbanew.xlsm!Module1.kt_template\",\n",
")\n",
"temp.templatetize()\n",
"\n",
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
setup(
name = 'blueautomata', # How you named your package folder (MyLib)
packages = ['blueautomata'], # Chose the same as "name"
version = '0.9', # Start with a small number and increase it with every change you make
version = '1.0', # Start with a small number and increase it with every change you make
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
description = 'A package to ease the workflow for reporting in a company', # Give a short description about your library
author = 'keanteng', # Type in your name
author_email = 'u2004763@siswa.um.edu.my', # Type in your E-Mail
url = 'https://github.com/keanteng/blueautomata', # Provide either the link to your github or to your website
download_url = 'https://github.com/keanteng/blueautomata/archive/refs/tags/v_0.8.tar.gz', # I explain this later on
download_url = 'https://github.com/keanteng/blueautomata/archive/refs/tags/v_0.9.tar.gz', # I explain this later on
keywords = ['automation', 'vba', 'reporting', 'automate'], # Keywords that define your package best
install_requires=['pandas','pywin32','fuzzywuzzy','python-Levenshtein'],
classifiers=[
Expand Down

0 comments on commit 12b3e06

Please sign in to comment.