Skip to content

Commit

Permalink
Update Dev Environment Setup Guide
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Jun 21, 2021
1 parent 26e7938 commit ca58cc1
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions docs/Dev Environment Setup Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This document will walk you through the setup and configuration of a development
These are already installed on the provided development machines.

- [git](https://git-scm.com/downloads)
- [Python](https://www.python.org/downloads/) == 3.6.9
- [Python](https://www.python.org/downloads/) >= 3.6.9

## Configuring Your SSH Keys
We will be using SSH keys to authenticate to both the development machines and GitHub.
Expand Down Expand Up @@ -55,9 +55,11 @@ In your editor of choice, create the file `~/.ssh/config` and add this:
Host campb303-w2vm1
HostName w2vm1.ecn.purdue.edu
User campb303
# Forward webqueue2 API Port
# Forward Flask Debug Port
LocalForward 5000 localhost:5000
# Forward webqueue2 API Docs Port
# Forward MkDocs Port
LocalForward 5000 localhost:6060
# Forward gunicorn Port
LocalForward 8000 localhost:8000
```

Expand All @@ -81,14 +83,16 @@ Development machines are not publicly accessible. You'll need to be connected to
Host campb303-pier
HostName pier.ecn.purdue.edu
User campb303

Host campb303-w2vm1
HostName w2vm1.ecn.purdue.edu
ProxyJump campb303-pier
User campb303
# Forward webqueue2 API Port
# Forward Flask Debug Port
LocalForward 5000 localhost:5000
# Forward webqueue2 API Docs Port
# Forward MkDocs Port
LocalForward 5000 localhost:6060
# Forward gunicorn Port
LocalForward 8000 localhost:8000
```

Expand Down Expand Up @@ -214,7 +218,7 @@ This will create a `webqueue2-api` folder in your user's home directory. Open th
## Configuring VS Code

### Installing Extensions
- [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python) for Python language support, IntelliSense, virtual environments and debugging
- [Pylance](https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance) for Python language support, IntelliSense, virtual environments and debugging
- [Git Graph](https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph) for a more detailed view of git info
- [Markdown Preview GitHub Styling](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-preview-github-styles) for previewing Markdown as it will appear on GitHub
- [Python Docstring Generator](https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring) for generating Google style docstrings according to section 3.8 of [Google's Python style guide](https://google.github.io/styleguide/pyguide.html#s3.8-comments-and-docstrings)
Expand All @@ -226,7 +230,7 @@ The Python extension supports virtual environments but needs to be told where th

Create or modify the file `.vscode/settings.json` and add the following:
```none
"python.pythonPath": "./venv/bin/python3"
"python.defaultInterpreterPath": "./venv/bin/python3"
```

!!! tip
Expand Down Expand Up @@ -284,16 +288,14 @@ webqueue2 API has multiple [conditional dependencies](https://setuptools.readthe

| Condition | Installation Command | Description |
| - | - | - |
| Production | `pip install webqueue2-api` | For use in production. Only installed needed packages. |
| Development | `pip install webqueue2-api[dev]` | For use in development. Installs everything for production and extra packages for development. |
| Documentation | `pip install webqueue2-api[docs]` | For use in creating documentation. Installs everything for production and extra packages for documentation. |
| All | `pip install webqueue2-api[all]` | A shortcut for installing production, development and documentation dependencies. |
| Production | `pip install .` | For use in production. Only installed needed packages. |
| Development | `pip install .[dev]` | For use in development. Installs everything for production and extra packages for development. |
| Documentation | `pip install .[docs]` | For use in creating documentation. Installs everything for production and extra packages for documentation. |
| All | `pip install .[all]` | A shortcut for installing production, development and documentation dependencies. |

### API Commands
| Command | Description |
| - | - |
| `python3 -m webqueue2_api start-api` | Starts the API on [localhost:5000](http://localhost:5000). See [Getting Started](./api/Getting Started.md) for more info. |
| `python3 -m webqueue2_api stop-api` | Stops the API. |
| `python3 -m webqueue2_api restart-api` | Stops and starts the API. |
| `mkdocs serve` | This will start a local server on [localhost:8000](http://localhost:8000) to access the API docs. As you change API documentation files in `./docs/` you'll see your changes in the browser. |
| `gunicorn webqueue2api.api:app` | This will start a local server on [localhost:8000](http://localhost:8000) to access the API. |
| `mkdocs serve` | This will start a local server on [localhost:6060](http://localhost:6060) to access the API docs. As you change API documentation files in `./docs/` you'll see your changes in the browser. |
| `mkdocs build` | This will output a static bundle of the API documentation in `./site/` that can be put on any webserver. |

0 comments on commit ca58cc1

Please sign in to comment.