Resource Entitlement Management System is a tool for managing access rights to resources, such as research datasets.
Branch: master
Clone or download
Macroz Merge pull request #949 from CSCfi/fix-nil-last-modified
Fix :last-modified being nil and failing schema validation
Latest commit 4c5bb63 Feb 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci remove support for transferring REMS1 data Jan 21, 2019
docs-server fix: livereload problems on openshift platform May 28, 2018
docs
env validate data on `(reload)` Feb 8, 2019
example-theme Merge branch 'master' into theme-updates Feb 19, 2019
resources
src
test-data
test Merge pull request #937 from CSCfi/theme-updates Feb 19, 2019
.gitignore Remove git-describe.txt from .gitignore Nov 23, 2018
CONTRIBUTING.md Add instructions for contributors Apr 25, 2018
LICENSE Add license to project Apr 25, 2018
README.md README.md: change status badge to circleci.com Feb 13, 2019
db.env
dev-config.edn Merge branch 'master' into theme-updates Feb 19, 2019
dev_db.sh Bump Docker Postgres to 9.6 Jan 31, 2019
mkdocs.yml remove support for transferring REMS1 data Jan 21, 2019
project.clj
test-config.edn avoid port conflicts when running tests Sep 25, 2018
todo.md Handle application phases checking on the server side Oct 31, 2018
web.xml add database configuration for tomcat Feb 28, 2017

README.md

CircleCI

Resource Entitlement Management System

Getting started

Development database

Run the official postgres docker image and initialize the database by the way of a lein alias

lein dev-db

You can also start an empty development database by running the script

./dev_db.sh

Which does roughly the following:

  1. run a postgres container named rems_test
  2. initialize the database with resources/sql/init.sql
  3. create the schema with lein run migrate

When done you can stop (and automatically remove) the database.

docker stop rems_test

Populating the database

  • You can get some test data with lein run test-data

Running the application

REMS is a Clojure+Clojurescript Single Page App.

To start the (clojure) backend:

lein run

To start the (clojurescript) frontend, run in another terminal:

lein figwheel

Point your browser to http://localhost:3000

Running tests

To run unit tests:

lein eftest

To run tests that need a database:

lein eftest :all

To run all tests and output coverage (the alias also builds cljs):

lein run-cloverage

To run browser tests (requires chromedriver in $PATH, the alias also builds cljs):

lein browsertests

If browser tests fail, screenshots and DOM are written in browsertest-errors.

Start REPL and run tests in there:

lein with-profile test repl
(user/run-all-tests)

Clojurescript tests

First make sure you have the npm depenencies with

lein deps

and then just run

lein doo

to run tests in Headless Chrome via Karma.

Running all the tests

To conveniently run all the tests you can run the lein alias

lein alltests

Component Guide

You can access the component guide at /#/guide. It contains all the components in various configurations.

Contributing

REMS is an open source project. In case you would like to contribute to its development, please refer to the CONTRIBUTING.md document.

More documentation

Documentation files can be found under the docs folder.

Documentation can also be read from the browser by launching user docs server with the command: mkdocs serve or simply by visiting https://rems2docs.rahtiapp.fi.

Alternatively docker images can be used for running the documentation server:

docker build . -f docs-server/Dockerfile -t rems-mkdocs-server
docker run -it -p 8000:8000 --name rems-user-guide rems-mkdocs-server --rm

Note live reload is disabled for the docker version of mkdocs.