Setup (per-repository / do once per clone)

These steps should be performed once for each repository clone. They set up the project environment to match CI and install repository-level hooks.

Clone the repository

Here we clone the repository from GitLab. If you have already cloned the repository, skip this step.

Terminal (pwsh / bash):

git clone git@gitlab.uclv.net:energy-research-centre/frameworks/open-ev-fleet.git
cd open-ev-fleet

VS Code (GUI):

  • Menu > File > Close Folder
  • Explorer > Clone Repository
    • Clone from GitLab > ... open-ev-fleet

PyCharm (GUI):

  • Menu > File > Project from Version Control > GitLab > ... open-ev-fleet

Sync UV environment and select interpreter

Run a full uv sync to reproduce the project environment exactly as CI does. This will create or update the .venv/ and install pinned packages and tools.

Terminal (pwsh / bash):

# Sync the uv environment, creating .venv/ and installing all packages
uv sync --all-groups --all-extras

After uv sync select the created .venv Python interpreter in your IDE:

VS Code (GUI):

  • Terminal: uv sync --all-groups --all-extras
  • CTRL+SHIFT+P: Python: Select Interpreter > .venv/...

PyCharm (GUI):

  • Menu > File > Settings > Python > Interpreter > Add Interpreter > Add Local Interpreter
    • Environment: Generate new
    • Type: uv

Install pre-commit hooks for this repository

Terminal (pwsh / bash):

# Install pre-commit hooks for this repository, adding them to .git/hooks/
pre-commit install

How to make the Python venv accessible in jupyterhub

  1. go to the root git directory
  2. source .venv/bin/activate
  3. uv pip install jupyter
  4. ipython kernel install --name "openevfleet" --user
  5. deactivate