Skip to content

Commit

Permalink
feat: add simulate-config.edn and leiningen profile
Browse files Browse the repository at this point in the history
  • Loading branch information
aatkin committed Mar 1, 2023
1 parent 6c954c7 commit f039ba0
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 2 deletions.
9 changes: 8 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@

:dev [:project/dev :profiles/dev]
:test [:project/dev :project/test :profiles/test]
:simulate [:project/dev :project/simulate :profiles/simulate]

:project/dev {:dependencies [[binaryage/devtools "1.0.6"]
[com.clojure-goes-fast/clj-memory-meter "0.2.1"]
Expand All @@ -133,5 +134,11 @@
:welcome (rems/repl-help)}}
:project/test {:jvm-opts ["-Drems.config=test-config.edn"]
:resource-paths ["env/test/resources"]}
:project/simulate {:jvm-opts ["-Drems.config=simulate-config.edn"
"-Djdk.attach.allowAttachSelf" ; needed by clj-memory-meter on Java 9+
"-XX:-OmitStackTraceInFastThrow"]
:main rems.simulate/start-app
:repl-options {:init-ns rems.simulate}}
:profiles/dev {}
:profiles/test {}})
:profiles/test {}
:profiles/simulate {}})
3 changes: 2 additions & 1 deletion resources/config-defaults.edn
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@
;; Options used only for development
:test-database-url nil
:accessibility-report false ; should the axe accessibility tooling be included?
:simulate nil ; placeholder, use simulate-config.edn instead

:enable-ega false ; should the EGA features be shown in the UI
:enable-doi false ; should the DOI features be shown in the UI
:enable-duo false ; should the DUO features be shown in the UI
Expand All @@ -422,7 +424,6 @@
;; which columns in applications list(s) should be hidden in UI
;; allowed values: [:description :resource :applicant :handlers :state :todo :created :submitted :last-activity :view]
:application-list-hidden-columns []

:show-resources-section true ; should resources section be shown in the application UI
:show-attachment-zip-action true ; should the attachment download be shown in the application actions UI
:show-pdf-action true} ; should PDF button be shown in the application actions UI
89 changes: 89 additions & 0 deletions simulate-config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{:dev true
:port 3002
:nrepl-port 7002
:simulate {:url "http://localhost:3000/" ; url to run simulation against
:max-concurrency 4}
:database-url "postgresql://localhost/rems?user=rems"
:test-database-url "postgresql://localhost/rems_test?user=rems_test"
:search-index-path "target/search-index-dev"
:theme-path "example-theme/theme.edn"
:authentication :fake
:log-authentication-details true
;; Open ID Connect settings
;; These allow login to http://localhost:3002/oidc-callback only
;; :authentication :oidc
:oidc-userid-attributes [{:attribute "sub" :rename "elixirId"}
{:attribute "old_sub"}]
:oidc-metadata-url "https://remsdev.eu.auth0.com/.well-known/openid-configuration"
:oidc-client-id "65TIN1Joo6EvsHSPCN4zyCaxxPh0WJF1"
:oidc-client-secret "e1yr9R_8WW3Xg03wm6wJ4UmNVVjiqdVhwFGvHhttyoRS3h04F4MGh0zRaV7vKm30"
;; some attributes that google oauth returns:
:oidc-extra-attributes [{:attribute "nickname" :name {:en "Nickname" :fi "Lempinimi"}}
{:attribute "picture"}
{:attribute "organizations"}]
:languages [:en :fi :sv]
:public-url "http://localhost:3002/"
:extra-pages [{:id "about"
:translations {:fi {:title "Info"
:filename "about-fi.md"}
:en {:title "About"
:filename "about-en.md"}
:sv {:title "Info"
:filename "about-sv.md"}}}
{:id "footer"
:filename "footer-en.md"
:translations {:fi {:title "Footer"
:filename "footer-fi.md"}
:en {:title "Footer"}
:sv {:title "Footer"
:filename "footer-sv.md"}}
:show-menu false
:show-footer true}
{:id "link"
:translations {:fi {:title "Link"
:filename "link-fi.md"}
:en {:title "Link"
:filename "link-en.md"}
:sv {:title "Link"
:filename "link-sv.md"}}
:show-menu false
:show-footer false}
{:id "mixed"
:heading false
:translations {:fi {:title "Mixed"
:filename "mixed-fi.md"}
:en {:url "https://example.org/en/mixed"}} ; missing sv
:show-menu false
:show-footer false}
{:id "unlocalized"
:url "https://example.org/unlocalized"
:show-menu false
:show-footer false}
{:id "url"
:roles [:logged-in]
:url "https://example.org/"
:translations {:fi {:title "Esimerkki"
:url "https://example.org/fi"}
:en {:title "Example"}
:sv {:title "Exempel"}}
:show-menu true
:show-footer true}]
:extra-pages-path "./test-data/extra-pages"
:application-deadline-days 4
:application-id-column :generated-and-assigned-external-id
:enable-assign-external-id-ui true
:attachment-max-size 10000000 ;; 10MB
:application-expiration nil
:enable-pdf-api true
:enable-permissions-api true
;; example keys from https://tools.ietf.org/html/rfc7517#appendix-A
:ga4gh-visa-private-key "test-data/example-private-key.jwk"
:ga4gh-visa-public-key "test-data/example-public-key.jwk"
:catalogue-is-public false
:accessibility-report true
:enable-ega true
:enable-doi true
:enable-duo true
:enable-catalogue-tree true
:enable-save-compaction true
:enable-autosave true}

0 comments on commit f039ba0

Please sign in to comment.