Back

Development

Setting up the development environment

Use docker-compose (externalmetadata compose file in /etc/docker/dev/).

Run tools/run_tests_docker.sh --air to initialise the environment, set up test RSEs and avoid alembic upgrade tests (which from experience sometimes cause things to go awry).

Occassionally have to reinstall alembic to get the most recent version:

$ python3 -m pip uninstall -y sqlalchemy && python3 -m pip install sqlalchemy

Server side changes

Server side changes require a httpd restart:

$ httpd -k graceful"

Running the test suite

Run tools/pytest.sh test_did_meta_plugins.py.

Optionally, can add -k to specify a particular class to test e.g.

$ tools/pytest.sh test_did_meta_plugins.py -k "TestDidMetaMongo"

Pull Requests

Rebasing against master

Rebasing against master frequently ensures little divergence when raising PR. General workflow is:

If you need to squash commits or ignore some, may need to rebase interactively:

$ git rebase -i HEAD~<n_commits>

If you need to only squash commits, then provided your git log doesn't contain commits from others in between it is possible to use:

$ git reset --soft HEAD~<n_commits>

This doesn't kill changes in local workspace.


Top