cd teed
source venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements.dev.txt
Install and launch the MinIO server.
https://min.io/docs/minio/linux/index.html
Start the minio server in Linux/WSL:
mkdir ~/minio
minio server ~/minio --console-address :9090When using WSL2 it might be needed to run, in Powershell:
wsl --shutdownAlternatively it is possible to use Docker:
Pull docker image.
docker pull minio/minioCopy config_minio.env file to /etc/default/minio
mkdir /etc/default/minio
cp config_minio.env /etc/default/minio/config_minio.envThe config_minio.env sets the env variables:
- MINIO_VOLUMES "/mnt/data"
Solely for development in the local machine we aren't setting either
MINIO_ROOT_USER or MINIO_ROOT_PASSWORD.
We are using the default minioadmin.
Create the /mnt/data directory which will hold the MinIO data.
mkdir /mnt/dataLaunch the MinIO docker container. Notice how the environment variable file is passed.
docker run -dt
-p 9000:9000 -p 9090:9090
-v PATH:/mnt/data
-v /etc/default/minio/config_minio.env:/etc/config.env
-e "MINIO_CONFIG_ENV_FILE=/etc/config.env"
--name "minio_local"
minio/minio server --console-address ":9090"Access the MinIO console and create a access and secret key:
http://localhost:9090/access-keys
Set them as environment variables.
An example:
export ACCESS_KEY=qWNkiOtSVnkBOfVtGGtN
export SECRET_KEY=RNtXUOrafhGntJUYMwnhljY8a43DiWQZwcm4lTVjIn the application root directory run the tests:
pip install -r requirements.test.txt
python -m pytest testsCalculate the code coverage:
coverage run --source=teed -m pytest tests
coverage report -m > coverage.reportThe teed package doesn't work in Windows.
However it is possible to develop teed in Windows.
To do so install WSL and configure Visual Studio Code to connect to the local WSL Ubuntu instance.
See this articly for details:
Create & activate the virtual enviroment:
python3 -m venv .venv
source .venv/bin/activate