...
If you haven’t already, download and install Python 3.8: https://www.python.org/
If you already have Python 3.7 or below installed, you must install Python 3.8 (you do not need to uninstall the other version(s)). This is because of a package dependency which requires Python 3.8 or greater.
Python 3.8.10 or later is recommended, otherwise you will have
pip
issues.
If you have Python 3.9 or above installed, you’re probably fine. Probably. The bootcamp was Autonomy code is designed and tested on Python 3.8 so use a different version at your own risk.
Open the console in the repository root.
Example:
C:\Users\Username\autonomy-bootcamp-2023
Create a virtual environment called
venv
by running:[python] -m venv venv/
, where[python]
is Python 3.8 (e.g.python
,python38
).You can check which version of Python it is by running
[python] --version
If you move the repository to a different path after creating a virtual environment, you will have to delete the
venv
directory and repeat this step. Additionally, if your virtual environment breaks for any reason, you can always delete thevenv
directory and repeat this step for a fresh environment.If you want to call the virtual environment by a different name, replace
venv/
with the name you want. Virtual environments are identified by their path, so different projects with the samevenv
virtual environment name is fine.Example:
C:\Users\Username\autonomy-bootcamp-2023\venv\
andC:\Users\Username\computer-vision-python\venv\
are different.
Activate the virtual environment:
Windows command prompt:
venv\Scripts\activate.bat
Windows Powershell:
.\venv\Scripts\Activate.ps1
If you get an error with:
running scripts is disabled on this system
Run:
Set-ExecutionPolicy Unrestricted
This allows you to run any Powershell scripts at will. For more detail: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.3
Linux and MacOS:
source venv/bin/activate
You should now see
(venv)
in the prompt line.Confirm the virtual environment uses Python 3.8:
python --version
Literally use
python
, none of the fancy stuff above.Example output:
Python 3.8.10
Open
requirements.txt
MacOS: Remove
+cu117
from bothtorch
andtorchvision
Windows and Linux:
If you have a CUDA capable GPU but don’t want to use it for some reason, change
+cu117
to+cpu
for bothtorch
andtorchvision
If you don’t have a CUDA capable GPU, don’t change anything.
Download and install required packages:
pip install -r requirements.txt
This will install in your virtual environment under
venv
. The rest of your system is unaffected.
Done!
...
If you haven’t already, activate the virtual environment:
Windows command prompt:
venv\Scripts\activate.bat
Windows Powershell:
.\venv\Scripts\Activate.ps1
Linux and MacOS:
source venv/bin/activate
You should now see
(venv)
in the prompt line.Code away! Run the tests! Please try to follow our style guide: Python Style Guide
Ask questions if you need help!
Make a commit:
Check which files have changed:
git status
Run:
git add [files you changed]
, where[files you changed]
are the files you want to add to the commit.Use
git add .
if you want to add all of them (the dot means wildcard in Git).
Run:
git commit -m "Your commit message"
When you’re ready to push your latest commits to GitHub:
git push
No harm in doing this after every commit.
When you’re done, make sure to either close the terminal or run:
Windows command prompt:
venv\Scripts\deactivate.bat
Everything else:
deactivate
This is important to avoid going to a different project and then accidentally polluting your current project’s virtual environment.
...
Navigate to WARG’s copy of the repository: https://github.com/UWARG/autonomy-bootcamp-2023
At the top, click Pull requests.
To the right, click the green New pull request button.
Under Compare changes, click the “compare across forks” link.
The 3rd from the left: Click the head repository dropdown and select your repository (you can search for your username).
The 4th from the left: Click the compare dropdown and select the branch you want to submit.
Do not open more than 1 pull request! The branch you select should contain (or eventually contain) all tasks which will be reviewed.
Once you have an open PR, you can keep updating the same branch as you get feedback. You do not need to open another PR.
Click on the green Create pull request button.
Once you have an open PR and are ready for review, go to your Discord bootcamp thread and send this message:
@Autonomy Lead My PR for the bootcamp is ready: [link to your PR on GitHub]
.The
@Autonomy Lead
ping is bright pink.
The Autonomy Leads and/or bootcamp maintainers will review your PR (a message will be sent on Discord, and the comments will be on GitHub).
Read the feedback and go back to development. If any of the feedback is unclear or confusing, don’t hesitate to ask for clarification (make sure to send a message on Discord as well for visibility (e.g.
I asked some questions as replies on GitHub
).Please do not resolve any of the comments that the reviewers may leave! It causes confusion for the reviewers.
If you are ready for another review, repeat step 8 (you do not need to open a new PR).
Once your review is fully complete and you’re done with the bootcamp please follow the steps in New Member Onboarding to onboard to the team.
...