<commit_before>(ns pasmo-gigi.geo.ui.core
  (:require [cljs-http.client :as http]
            [cljs.core.async :refer [<!]]
            [reagent.core :as reagent]
            [re-frame.core :as re-frame]
            [pasmo-gigi.geo.ui.navigation.nav-handlers]
            [pasmo-gigi.geo.ui.navigation.nav-subscriptions]
            [pasmo-gigi.geo.ui.navigation.nav-views :as nav-views]
            [pasmo-gigi.geo.ui.map.map-views :as map-views]
            [pasmo-gigi.geo.ui.routes :as routes]
            [pasmo-gigi.geo.ui.db :as db])
  (:require-macros [cljs.core.async.macros :refer [go]]))


(defn setup-mapbox [mapbox-api]

  (.log js/console "access token: " (.-mapbox mapbox-api))

  (let [mapbox (.-mapbox mapbox-api)]
    (set! (-> mapbox .-accessToken) "<KEY>")
    (swap! db/settings assoc :mapbox-api mapbox-api))

  (.log js/console "set: " (.-accessToken (.-mapbox (:mapbox-api @db/settings)))))

(defn mount-root
  []
  (reagent/render [nav-views/nav-view]
                  (.getElementById js/document "nav")))

(defn ^:export init
  [mapbox-api]
  (.log js/console "Starting with ..." mapbox-api)
  (setup-mapbox mapbox-api)
  (routes/app-routes)
  (re-frame/dispatch-sync [:initialize-db])
  (mount-root)<commit_msg>Debugging mapbox<commit_after>(ns pasmo-gigi.geo.ui.core
  (:require [cljs-http.client :as http]
            [cljs.core.async :refer [<!]]
            [reagent.core :as reagent]
            [re-frame.core :as re-frame]
            [pasmo-gigi.geo.ui.navigation.nav-handlers]
            [pasmo-gigi.geo.ui.navigation.nav-subscriptions]
            [pasmo-gigi.geo.ui.navigation.nav-views :as nav-views]
            [pasmo-gigi.geo.ui.map.map-views :as map-views]
            [pasmo-gigi.geo.ui.routes :as routes]
            [pasmo-gigi.geo.ui.db :as db])
  (:require-macros [cljs.core.async.macros :refer [go]]))


(defn setup-mapbox [mapbox-api]

  (.log js/console "mapbox api: " mapbox-api)

  (let [mapbox (.-mapbox mapbox-api)]
    (set! (.-accessToken mapbox) "<KEY>")
    (swap! db/settings assoc :mapbox-api mapbox-api))

  (.log js/console "set: " (.-accessToken (.-mapbox (:mapbox-api @db/settings)))))

(defn mount-root
  []
  (reagent/render [nav-views/nav-view]
                  (.getElementById js/document "nav")))

(defn ^:export init
  [mapbox-api]
  (.log js/console "Starting with ..." mapbox-api)
  (setup-mapbox mapbox-api)
  (routes/app-routes)
  (re-frame/dispatch-sync [:initialize-db])
  (mount-root)
{'fraction_non_alphanumeric': 0.1767328739359546, 'fraction_numerical': 0.0, 'mean_word_length': 2.5206847360912983, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2467604', 'n_tokens_mistral': 941, 'n_tokens_neox': 933, 'n_words': 165}