WormBase / pseudoace

Modelling the WormBase ACeDB database in datomic.
4 stars 3 forks source link

Feature/wbdb name api #60

Closed mgrbyte closed 7 years ago

mgrbyte commented 7 years ago

This adds an api to psueodace.utils that standardises the way we obtain the name of the main datomic database.

This is what I was intending to use to eliminate the need for a separate WS_VERSION env var.

Overview

(wbdb-name) -> looks in the environment first, then in a (io/resource ".config") if one exists, calls one of the implementation(s) below. (wbdb-name uri)-> extract name from a java.net.URI, assumed to be YAML file of the .config format used by elasticbeanstalk (wbdb-name string) -> extracts the name from the URI string.

Added complete test cases , should serve complete examples.

mgrbyte commented 7 years ago

Sorry for the noise here. Relevant commit for review (actual implementation) is 9d8cf1e:

sibyl229 commented 7 years ago

@mgrbyte yeah, this is useful. I'm happy with it being merged.