From e1d8d85d7cc65668c55e22932624f9bc4c16b734 Mon Sep 17 00:00:00 2001 From: murraydr Date: Wed, 25 Oct 2023 12:46:55 -0400 Subject: [PATCH] formatted readme --- README.md | 70 +++++++++++++++++++++++++++++++++---------------------- driver.py | 2 ++ 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index d123315..e9e45cd 100644 --- a/README.md +++ b/README.md @@ -2,41 +2,55 @@ System for CSE 102 staff to request subs. -***Installing and configuring for the first time:*** +## Installing and configuring for the first time -Install the libraries in your Python environment: +### Install the libraries in your Python environment: +``` +pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib +pip install --upgrade pandas +pip install --upgrade pysimplegui +``` +Versions that are proven to work (newer versions probably work, older versions maybe work) +Pysimplegui 4.60.4 +pandas: 1.4.4 +google-api-python-client 2.100.0 +google-auth-httplib2 0.1.1 +google-auth-oauthlib 0.5.2 - pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib - pip install --upgrade pandas - pip install --upgrade pysimplegui - - Versions that are proven to work (newer versions probably work, older versions maybe work) - Pysimplegui 4.60.4 - pandas: 1.4.4 - google-api-python-client 2.100.0 - google-auth-httplib2 0.1.1 - google-auth-oauthlib 0.5.2 - -Install Git - https://git-scm.com/downloads - Be sure to use the right version (32 vs 64 bit, Windows vs Linux, etc.) you can find your version of Windows by typing “about” in the start bar - When installing Git, there are many settings, if you don’t know what it does, just keep the default option. +### Install and configure Git +https://git-scm.com/downloads +Be sure to use the right version (32 vs 64 bit, Windows vs Linux, etc.) you can find your version of Windows by typing “about” in the start bar +When installing Git, there are many settings, if you don’t know what it does, just keep the default option. Run Git bash and within run this command: - git config --global core.autocrlf false +``` +git config --global core.autocrlf false +``` Close Git bash and open Git Gui - Click “Clone Existing Repository” and paste https://git.egr.msu.edu/CSE102/Substitution-Requests.git into the “Source Location” box. - The “Target Directory” box is the path to the folder you want to store your local copy in. The folder must NOT already exist. - E.g. “C:\Users\USERNAME\Substitution-Requests” will create the Substitution Requests folder and put all the files inside it. - Open the Repo in GitGui (this might happen automatically after cloning). Click “Tools” and “Add” - Put “Pull” in the name box and “git pull origin master” (no quotes) in the command box and click “Add” +Click “Clone Existing Repository” and paste https://git.egr.msu.edu/CSE102/Substitution-Requests.git into the “Source Location” box. +The “Target Directory” box is the path to the folder you want to store your local copy in. The folder must NOT already exist. +E.g. “C:\Users\USERNAME\Substitution-Requests” will create the Substitution Requests folder and put all the files inside it. +Open the Repo in GitGui (this might happen automatically after cloning). Click “Tools” and “Add” +Put “Pull” in the name box and “git pull origin master” (no quotes) in the command box and click “Add” +### Authenticate your machine with Google Run the code for the first time (or since 7 days have elapsed since this step was last performed on this computer) - It will take you to a login page, you MUST log in as cse102msu@gmail.com (password is python_1107) - This login has mandatory 2-factor authentication (b/c of Google policy on API access) - So if this is the first time or if you've reset your browser cookies it will call the office phone in EGR 1107 to give you the code - Once logged in, just click continue on each increasingly dire warning page until it says “The authentication flow has completed. You may close this window” +It will take you to a login page, you MUST log in as cse102msu@gmail.com (password is python_1107) +This login has mandatory 2-factor authentication (b/c of Google policy on API access) +So if this is the first time or if you've reset your browser cookies it will call the office phone in EGR 1107 to give you the code +Once logged in, just click continue on each increasingly dire warning page until it says “The authentication flow has completed. You may close this window” -***Workflow:*** \ No newline at end of file +## Daily Workflow: + +Ensure that nobody else is currently working on these files or sitting on unpushed changes + This prevents merge conflicts and the need to redo work + +Open Git Gui and click "Tools" and "Pull" (or whatever you named the pull command during configuration explained above) + This updates your local copy to the repo's version + +run "driver.py" in whatever your Python setup is and when done, click "OK" to close and save changes + +In Git Gui type a commit message and then click "Rescan", "Stage Changed", "Commit", and "Push" in that order. +Click "Push" in the dialog box that comes up, then close the confirmation dialog. \ No newline at end of file diff --git a/driver.py b/driver.py index 396a6eb..4d049a5 100644 --- a/driver.py +++ b/driver.py @@ -8,6 +8,8 @@ import scheduledPayrollWindow as PWin #TODO demonstrate workflow with git +#TODO document steps of start-of-semester initialization + #TODO do error checking within while loop (update text color / valid status) # IMPOSSIBLE: pysimplegui does not allow for changing of the layout object after the window is created, # so the number of rows of checkboxes cannot be changed without reopening the window