Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

datagovuk/publishbot

Repository files navigation

Automation Alpha

This repository contains the source code the automation alpha for publishing datasets directly from the original data source. It provides (will provide) a local web interface for interacting with the service, and adapters for obtaining the source data to be uploaded to publish-data. The initial alpha will provide adapters that watch a directory for changes, and one to periodically trigger and executable (which can generate data however it likes).

Installation for development

  1. Ensure you have a recent version of Go installed.
  2. Clone this repository anywhere you like (does not require GOPATH).
git clone [email protected]:datagovuk/publishbot.git
  1. Change into the directory with cd publishbot
  2. Setup the environment with make setup
  3. Compile the project make
  4. Run the outputbin/publishbot

Running tests

make test

Configuration

You should have a config file, called test.yml for now that contains something like:

host: 127.0.0.1
port: 2112
adapters:
  - name: spending
    title: Spend data over £25,000
    type: directory
    arguments:
      folder: ./test-folder

Compiling cross-platform

To compile for windows you should use

GOOS=windows make

and your executable will appear in bin/windows_amd64/publishbot.exe.

Adding dependencies

To add a dependency, instead of go get github.com/org/package you should use bin/gvt fetch github.com/org/package. If gvt is not available, you forgot to run make setup.

Getting stuck

If things appear to stop compiling, or tests running, make clean may help.