Working with Source¶
Run Locally w/ Docker¶
*-docker-compose.yamlfile corresponding to your usage to
docker-compose.yaml. This file is untracked so feel free to modify as necessary. Idea is to commit anything generic but system/setup dependent should go on ‘your’ version i.e. local UID/GID, etc.
Check the first comment which will provide the best instruction on how to start the service; yes, it is a bit long. Note: Any of the keyword arguments prepended to the
docker-composecommand can be safely moved into a dedicated
.envand read automatically if they are not evaluated i.e.
$(...). Below is a brief description of the non-evaluated environment variables:
PY_VER=3.8 # (pharus) Python version: 3.6|3.7|3.8 IMAGE=djtest # (pharus) Image type: djbase|djtest|djlab|djlabhub DISTRO=alpine # (pharus) Distribution: alpine|debian
Run Tests w/ Docker¶
To run the test watcher, perform the following:
In one terminal, start the
devDocker environment with the above instructions to start LabBook and Pharus with hot-reload support.
In another terminal, you can run the watcher using:
docker exec -it datajoint-labbook_datajoint-labbook_1 npm test -- --coverage # OR to just run it once: docker exec -ite CI=true datajoint-labbook_datajoint-labbook_1 npm test -- --coverage
Building the Docs¶
Docs are based on sphinx and typedocs where the latter is used for autodoc-ing the typescript code base.
To build docs simply run:
docker-compose -f docker-compose-docs.yaml up. The build docs should be located under
Working with git submodule dependency¶
pharus is treated as a backend dependency managed by git’s builtin
submodules. It allows us to nest entire git repos with separate history and easy access. Below are some helpful commands to be used after cloning the source repo.
First time git submodule initialization¶
git submodule init` then `git submodule update
Update submodules to latest (Update to latest master version)¶
git submodule foreach git pull
Create a new submodule¶
git submodule add -b master firstname.lastname@example.org:datajoint/pharus.git