Run poetry install
from the root of the project.
This should get you all you need.
Code that doesn't pass the tests in [code_style_validation
] target of the Makefile
won't be accepted.
first install the dependencies using poetry
# inside the root direcroy
poetry install
It is needed to create a .env
file contains the necessary information for the app
to run. The field that needed to be defined can be found in the file: example.env
After that, run the app using
poetry run uvicorn main:app --host 0.0.0.0 --port 80 --reload
https://python-poetry.org/docs/
configure a launch.json for attching python process and run the program using
python -m debugpy --listen 5678 auto_post_classifier/main.py --api -d data/AntiIsraeli.csv
solve jupyter warining:
export JUPYTER_PLATFORM_DIRS=1
run only my-py test:
pytest --mypy -m mypy
- get a
data-classified.csv
file - use
auto_post_classifier/testing_utils.py
to generate a sample.json file. - run the test using
pytest
from the root directory
docker build -t auto-post-classifier .
running the docker using the docker compose file:
docker compose up
you need to add the .env file to your main working directory.