diff --git a/docs/Browser Poll Data 8:5:20.png b/docs/Browser Poll Data 8:5:20.png deleted file mode 100644 index 5e07f57..0000000 Binary files a/docs/Browser Poll Data 8:5:20.png and /dev/null differ diff --git a/docs/Dev Environment Setup Guide/Add SSH Key to GitHub.gif b/docs/Dev Environment Setup Guide/Add SSH Key to GitHub.gif deleted file mode 100644 index b812c5b..0000000 Binary files a/docs/Dev Environment Setup Guide/Add SSH Key to GitHub.gif and /dev/null differ diff --git a/docs/Dev Environment Setup Guide/Connect to Remote SSH Host.gif b/docs/Dev Environment Setup Guide/Connect to Remote SSH Host.gif deleted file mode 100644 index 3d644dd..0000000 Binary files a/docs/Dev Environment Setup Guide/Connect to Remote SSH Host.gif and /dev/null differ diff --git a/docs/Dev Environment Setup Guide/Open Repo.gif b/docs/Dev Environment Setup Guide/Open Repo.gif deleted file mode 100644 index 08cd8e3..0000000 Binary files a/docs/Dev Environment Setup Guide/Open Repo.gif and /dev/null differ diff --git a/docs/Dev Environment Setup Guide/Remote Folder Open.png b/docs/Dev Environment Setup Guide/Remote Folder Open.png deleted file mode 100644 index 6a53201..0000000 Binary files a/docs/Dev Environment Setup Guide/Remote Folder Open.png and /dev/null differ diff --git a/docs/Dev Environment Setup Guide/Remote SSH Icon.png b/docs/Dev Environment Setup Guide/Remote SSH Icon.png deleted file mode 100644 index 32f210c..0000000 Binary files a/docs/Dev Environment Setup Guide/Remote SSH Icon.png and /dev/null differ diff --git a/docs/Dev Environment Setup Guide/VS Code Select Platform.png b/docs/Dev Environment Setup Guide/VS Code Select Platform.png deleted file mode 100644 index f69c3ed..0000000 Binary files a/docs/Dev Environment Setup Guide/VS Code Select Platform.png and /dev/null differ diff --git a/docs/Example GIF/Example GIF.gif b/docs/Example GIF/Example GIF.gif deleted file mode 100644 index d1fea10..0000000 Binary files a/docs/Example GIF/Example GIF.gif and /dev/null differ diff --git a/docs/GitHub Reference Resources/Conversational UI 2020-10-09 at 12.19.39 PM.png b/docs/GitHub Reference Resources/Conversational UI 2020-10-09 at 12.19.39 PM.png deleted file mode 100644 index 2983594..0000000 Binary files a/docs/GitHub Reference Resources/Conversational UI 2020-10-09 at 12.19.39 PM.png and /dev/null differ diff --git a/docs/GitHub Reference Resources/ItemTable w Banded Row.png b/docs/GitHub Reference Resources/ItemTable w Banded Row.png deleted file mode 100644 index 1ea36e3..0000000 Binary files a/docs/GitHub Reference Resources/ItemTable w Banded Row.png and /dev/null differ diff --git a/docs/GitHub Reference Resources/ItemTable w_o Banded Row.png b/docs/GitHub Reference Resources/ItemTable w_o Banded Row.png deleted file mode 100644 index 395a2f2..0000000 Binary files a/docs/GitHub Reference Resources/ItemTable w_o Banded Row.png and /dev/null differ diff --git a/docs/GitHub Reference Resources/No Active State for Sorting Dark.gif b/docs/GitHub Reference Resources/No Active State for Sorting Dark.gif deleted file mode 100644 index aad0fc1..0000000 Binary files a/docs/GitHub Reference Resources/No Active State for Sorting Dark.gif and /dev/null differ diff --git a/docs/GitHub Reference Resources/No Active State for Sorting.gif b/docs/GitHub Reference Resources/No Active State for Sorting.gif deleted file mode 100644 index 8e150ec..0000000 Binary files a/docs/GitHub Reference Resources/No Active State for Sorting.gif and /dev/null differ diff --git a/docs/GitHub Reference Resources/react-table UI 2020-10-09 at 11.49.02 AM.png b/docs/GitHub Reference Resources/react-table UI 2020-10-09 at 11.49.02 AM.png deleted file mode 100644 index 7e3971f..0000000 Binary files a/docs/GitHub Reference Resources/react-table UI 2020-10-09 at 11.49.02 AM.png and /dev/null differ diff --git a/docs/Hide Scroll Bars/No Scrollbars.png b/docs/Hide Scroll Bars/No Scrollbars.png deleted file mode 100644 index f1977ec..0000000 Binary files a/docs/Hide Scroll Bars/No Scrollbars.png and /dev/null differ diff --git a/docs/Hide Scroll Bars/Scrollbars.png b/docs/Hide Scroll Bars/Scrollbars.png deleted file mode 100644 index 3acbe12..0000000 Binary files a/docs/Hide Scroll Bars/Scrollbars.png and /dev/null differ diff --git a/docs/ItemTable Responsive Examples/Cell Component override.jpg b/docs/ItemTable Responsive Examples/Cell Component override.jpg deleted file mode 100644 index bd8afcb..0000000 Binary files a/docs/ItemTable Responsive Examples/Cell Component override.jpg and /dev/null differ diff --git a/docs/ItemTable Responsive Examples/Default ItemTable behavior.jpg b/docs/ItemTable Responsive Examples/Default ItemTable behavior.jpg deleted file mode 100644 index 842bece..0000000 Binary files a/docs/ItemTable Responsive Examples/Default ItemTable behavior.jpg and /dev/null differ diff --git a/docs/ItemTable Responsive Examples/Row Component override example.jpg b/docs/ItemTable Responsive Examples/Row Component override example.jpg deleted file mode 100644 index 221dc18..0000000 Binary files a/docs/ItemTable Responsive Examples/Row Component override example.jpg and /dev/null differ diff --git a/docs/ItemTable Responsive Examples/mui-datatables example.gif b/docs/ItemTable Responsive Examples/mui-datatables example.gif deleted file mode 100644 index db42e7d..0000000 Binary files a/docs/ItemTable Responsive Examples/mui-datatables example.gif and /dev/null differ diff --git a/docs/ItemView Annimation Examples/Desktop-Animated.gif b/docs/ItemView Annimation Examples/Desktop-Animated.gif deleted file mode 100644 index 11c0e82..0000000 Binary files a/docs/ItemView Annimation Examples/Desktop-Animated.gif and /dev/null differ diff --git a/docs/ItemView Annimation Examples/Desktop-Non-Animated.gif b/docs/ItemView Annimation Examples/Desktop-Non-Animated.gif deleted file mode 100644 index 146cb93..0000000 Binary files a/docs/ItemView Annimation Examples/Desktop-Non-Animated.gif and /dev/null differ diff --git a/docs/ItemView Annimation Examples/Mobile-Animated.gif b/docs/ItemView Annimation Examples/Mobile-Animated.gif deleted file mode 100644 index a3fbe5b..0000000 Binary files a/docs/ItemView Annimation Examples/Mobile-Animated.gif and /dev/null differ diff --git a/docs/ItemView Annimation Examples/Mobile-Non-Animated.gif b/docs/ItemView Annimation Examples/Mobile-Non-Animated.gif deleted file mode 100644 index 7f422fd..0000000 Binary files a/docs/ItemView Annimation Examples/Mobile-Non-Animated.gif and /dev/null differ diff --git a/docs/ItemView Assignment Control/Contact Entry in Gmail.gif b/docs/ItemView Assignment Control/Contact Entry in Gmail.gif deleted file mode 100644 index 20e0863..0000000 Binary files a/docs/ItemView Assignment Control/Contact Entry in Gmail.gif and /dev/null differ diff --git a/docs/ItemView Assignment Control/Current webqueue Assignment.png b/docs/ItemView Assignment Control/Current webqueue Assignment.png deleted file mode 100644 index d42965b..0000000 Binary files a/docs/ItemView Assignment Control/Current webqueue Assignment.png and /dev/null differ diff --git a/docs/ItemViewAppBar displays unexpectedly/ItemTableAppBar Expected Display.png b/docs/ItemViewAppBar displays unexpectedly/ItemTableAppBar Expected Display.png deleted file mode 100644 index bf265d7..0000000 Binary files a/docs/ItemViewAppBar displays unexpectedly/ItemTableAppBar Expected Display.png and /dev/null differ diff --git a/docs/ItemViewAppBar displays unexpectedly/ItemViewAppBar Unexpected Display.png b/docs/ItemViewAppBar displays unexpectedly/ItemViewAppBar Unexpected Display.png deleted file mode 100644 index 84b1964..0000000 Binary files a/docs/ItemViewAppBar displays unexpectedly/ItemViewAppBar Unexpected Display.png and /dev/null differ diff --git a/docs/Overview + Position Behavior/Overflow+Sticky Positioning Intended Behavior.gif b/docs/Overview + Position Behavior/Overflow+Sticky Positioning Intended Behavior.gif deleted file mode 100644 index a820810..0000000 Binary files a/docs/Overview + Position Behavior/Overflow+Sticky Positioning Intended Behavior.gif and /dev/null differ diff --git a/docs/Overview + Position Behavior/Overflow+Sticky Positioning Safari Behavior.gif b/docs/Overview + Position Behavior/Overflow+Sticky Positioning Safari Behavior.gif deleted file mode 100644 index bf82f76..0000000 Binary files a/docs/Overview + Position Behavior/Overflow+Sticky Positioning Safari Behavior.gif and /dev/null differ diff --git a/docs/Styleguidist TOC Behavior/with indicator.gif b/docs/Styleguidist TOC Behavior/with indicator.gif deleted file mode 100644 index b7d6898..0000000 Binary files a/docs/Styleguidist TOC Behavior/with indicator.gif and /dev/null differ diff --git a/docs/Styleguidist TOC Behavior/without Indicator.gif b/docs/Styleguidist TOC Behavior/without Indicator.gif deleted file mode 100644 index afb405e..0000000 Binary files a/docs/Styleguidist TOC Behavior/without Indicator.gif and /dev/null differ diff --git a/docs/Summary of State 07.26.20.md b/docs/Summary of State 07.26.20.md deleted file mode 100644 index d57feb6..0000000 --- a/docs/Summary of State 07.26.20.md +++ /dev/null @@ -1,137 +0,0 @@ -# Summary of State -**Date:** Sunday, July 7, 2020 - -## Overview -webqueue2 consists of three parts: - -- The Backend (`api/ECNQueue.py`) -- The API (`api/api.py`) -- The Frontend (Source: `src/ + public/`; Build: `build/`) - -## The Backend -The backend is responsible for interacting with the queue-cli. Because webqueue2 is read-only at this point, that means the backend if responsible for reading and parsing files. - -### What Has Been Done - -### What Needs Doing -- Implement section parsing for the front-end to better display information to ECN staff. - -_Example:_ -``` -Testtest - -*** Status updated by: campb303 at: 6/23/2020 13:26:55 *** -Dont Delete -*** Edited by: campb303 at: 06/23/20 13:27:56 *** - -This be an edit my boy - - - -*** Replied by: campb303 at: 06/23/20 13:28:18 *** - -This be a reply my son - -Justin -ECN - -=== Additional information supplied by user === - -Subject: Re: Beepboop -From: Justin Campbell -Date: Tue, 23 Jun 2020 13:30:45 -0400 -X-ECN-Queue-Original-Path: /home/pier/e/queue/Attachments/inbox/2020-06-23/212-original.txt -X-ECN-Queue-Original-URL: https://engineering.purdue.edu/webqueue/Attachments/inbox/2020-06-23/212-original.txt - -Huzzah! - -=============================================== -``` -would become a list of dictionaries with meta data about each section: -```python -[ - { - "type": "initialMessage", - "content": [ - "Testtest\n" - ] - }, - { - "type": "status", - "updatedBy": "campb303", - "updatedTime": "6/23/2020 01:26 PM", - "content": [ - "Don't Delete" - ] - }, - { - "type": "edit", - "updatedBy": "campb303", - "updatedTime": "06/23/20 01:27 PM", - "content": [ - "This be an edit my boy.\n" - ] - }, - { - "type": "replyToUser", - "sentBy": "campb303", - "sentTime": "06/23/20 01:28 PM", - "content": [ - "This be a reply my son\n", - "\n", - "Justin\n", - "ECN\n" - } -] -``` -- Finish documentation at the Module, Class, and Method levels. -- Implement attachment parsing. - - This might be possible using the `EmailMessage.walk()` function from the `email` module in Python's standard library. -- Implement a metadata only loading function to populate only data needed for the frontend's ItemTable for faster loader when the entire item isn't needed. -- Implement custom JSON parsing for Item and Queue objects for more perfoemant API calls. - - Currently the [`jsonpickle`](https://jsonpickle.github.io/) module is being used. However, this introduces unnecessary bloat to JSON packages by including things that don't need to be sent to the frontend. -- Implement tracking for refiles. - - Refile headers do not track the from/to of when an item is refiled. -- Deal with UnicodeDecodeError in coral104 and others. See ECNQueue configuration section. - - [Similar StackOverflow case](https://stackoverflow.com/questions/35028683/python3-unicodedecodeerror-with-readlines-method) - - [Official docs on error param in builtin open() fucntion](https://docs.python.org/3.7/library/functions.html#open) -- Deal with blank subject on some items. See me 67, uds 14, and ece 47 -- Deal with non-uniform timezones. See getDateReceived.py and the [time standard library](https://docs.python.org/3.7/library/time.html#time.struct_time) - -## The API - -### What Has Been Done - -### What Needs Doing -- Implement a mechanism for controlling the start/stop/restart of gunicorn. Some options include: - 1. **Using the Apache control script** that is interacted with via the captive shell for a web server user on Templeton. This would allow for a seamless start/stop/restart workflow because it is tied into the same actions for Apache. However, this would also require that Apache be restarted for any API change which could disrupt active connections unnecessarily. - 2. **Using user level cron jobs** @reboot to start the service. This doesn't not allow for easy stopping and restarting. - 3. **Using a system wide init system hook** (Templeton using SysV aka init.d.) This could allow for easy start/stop/restart functions and the user could be allowed to interact with webqueue-api init script but no other init script. This option provides the most flexibility. -- Integrate with Purdue Directory service. - -## The Frontend - -### What Has Been Done - -### What Needs Doing -- Implement [`react-table`](https://github.com/tannerlinsley/react-table) based ItemTable for responsive item views. -- Implement queue selection displays -- Implement webpage level authentication accessible to password managers -- Implement queue highlighting -- Implement jump to ticket -- Implement [`react-router`](https://reactrouter.com/) for URL based navigation -- Implement stored user preferences - -## The Project Overall - -### What Has Been Done - -### What Needs Doing -- Implement testing -- Implement automated testing/deployment mechanisms -- Implement update mechanisms -- Automate documentation creating using [Sphinx](https://www.sphinx-doc.org/en/master/) -- For the ItemTable from column: -```javascript -let ItemTable.from = userAlias ? userAlias : userName -``` \ No newline at end of file diff --git a/docs/Testing Best Practices.md b/docs/Testing Best Practices.md deleted file mode 100644 index 851615b..0000000 --- a/docs/Testing Best Practices.md +++ /dev/null @@ -1,86 +0,0 @@ -# ["Testing Best Practices (Tutorial)" by: Randy Syring](https://www.youtube.com/watch?v=HH20YPp_5WI&feature=youtu.be) -Video resources are available [on GitHub](https://github.com/rsyring/pyweb-flog). - -# Table of Contents - - -- [Introduction](#introduction) -- [Steps to Make Testing an Asset](#steps-to-make-testing-an-asset) -- [Just Get Started](#just-get-started) -- [Explicit Is Better Than Implicit](#explicit-is-better-than-implicit) -- [Make Tests As Close To the "real world" As Possible](#make-tests-as-close-to-the-real-world-as-possible) -- [Refecator Code for Easier Testing](#refecator-code-for-easier-testing) -- [CLI's Can Test Library Code](#clis-can-test-library-code) -- [Test The Unhappy Paths](#test-the-unhappy-paths) -- [External Dependencies Should Be Mocked](#external-dependencies-should-be-mocked) -- [Tests Are Responsible For Setting State](#tests-are-responsible-for-setting-state) -- [Closing Comments](#closing-comments) - - - -## Introduction -- Testing can be an asset, liability or expense. -- Tests are assets when they are easy to run, interpret and respond to. This allows for problems to be dealt with in development before code reaches an end user. -- Tests are liabilities when written poorly, producing false negatives and/or test the wrong things. -- Tests are expenses when they take away from the developer working on actual code. -- Time is money so manual, slow, finnicky tests become money sinks whereas automated, quick, robust tests save money. - -## Steps to Make Testing an Asset -Well formed tests should be: - -**Easy to setup:** -- Make dependencies/requirements clear. This can be done with a setup guide, package manager manifest or script. We do this with pip's `requirements.txt` and npm's `package.json`. -- Make environment requirements clear. This can be done with a setup guide, docker file or script. We do this by developing against the known standard of ECN supported Ubuntu hosts. - -**Easy to run:** -- Make tests accessible. We do this by simplifying test running through automated discovery with pytest and jest. - -**Accesible:** -- Where possible, allow unit and integration testing to be run on the developer's machine. We do not current have these types of test but it is what we need to create. The video details using a set of libraries to allow for browser simulation, API mocking and more. - -**Stateless:** -- The success of tests should not depend on the order they're run. -- Each test should clean up after itself so as to not affect the output of the next test. -- The environment (dev, prod; Win, macOS, Ubuntu) should not affect whether a test passes or fails. Logically, this is limited to supported environments. webqueue2 will cannot run on Windows because gunicorn cannot run on Windows, however, webqueue2 will never run on a Windows host so this is ok. -- Use generators instead of static test data to avoid tests failing due to outdated example data. -- Test should be modular, allowing for as broad or specific of testing as needed. (This debugger break points) - -## Just Get Started -The biggest hurdle to testing is starting. Avoid decision fatigue by testing the low haning fruit. - -## Explicit Is Better Than Implicit -When testing, do not hide errors and prevent hiding where it is the default. - -_Ex:_ Handle exceptions in production code, run tests in debug mode. - -## Make Tests As Close To the "real world" As Possible -Automated testing of web applications often runs at the command line, not a browser. Therefore, browser simulators (discussed in the video) become useful as the simulate working with an application as if you were in the browser -- running JavaScript, using User-Agent strings etc. - -## Refecator Code for Easier Testing -Smaller functions are easier to test than large chunks of code so sepearte logical steps into helper functions. - -- In Python this can be dunder functions like `__getMostRecentHeaderByType()`. -- In React this can be adding common functionality to the `/src/utilities.js` file and importing them for use as needed. - -## CLI's Can Test Library Code -Sometimes it is easier to test library code (which should be context agnostic) by running it via the command line instead of in a particular script. It should behave the same given the right data. - -_Ex:_ Bank transaction software cannot have tests run during production because it would actually move money. Instead, the library could be used to mock tests in development without affecting real systems. - -## Test The Unhappy Paths -"Happy paths" are the paths we expect with well formed input. "Unhappy paths" are everything else. For the program to function the happy paths must work but for the program to be robust the unhappy paths needs to be dealt with as well. - -## External Dependencies Should Be Mocked -If your test depends on something you cannot control, the test environment should not rely on that dependency. Instead, it should mock the behavior of the working external dependency. - -_Ex:_ [fake-smtp](http://nilhcem.com/FakeSMTP/) is a program that mocks an SMTP server. Using this in testing allows for a known working SMTP server that will tell us of the problem is in our code or a non-working production SMTP server. - -## Tests Are Responsible For Setting State -The test, not the environment, should check, set and cleanup state to insure the test is testing what it was written to test. Ex: A previous test was supposed to create an object for a subsequent test to use but fails. Now the subsequent test fails despite because its input is bad, not its logic. - -## Closing Comments -- Thinking in tests is a mindset that takes time to learn. -- Test Driven Development is writing tests for the expected behavior _then_ writing the code to conform to that behavior, modelling to code to fit the test. -- Treat tests like code: write it well and keep it updated, improve tests when possible -- Use test coverage tools to see where tests are applied (codecov.io) -- The best time to start is now. \ No newline at end of file