Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 2.47 KB

README.md

File metadata and controls

78 lines (51 loc) · 2.47 KB

Data Stewardship Wizard Engine Backend

User Guide Engine Backend CI License CII Best Practices

Backend application for Data Stewardship Wizard

Applications

  • Wizard (<application> = wizard-server)
  • Registry (<application> = registry-server)

Contribute

For contributing guidelines, please read CONTRIBUTING and relevant section in our guide.

Requirements

  • Stack (recommended 2.15.3 or higher)
  • Postgres & libpq (recommended 15.5)
  • Fourmolu (recommended 0.8.2.0, optional)
  • HLint (recommended 3.4.1, optional)
  • Docker (recommended 19.03.0-ce) - for build of production image
  • document-worker (corresponding version)
  • mailer (corresponding version)

Build & Run

For running application it's need to run Postgres database and set up connection in configuration file.

To set up feedback with GitHub, generate an API Key on GitHub and assign it to the environment variable named FEEDBACK_TOKEN.

Run these comands from the root of the project

$ stack build <application>
$ stack exec <application>

Run tests

Run these comands from the root of the project

$ stack test <application>

Format code

Create a bash script which will do the work for you. Run the script from the root of the project

$ fourmolu -i (find <application>/src -name '*.hs')
$ fourmolu -i (find <application>/test -name '*.hs')

Code coverage

Run these comands from the root of the project

$ stack build <application>
$ stack test <application> --jobs=1 --fast --coverage --ghc-options "-fforce-recomp"

Build an app version and built date

Run these comands from the scripts folder

$ ./<application>/build-info.sh

License

This project is licensed under the Apache License v2.0 - see the LICENSE file for more details.