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).
- Ensure you have a recent version of Go installed.
- Clone this repository anywhere you like (does not require GOPATH).
git clone [email protected]:datagovuk/publishbot.git
- Change into the directory with
cd publishbot
- Setup the environment with
make setup
- Compile the project
make
- Run the output
bin/publishbot
make test
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
To compile for windows you should use
GOOS=windows make
and your executable will appear in bin/windows_amd64/publishbot.exe
.
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.
If things appear to stop compiling, or tests running, make clean
may help.