Used to download files. It relies on `imports.paths` being set
appropriately in `etc/config.yaml` to indicate which parts of
the filesystem are accessible to users via Dougal.
NOTE: this endpoint is redundant with db.project.configuration.get()
except for its ability to return a partial tree.
TODO: merge this with db.project.configuration.get().
Instead of storing the project configuration in a YAML file
under `etc/surveys/`, this is now stored in public.projects.meta.
NOTE: as of this commit, the runner scripts (`bin/*.py`) are not
aware of this change and they will keep looking for project info
under `etc/surveys`. This means that projects created directly
in the database will be invisible to Dougal until the runner
scripts are changed accordingly.
The old db.project.list() function is now db.project.get()
and the old db.project.get() is not db.project.summary.get().
If a project does not exist, db.project.summary.get() now
throws a 404 rather than a database error.
Running on bare metal, 127.0.0.1 is a sensible choice of address
to bind on, but that is not the case when running inside a
container, so we add the ability to choose which IP to listen on.
This can be given via the environment variable HTTP_HOST when
starting the server or, if used as a module, as the second
argument of the start(port, host, path) function.
The postinstall script will (rightly) return non-zero if the API
docs cannot be built, but this creates a problem when building a
container (Docker) image. In that case, we expect the postinstall
to fail, as the required files (spec/*) will not have been copied
into the image when `npm install` is run.
By adding an explicit OR clause we allow postinstall to end
gracefully whether or not the API docs have been built.
This event handler checks if there is an UTC date jump between
consecutive shots. If a jump is detected, it sends to new entries
to the event log, for the last shot and first shot of the previous
and current dates, respectively.
Fixes#223.