-
Install vscode extensions
I believe you don't have to install any of the recommended extensions, but you will most likely want to have the python extension. Everything else is just nice to have.
-
Install pyenv
For windows users
-
In your Linux terminal, execute
curl https://pyenv.run | bash -
Add the following to your .bashrc
export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)"
-
Restart your shell
For mac users
-
brew install pyenv -
Add the following to your .zshrc( or .bashrc)
export PATH="$HOME/.pyenv/bin:$PATH" eval "$(pyenv init --path)" eval "$(pyenv virtualenv-init -)"
-
Restart your shell or execute
source .zshrc
-
Install poetry
For windows users
-
Install and enable Linux subsystem
-
In your Linux terminal, execute
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
Add the following to your .bashrc
export PATH="$HOME/.poetry/bin:$PATH"
-
Restart your shell
For mac users
brew install poetry- Done
-
-
Install pre-commit and configure it using
.pre-commit-condig.yamlAll together now
cd <path_to_zeta_software_repository> pyenv install 3.8.12 python -m venv .venv poetry install && poetry shell pre-commit install
You have to choose what python version management tool and dependency management tool use, but pyenv and poetry are recommended. This instruction is going to assume you are using pyenv and poetry.
Once you have pyenv, install python version 3.8.12 bypyenv install 3.8.12.
If pyenv fails to install, please ensure your meet the system requirements.
Then create a python virtual environment bypython -m venv .venv. Make sure your virtual environment is using python 3.8.12 and your file structure should look like the following.. ├── .gitignore ├── .pre-commit-condig.yaml ├── .python-version ├── poetry.lock ├── pyproject.toml ├── readme.md ├── .venv <-------------------- You just created this. │ └── pyvenv.cfg <----------- Make sure this says "version = 3.8.12" somewhere. ├── .vscode ├── tests │ ├── __init__.py │ ├── __pycache__ │ └── test_zeta.py └── zeta ├── __init__.py └── __pycache__After that we will use poetry to install python packages, using the command
poetry install && poetry shell. Now if there are no errors, you should be in the python virtual environment that was created earlier.
Finally, install configure pre-commit bypre-commit install.
Roy Ataya, Aidan Cook, Hamza Kamal, Kirill Melnikov, Paige Rattenberry, and Aki Zhou