The Snovault general purpose hybrid object-relational database
- Clone repository and make sure Docker is running.
- Start services and load data inserts:
# From repository.
$ docker compose up
# Note if any dependencies have changed (e.g. switching between branches that
# rely on different versions of snovault) use the build flag as well
# to rebuild the underlying Docker image:
$ docker compose up --build- Browse at
localhost:6543. - Stop services and remove data volume:
$ docker compose down -vRun all unit tests automatically and clean up:
$ docker compose -f docker-compose.test.yml up --exit-code-from pyramid --build
....
$ docker compose -f docker-compose.test.yml down -vRun all indexer tests automatically and clean up:
$ docker-compose -f docker-compose.test-indexer.yml up --exit-code-from indexer-tests --build
....
$ docker compose -f docker-compose.test-indexer.yml down -vOr run tests interactively:
- Start
postgresandlocalstackservices (for use as fixtures).
$ docker compose -f docker-compose.test.yml up postgres localstack- Connect to testing environment.
# In another terminal (starts interactive container).
$ docker compose -f docker-compose.test.yml run --service-ports pyramid /bin/bash- Run tests.
# In interactive container (modify pytest command as needed).
$ pytest- Stop and clean.
docker compose down -vThis repo includes configuration for pre-commit hooks. To use pre-commit, install pre-commit, and activate the hooks:
pip install pre-commit==2.17.0
pre-commit installNow every time you run git commit the automatic checks are run to check the changes you made.