Skip to content

Commit

Permalink
Update docs, add Python requirements file
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Campbell committed Jul 21, 2020
1 parent 12bc510 commit ff55977
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 80 deletions.
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,26 @@
/node_modules
/.pnp
.pnp.js
/api/venv

# Testing
/coverage

# Productiom
/build

# misc
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
.vscode/

# Node package management
# Node Package Management
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Python Files
/api/venv
__pycache__/
40 changes: 37 additions & 3 deletions Dev Environment Setup Guide.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Dev Environment Setup Guice

## Prerequisites
- [VS Code](https://code.visualstudio.com/download)
- [NodeJS](https://nodejs.org/en/) >= v14.2.0
- npm >= v6.14.4
- npx >= v6.14.4
- Python 3

## Setup
**Note:** webqueue2 uses npm and create-react-app to manage itself. You can learn more about npm [here](https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/) and create-react-app [here](https://create-react-app.dev/docs/getting-started/).


### Step 1: Create a Project Directory
### Step 1: Create and enter a project directory
```bash
mkdir project-dir && cd project-dir
```
Expand All @@ -24,7 +26,7 @@ git clone https://github.rcac.purdue.edu/ECN/webqueue2.git
npm install
```

### Step 4: Start Developing
#### Using npm
There are three built in npm scripts that come from create-react-app:

1. `npm run start`: This will start a local development server on [localhost:3000](http://localhost:3000) and launch your default browser at that address. As you save changes in /public and/or /src you'll see your changes in the browser.
Expand All @@ -33,4 +35,36 @@ There are three built in npm scripts that come from create-react-app:

1. `npm run test`: This will run any tests (using the [Jest](https://jestjs.io/) tester). There are currently no defined tests.

1. `npm run eject`: <span style="background-color: #fff394">**THIS IS NON-REVERSABLE**</span>: This will abstract all of the build environment settings and make them available to you. See the [create-reacte-app docs on ejecting](https://create-react-app.dev/docs/available-scripts#npm-run-eject) for more information.
1. `npm run eject`: <span style="background-color: #fff394">**THIS IS NON-REVERSABLE**</span>: This will abstract all of the build environment settings and make them available to you. See the [create-reacte-app docs on ejecting](https://create-react-app.dev/docs/available-scripts#npm-run-eject) for more information.

### Step 4: Setup Python for API
Go to the API directory
```bash
cd api/
```

Activate the Python virtual environment
```bash
source venv/bin/activate
```

Install Python requiements
```bash
pip install -r requirements.txt
```

### Step 5: Configure VS Code

#### Installing Plugins
- [ES Lint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) for JavaScript linting
- [Babel JavaScript](https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel) for JavaScript and JSX syntac highlighting and error checking
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for working with Python virtual environments and debugging

Optionally:
- [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) for directly editing files on remote machine
- [Markdown Preview GitHub Styling](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles) for previewing Markdown as it will appear on GitHub

#### Configuring Environemnt
- Python will need some workspace and debugger configuration to work. See [Getting Started with Python in VS Code](https://code.visualstudio.com/docs/python/python-tutorial) for more info.
- Remote - SSH will requires hosts to be added to your SSH config file. See [this guide](https://linuxize.com/post/using-the-ssh-config-file/) for more info.
- ES Lint, Babel JavaScript and Markdown Preview GitHub Styling will work without further configuration
18 changes: 18 additions & 0 deletions api/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
aniso8601==8.0.0
astroid==2.4.2
click==7.1.2
Flask==1.1.2
Flask-RESTful==0.3.8
isort==4.3.21
itsdangerous==1.1.0
Jinja2==2.11.2
lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
mccabe==0.6.1
pylint==2.5.3
pytz==2020.1
six==1.15.0
toml==0.10.1
typed-ast==1.4.1
Werkzeug==1.0.1
wrapt==1.12.1
74 changes: 0 additions & 74 deletions docs/Installing Apache2 and mod_wsgi on Ubuntu 18.04.md

This file was deleted.

0 comments on commit ff55977

Please sign in to comment.