This repo includes eLife Data Hub APIs. Currently all API endpoints are DocMap related.
- Python, ideally using
pyenv(see.python-version) - GCP credentials in
~/.config/gcloud(e.g. viagcloud auth application-default login)
make dev-venvmake dev-installmake dev-testmake dev-startThe server will be available on port 8000.
You can access the API Docs via /docs
By default, this will require the server to be running locally.
You can also use DATA_HUB_API_REGRESSION_TEST_URL_PREFIX to point to staging or prod.
make dev-regression-testSimilar to running regression tests, this will also require the server to be running locally by default (which you can override using DATA_HUB_API_REGRESSION_TEST_URL_PREFIX).
You can update the regression test data using the following command:
make dev-update-regression-test-dataThis will currently only include the enhanced-preprint data (not Kotahi).
It will update the files in data/docmaps/regression_test/docmap_by_manuscript_id.
Please review the changes carefully.
- Docker
make build testmake build start logsThe server will be available on port 8000.
You can access the API Docs via /docs
make stop