You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sam Heaton edited this page Aug 20, 2019
·
1 revision
Building the application locally
Prerequisites for building ScreenDoor locally are:
docker
docker-compose
Build using docker-compose build and run with docker-compose up inside the project directory.
The only valid inputs for this program are Government of Canada job postings and applications in PDF
format. The application will also not run without a valid settings.ini file containing secrets.
Debugging
Debugging locally on non-asynchronous functions can be done using pdb. Simply add breakpoint() at
any point in the code, run docker attach screendoor in a terminal in the project root, and execute
the code.
Linting code through SonarQube
The master-dev branch has SonarQube integrated into its build pipeline. To run code review and analysis:
Switch to branch master-dev.
Run docker-compose build.
Download the latest Linux build of sonar-scanner from here.
Extract the contents of the sonar-scanner zip into a sonar-scanner folder in the project root.
Start ScreenDoor with docker-compose up.
Open SonarQube at localhost:9000. Log in with username and password "admin".
Start a new project, with name and key screendoor.
Take the generated token and edit docker-compose.yml to replace the value after -Dsonar.login=
Configure SonarQube by clicking on the project, then "administration," and "Analysis Scope."
Use the following Source File Inclusions:
screendoor/**
screendoor_app/**
static/js/es6/**
static/css/style.css
For test coverage, go to General Settings->Python and set Path to coverage report(s) to **coverage*.xml
Re-run docker-compose up.
After sonar-scanner is complete, visit localhost:9000 to verify success.