cmp

Logo

A study of an interpreter of measurement program definitions written in clojure.

View the Project on GitHub wactbprot/cmp

documentation

installation

Leiningen on Ubuntu

sudo apt install leiningen

Leiningen on openSUSE (LEAP 15)

zypper ar https://download.opensuse.org/repositories/devel:/languages:/clojure/openSUSE_Leap_15.1/devel:languages:clojure.repo
zypper ref devel_languages_clojure
zypper in  leiningen

cmp from git repo

git clone https://github.com/wactbprot/cmp.git
cd cmp
lein deps
lein repl 

Configuration

Softlink or copy your special configuration (here ce3-conf.edn) to config.edn.

ln -s /<path-to-devproxy>/devproxy/resources/ce3-conf.edn /<path-to-devproxy>/devproxy/resources/config.edn

cp /<path-to-devproxy>/devproxy/resources/ce3-conf.edn /<path-to-devproxy>/devproxy/resources/config.edn

Todo: describe configuration items

Usage

User interaction with cmp is REPL only. The core namespace is the entry point. Use (dir cmp.core) or take a look at the api to get an overview.

Since 0.20.0 the pp-table concept is dropped. The data browser portal seems to be the way to go.

ToDo: write a new example session on how to proceed.

portal

(def portal (p/open))
(add-tap #'p/submit)
(tap> (c-data))

links

Clojure

Redis

All of the mp state is kept in a redis database.

config

Since version 0.3.0 cmp relies on Keyspace Notifications. Therefore it is necassary to replace in /etc/redis/redis.conf:

notify-keyspace-events ""

by

notify-keyspace-events AK

and restart the service:

# restart
$ sudo systemctl restart redis.service

# check status
$ sudo systemctl status redis.service

redis gui

$ npm install -g redis-commander
## --> http://localhost:8081/

devel

All devel commands have to be executed in the root directory of cmp.

$ cd path/to/cmp

build example session

$ lein marg resources/example-session.clj

documentation

(re)generate documentation

$ lein codox

tests

$ lein test

Run tests from REPL

Example utils-tests:

(ns cmp.utils-test) 
(use 'clojure.test)
(run-tests)

code coverage

$ lein cloverage