Skip to content
Snippets Groups Projects
Commit a6703907 authored by Cam Saül's avatar Cam Saül
Browse files

Update developer's guide :yum:

parent aa4264c6
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
set -eu
set -o pipefail
# Generate Marginalia dox and push them to GitHub pages for this repo
# You should do this from an up-to-date `master` branch without untracked local changes
git checkout master
git pull
lein marg
cp ./docs/uberdoc.html ~/Desktop/index.html.temp
git checkout gh-pages
git pull
rm index.html
mv ~/Desktop/index.html.temp index.html
git add index.html
git commit -m "Updated dox."
git push
git checkout master
> **This guide will teach you:** > **This guide will teach you:**
> How to compile your own copy of Metabase > How to compile your own copy of Metabase
> How to set up a development environment > How to set up a development environment
> How to run the Metabase Server > How to run the Metabase Server
> How to contribute back to the Metabase project > How to contribute back to the Metabase project
...@@ -137,43 +137,13 @@ By default, the tests only run against the `h2` driver. You can specify which dr ...@@ -137,43 +137,13 @@ By default, the tests only run against the `h2` driver. You can specify which dr
ENGINES=h2,postgres,mysql,mongo lein test ENGINES=h2,postgres,mysql,mongo lein test
At the time of this writing, the valid datasets are `h2`, `postgres`, `mysql`, `mongo`, `sqlserver`, and `sqlite`. At the time of this writing, the valid engines are `h2`, `postgres`, `mysql`, `mongo`, `sqlserver`, `sqlite`, `druid`, `bigquery`, and `redshift`. Some of these engines require additional parameters
when testing since they are impossible to run locally (such as Redshift and Bigquery). The tests will fail on launch and let you know what parameters to supply if needed.
Run the linters with Run the linters:
lein eastwood # Clojure linters
lein bikeshed --max-line-length 240
#### Bootstrapping (for REPL)
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:
```clojure
(use 'metabase.db)
(setup-db)
(use 'metabase.bootstrap)
(bootstrap)
```
You'll be walked through the steps to get started.
#### API Client (for REPL) lein eastwood && lein bikeshed
You can make API calls from the REPL using `metabase.http-client`:
```clojure
(use 'metabase.http-client)
(defn cl [& args]
(-> (apply client {:email "crowberto@metabase.com", :password "squawk"} 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",
;; ...}
```
#### Developing with Emacs #### Developing with Emacs
...@@ -204,22 +174,9 @@ Start up an instant cheatsheet for the project + dependencies by running ...@@ -204,22 +174,9 @@ Start up an instant cheatsheet for the project + dependencies by running
lein instant-cheatsheet lein instant-cheatsheet
#### Marginalia
You can generate and view documentation with
lein marg
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`.
## License ## License
Copyright © 2015 Metabase, Inc Copyright © 2016 Metabase, Inc
Distributed under the terms of the GNU Affero General Public License (AGPL) except as otherwise noted. See individual files for details. Distributed under the terms of the GNU Affero General Public License (AGPL) except as otherwise noted. See individual files for details.
...@@ -89,11 +89,9 @@ ...@@ -89,11 +89,9 @@
:exclusions [org.clojure/clojure]] :exclusions [org.clojure/clojure]]
[lein-bikeshed "0.2.0"] ; Linting [lein-bikeshed "0.2.0"] ; Linting
[lein-expectations "0.0.8"] ; run unit tests with 'lein expectations' [lein-expectations "0.0.8"] ; run unit tests with 'lein expectations'
[lein-instant-cheatsheet "2.1.4" ; use awesome instant cheatsheet created by yours truly w/ 'lein instant-cheatsheet' [lein-instant-cheatsheet "2.1.5" ; use awesome instant cheatsheet created by yours truly w/ 'lein instant-cheatsheet'
:exclusions [org.clojure/clojure :exclusions [org.clojure/clojure
org.clojure/tools.namespace]] org.clojure/tools.namespace]]]
[michaelblume/lein-marginalia "0.9.0" ; generate documentation with 'lein marg'
:exclusions [org.clojure/clojure]]]
:env {:mb-run-mode "dev"} :env {:mb-run-mode "dev"}
:jvm-opts ["-Dlogfile.path=target/log" :jvm-opts ["-Dlogfile.path=target/log"
"-Xms1024m" ; give JVM a decent heap size to start with "-Xms1024m" ; give JVM a decent heap size to start with
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment