Skip to content

hawks-atlanta/proxy-python

Repository files navigation

proxy-python

Coverage Release Tagging Test codecov

Description

Proxy service intended to forward traffic between clients and gateway-java so they don't need to suffer SOAP

Development

You will follow this guide as you are in the root of repository.

Python environment

First of all you need to setup your python environment.

python -m venv venv

Once created, activate it:

  • Windows
# If you prefer CMD
./venv/Scripts/activate.bat

# If you prefer PowerShell
./venv/Scripts/Activate/ps1
  • Linux
source ./venv/bin/activate

Finally install the dependencies

pip install -r requirements.txt

Services

Make sure you setup the needed services.

docker compose up -d

Testing

coverage run -m pytest

Formatting and linting

If you installed the recommended extensions for VSCode, you may have the formatting and linting configured out of the box.

Additionally, you may need to configure black to format python files with the following steps:

  • Open the command palette (Ctrl + Shift + P)
  • Search Format Document With...
  • Search Configure Default Formatter...
  • Select "Black Formatter"

You can also run the following commands to format and lint the code from the console:

# Check format
black --check .

# Format all python files
black .

# Check lint
ruff check .

# Fix lint (if possible)
ruff check --fix .

Coverage

circle square