Skip to content
Snippets Groups Projects
README.md 2.98 KiB
Newer Older
[![Circle CI](https://circleci.com/gh/metabase/metabase-init.svg?style=svg&circle-token=3ccf0aa841028af027f2ac9e8df17ce603e90ef9)](https://circleci.com/gh/metabase/metabase-init)

Allen Gilliland's avatar
Allen Gilliland committed

1. Oracle JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/index.html)
2. Node.js for npm (http://nodejs.org/)
3. Leiningen (http://leiningen.org/)
Allen Gilliland's avatar
Allen Gilliland committed


Allen Gilliland's avatar
Allen Gilliland committed

Install clojure + npm/bower requirements with
Allen Gilliland's avatar
Allen Gilliland committed

Cam Saul's avatar
Cam Saul committed

Compile application css file with
Cam Saul's avatar
Cam Saul committed

    ./node_modules/gulp/bin/gulp.js build
Allen Gilliland's avatar
Allen Gilliland committed


Then run the HTTP server with

    lein ring server
## Unit Tests / Linting

Check that the project can compile successfully with

    lein check

Run the linter with

    lein eastwood

Run unit tests with

    lein expectations

Cam Saül's avatar
Cam Saül committed
#### Instant Cheatsheet

Start up an instant cheatsheet for the project + dependencies by running

    lein instant-cheatsheet

#### Marginalia

Available at http://metabase.github.io/metabase-init/.

You can generate and view documentation with
	open ./docs/uberdoc.html

You can update the GitHub pages documentation using

	make dox

You should be on the `master` branch without any uncommited local changes before doing so. Also, make sure you've fetched the branch `gh-pages` and can push it back to `origin`.
Cam Saul's avatar
Cam Saul committed
## Migration Summary

    lein migration-summary

Will give you a list of all tables + fields in the Metabase DB.
Cam Saul's avatar
Cam Saul committed
## Bootstrapping (for Development)
Allen Gilliland's avatar
Allen Gilliland committed

Cam Saul's avatar
Cam Saul committed
To quickly get your dev environment set up, use the `bootstrap` function to create a new User and Organization.
Open a REPL in Emacs or with `lein repl` and enter the following:
Allen Gilliland's avatar
Allen Gilliland committed

Cam Saul's avatar
Cam Saul committed
    (use 'metabase.bootstrap)
Cam Saül's avatar
Cam Saül committed
    (bootstrap)
Allen Gilliland's avatar
Allen Gilliland committed

Cam Saul's avatar
Cam Saul committed
You'll be walked through the steps to get started.
Allen Gilliland's avatar
Allen Gilliland committed

Cam Saül's avatar
Cam Saül committed
## API Client (for Development)

You can make API calls from the REPL using `metabase.http-client`:

    (use 'metabase.http-client)
Cam Saul's avatar
Cam Saul committed
    (defn cl [& args]
Cam Saül's avatar
Cam Saül committed
      (-> (apply client {:email "crowberto@metabase.com", :password "blackjet"} args)
          clojure.pprint/pprint))
    (cl :get "user/current")
    ;; -> {:email "crowbetro@metabase.com",
    ;;     :first_name "Crowbero",
    ;;     :last_login #inst "2015-03-13T22:55:05.390000000-00:00",
    ;;     ...}
Allen Gilliland's avatar
Allen Gilliland committed

## Checking for Out-of-Date Dependencies

Cam Saul's avatar
Cam Saul committed
    lein ancient                   # list all out-of-date dependencies
    lein ancient latest lein-ring  # list latest version of artifact lein-ring
Cam Saul's avatar
Cam Saul committed
Will give you a list of out-of-date dependencies. This requires leiningen version 2.4.0 or higher so run `lein upgrade` first if needed.
This doesn't seem to check plugins, so you'll have to do that manually using `lein ancient latest`.

Once's this repo is made public, this Clojars badge will work and show the status as well:

[![Dependencies Status](http://jarkeeper.com/metabase/metabase-init/status.png)](http://jarkeeper.com/metabase/metabase-init)


Allen Gilliland's avatar
Allen Gilliland committed
## License

Copyright © 2015 FIXME

Sameer Al-Sakran's avatar
Sameer Al-Sakran committed
Distributed under the terms of the GNU Affero General Public License (AGPL) except as otherwise noted.  See individual files for details.