Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acoustid/acoustid-server
AcoustID's web site and API
https://github.com/acoustid/acoustid-server
acoustid audio-fingerprinting
Last synced: about 1 month ago
JSON representation
AcoustID's web site and API
- Host: GitHub
- URL: https://github.com/acoustid/acoustid-server
- Owner: acoustid
- License: mit
- Created: 2011-04-17T09:07:52.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2024-07-28T19:34:41.000Z (about 1 month ago)
- Last Synced: 2024-07-28T20:29:30.380Z (about 1 month ago)
- Topics: acoustid, audio-fingerprinting
- Language: Python
- Homepage:
- Size: 1.64 MB
- Stars: 64
- Watchers: 5
- Forks: 19
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
AcoustID Server
===============This software is only meant to run on [acoustid.org](https://acoustid.org). Running it on your own server is not supported.
It's possible, but you need to understand the system well enough and even then it's probably not going to be useful to you.Local Development
-----------------You need Python 3.8 or newer to run the code. On Ubuntu, you can install the required
packages using the following command:sudo apt-get install python3 python3-dev python3-venv
Setup Python virtual environment:
python3 -m venv venv
source venv/bin/activateexport PYTHONPATH=`pwd`
pip install -r requirements.txt
pip install -r requirements_dev.txtStart the required services using Docker:
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
export COMPOSE_FILE=docker-compose.yml:docker-compose.localhost.ymldocker-compose up -d redis postgres index
Prepare the configuration file:
cp acoustid.conf.dist acoustid.conf
vim acoustid.confInitialize the local database:
alembic upgrade head
Run the applications:
python manage.py run web
python manage.py run api
python manage.py run cron
python manage.py run workerLocal Testing
-------------You can use the provided `docker-compose.yml` file to quickly set up a test environment:
export COMPOSE_DOCKER_CLI_BUILD=1
export DOCKER_BUILDKIT=1
export COMPOSE_FILE=docker-compose.yml:docker-compose.localhost.yml
export COMPOSE_PROFILES=frontend,backenddocker-compose up -d
Database migrations
-------------------Upgrading the database schema online:
alembic upgrade head
Upgrading the database schema offline:
alembic upgrade :head --sql
Generating a new database schema change:
alembic revision --autogenerate -m "my message"
Unit tests
----------Before you can run the test suite, you need to create a configuration file
called acoustid-test.conf. This should use a separate database from the
one you use for development, but it should have the same structure.You can then run the test suite like this:
pytest -v tests/
The first thing it does is setting up the database. Normally you shouldn't
need to do this more than once, so the next time you can run the test suite
without the database setup code:SKIP_DB_SETUP=1 pytest -v tests/