Development Environment Setup¶
Prerequisites¶
Before starting development, you need to install the following tools:
Development Environment¶
| Tool | Version | Description |
|---|---|---|
| Docker | - | Container virtualization platform |
| Docker Compose | - | Management of multiple Docker containers |
| Python | 3.12.3 | Python programming language |
| Pyenv (Optional) | - | Python version management tool |
| Poetry | - | Python dependency management tool |
To start development, clone the repository and install dependencies:
git clone https://github.com/oqtopus-team/oqtopus-cloud.git
Installing Aqua¶
Aqua is a tool that supports project management. For more details, check here.
To install Aqua, run the following command:
make setup-aqua
The message at the end of the command will instruct to add aqua to the PATH, so be sure to follow the instructions.
Verifying the Environment¶
To verify the environment, run the following command:
make doctor
After running the above steps, you will get output similar to the following:
make doctor
Checking the environment...
Aqua version: aqua version 2.29.0 (9ff65378f0c6197e3130a20f6d978b8a3042b463)
Python version: Python 3.12.3
Poetry version: Poetry (version 1.8.3)
Docker version: Docker version 26.1.4, build 5650f9b
Generating Git Hooks File¶
This repository uses the Git hook pre-commit to scan for credentials.
To generate the script, run the following command:
make setup-hooks
The script will be generated in .git/hooks/pre-commit.
Setting Up the Python Environment¶
Pyenv (Recommended)¶
To install Python 3.12.3, run the following command:
pyenv install 3.12.3
Next, set the Python version to 3.12.3:
pyenv local 3.12.3
Poetry¶
To set up poetry as part of the environment setup, run the following command:
make setup-poetry
This command is required to use the Python version installed with Pyenv, to set up the Python environment, and to install dependencies. This will create a .venv in the root directory.
Starting the Documentation Server¶
To start the documentation server, run the following command:
make run
Then, check the documentation at http://localhost:8000.