Skip to content

Commit

Permalink
Add extra docs after pairing on set up with Han
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Jun 14, 2024
1 parent f2a4bb4 commit 8271b54
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,23 @@ This is the main supported approach for setting up a development environment. Yo
After logging into Gitpod or creating an account we recommend also installing the Gitpod browser extension. This extension integrates extra functionality in websites such as Github.

1. Go to our [Github repository](https://github.com/thegreenwebfoundation/admin-portal) and click on the Gitpod button if you have the browser extention installed or manually create and link it in your Gitpod Workspaces. It might take a couple of minutes to prepare the environment.

2. After Gitpod is finished preparing the environment, it will open the workspace. Close any unnecessary terminal windows. To open a new fresh terminal window press ```Ctrl + ` ```.

3. In almost all cases, you will need to have a _virtual environment_ set up so that the necessary commands for Django and other libraries are available to you. You can enter a virtual environment by typing `source .venv/bin/activate` from the the project root (i.e. `/workspace/admin-portal/`). You can tell you're a virtual environment - because your prompt will change from `gitpod /workspace/admin-portal (BRANCH_NAME) $` to `(.venv) gitpod /workspace/admin-portal (BRANCH_NAME) $`. Want more? [Learn more about virtual environments for python](https://realpython.com/python-virtual-environments-a-primer/)

4. There is a makefile set up to allow easy access to common tasks, like running a development server, spinning up tailwind for front end development, creating a superuser and so on. There is tab-completion set up for github - to see the options available, type `make` and hit tab. You should see output like below:

```
(.venv) gitpod /workspace/admin-portal (BRANCH_NAME) $ make
data_analysis_repo dev.tailwind.start docker.release release
dev.createsuperuser dev.test docs test
dev.runserver dev.test.only docs.watch test.only
dev.tailwind.install docker.build notebook.gitpod venv
```

Open the makefile to read the docs about what each command does.

---
## Development on a local machine using virtual environments
In an isolated [virtual environment](https://docs.python.org/3/tutorial/venv.html) we are able to easily manage Python dependencies within the project.
Expand Down

0 comments on commit 8271b54

Please sign in to comment.