Getting Started#
Installation#
Option 1: Developer Installation#
This is the installation method for anyone who wants to contribute to the project or has special use cases. We also recommend this method if you prefer to work locally on your machine instead of using Google Colab.
1. Ensure you have the following tools#
Python (at least version 3.9)
-
Then, install the following extension packs (Navigate to the Extensions marketplace using the left sidebar in VS Code or by pressing
Ctrl + Shift + X):Jupyter (Microsoft)
Python (Microsoft)
2. Clone the repository#
# Navigate to a folder of your choice, then run the following in your terminal
git clone https://github.com/Penn-Electric-Racing/PER-Data-Analyzer.git
3. Setup Code Environment#
Run the following commands to setup the development environment:
Note: If you get an error about the python version, you can change the python to python3
in the commands below.
cd PER-Data-Analyzer
python -m venv .venv
# For Windows:
.venv\Scripts\activate
# For Mac/Linux:
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
pre-commit install
nbstripout --install
4. Run a Notebook#
Select the Virtual Environment to use:
Press
Ctrl + Shift + PType “Python: Select Interpreter”
Choose the
.venvPython interpreter located in the project folder (this is the one you created above).
Configure Jupyter Notebooks:
Open whichever notebook you wish to run
Click the “Kernel” icon (Computer Symbol) in the top right corner
Select the
.venvPython interpreter (same one as above)
Note
If you change any files outside of the notebooks (.py files), you need to restart the runtime of the notebook.
Tutorial Notebook#
This notebook is included in the project repository. You should be able to run it after following the installation instructions above.
Option 2: Standard Installation#
Not as easy to modify and iterate on the source code, but useful for quick setup and utilizing the library in external environments like Google Colab.
1. Install via pip#
Note
You can embed the above command in a Google Colab notebook to automatically install when you run the notebook. Append an exclamation mark and leave it in a normal code cell like below: !pip install git+https://github.com/Penn-Electric-Racing/PER-Data-Analyzer.git@main