Skip to content

Implementing and testing new services

Frederic Font edited this page Dec 5, 2017 · 2 revisions

Raw steps to implement a new service:

  • Read draft guidelines on implementing a new service
  • Install Docker
  • Checkout Audio Commons Mediator repository (this repository)
  • Write your Python code and save it in /services/3rd_party/FILENAME.py
  • Add an entry for your service in /services/services_conf.cfg with the necessary keys and parameters to have the service running
  • Add an entry for your service in /services/test_services.cfg with the necessary parameters for testing your service (query terms, etc.)
  • Run the test command like: docker-compose run --rm web python manage.py test_service SERVICE_NAME

NOTE: to test components that require an Audio Commons Mediator user to have their account linked with a 3rd party service you'll need to run the Audio Commons Mediator locally (docker-compose up and open browser at https://localhost) and you'll need to create an account (check the REPO_FOLDER/mail folder to complete the registration process) and link it to your 3rd party service via the web interface. To do that you'll need to have implemented the authentication mixin (ACServiceAuthMixin) of your service integration.