    :aws-access-key             {:path [:aws :access-key]}
    :webserver-username         {:path [:webserver-username]}
    :webserver-pass             {:path [:webserver-pass]}
-   :webserver-url              {:path [:webserver-url]}
    :export-server-auth-username {:path [:darwin :server-auth-username]}
    :export-server-auth-pass {:path [:darwin :server-auth-pass]}
    :math-matrix-implementation {:path [:math :matrix-implementation] :parse ->keyword}


(defn get-config
  ([overrides]
   (deep-merge defaults
               ;(read-string (slurp "config.edn"))
               (get-environ-config rules environ/env)
               overrides))
  ([] (get-config {})))

(defrecord Config [overrides]

   ;; Mini batch sizes (see polismath.math.conversation)


(defn assoc-inferred-values
  [{:as config-map :keys [math-env]}]
  (let [math-env-string (name math-env)
        webserver-url (str "https://"
                           (when-not (= math-env :prod) (str math-env-string "."))
                           "pol.is/api/v3")]
    (assoc config-map
      :math-env-string (str math-env)
      :webserver-url webserver-url)))



(defn get-environ-config [rules env]
  ;; reduce over rules and assoc-in mappings into empty map
  (reduce
    (fn [config [name {:keys [parse path] :or {parse identity}}]]
      (if-let [env-var-val (get env name)]
