Skip to content

Latest commit

 

History

History
182 lines (117 loc) · 2.76 KB

INSTALL.md

File metadata and controls

182 lines (117 loc) · 2.76 KB

Production :

Install the API :

Requirements :

Python 3.9

Upper versions are not tested, but we think the package can work.
If an issue has occurred, open a ticket to: https://etulab.univ-amu.fr/d19006523/vigenere-api/-/issues

Update pip :

pip install --upgrade pip

Create a virtual environment :

Install the virtual environment package :

Install the virtual environment, the one you want.
We recommend installing the 'venv' package.
In the next steps, we use the package 'venv'.

pip install venv

Create the environment :

python3 -m venv .venv

Load the environment :

Linux / MacOS :
source .venv/bin/activate
Windows :
CMD :
.venv\Scripts\activate.bat
PowerShell :
.venv\Scripts\Activate.ps1

Install dependencies :

pip install vigenere-api --index-url https://etulab.univ-amu.fr/api/v4/projects/8004/packages/pypi/simple

Run the API :

python3 -m vigenere_api

Development :

Requirements :

Python 3.9

Upper versions are not tested, but we think the package can work.
If an issue has occurred, open a ticket to: https://etulab.univ-amu.fr/d19006523/vigenere-api/-/issues

Install requirements :

Last version of pip :

pip install --upgrade pip

Poetry :

To execute tests or improve the package, you need Poetry.
Go to: https://python-poetry.org/docs/#installing-with-the-official-installer

You can install poetry with the official installer or pipx.

Create a virtual environment :

Install the virtual environment package :

Install the virtual environment, the one you want.
We recommend installing the 'venv' package.
In the next steps, we use the package 'venv'.

pip install venv

Create the environment :

python3 -m venv .venv

Load the environment :

Linux / MacOS :

source .venv/bin/activate

Windows :

CMD :
.venv\Scripts\activate.bat
PowerShell :
.venv\Scripts\Activate.ps1

Install dependencies :

Main dependencies like the production :

poetry install --only main

Dependencies for development :

poetry install

(Optional) Update dependencies :

poetry update

Run the API :

python -m vigenere_api

Execute tests :

PYTHONPATH=./src pytest

Execute coverage :

PYTHONPATH=./src pytest --cov=src --cov=tests --cov=src --cov=tests --junit-xml=coverage.xml --cov-report=html:coverage_html

Execute integration tests :

PYTHONPATH=./src pytest --with-integration

Build the API package :

poetry build