When an item is archived for AvO it needs to be updated with the metadata from the original fragment. This service queries MediaHaven for the original metdata and updates the new item after a small transformation.
- Git
- Docker (optional)
- Python 3.7+
- Access to the meemoo PyPi
- Clone this repository.
cd
into the new directory .- Run
make init
to initialize the virtual environment and install dependencies. - Edit the
.env
file if needed. - Run
make run
to start the application. http://127.0.0.1:8080/health/live
should returnOK
.
- Clone this repository.
cd
into the new directory.- Make a new virtual environment using
python3 -m venv env
. - Activate the new environment using
source env/bin/activate
. - Install dependencies using
pip install -r requirements.txt
. - Set environment variables (all variables in
.env.example
have to be set). - Start the application with
python main.py
. http://127.0.0.1:8080/health/live
should returnOK
.
- Clone this repository.
cd
into the new directory.- Build the Docker container using
docker build -t avo-events-archived .
. - Make a
.env
-file, you can rename.env.example
and fill in correct values. - Run the container using
docker run --env-file .env -p 8080:8080 avo-events-archived:latest
. http://127.0.0.1:8080/health/live
should returnOK
.
Assuming you have already cloned the repository and are in the project folder.
- Run
make init-dev
to install dev dependencies. - Run
make test
to run the tests.
- Activate your virtual environment using
source env/bin/activate
. - Install development dependencies using
pip install -r requirements-dev.txt
. - Set environment variables (all variables in
.env.example
have to be set, but these can be dummy variables). - Run the tests using
pytest
- Build the Docker container using
docker build -t avo-events-archived .
. - Run the tests in the container using
docker container run --name aea_test --env-file .env --entrypoint python avo-events-archived:latest "-m" "pytest"
. - Clean up after yourself and remove the container using
docker rm aea_test
.