Skip to content

whos4n3/directory-sso

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

directory-sso

code-climate-image circle-ci-image codecov-image gitflow-image calver-image


Service for authenticating users for services that serve the Exporting is Great campaign for the Department for International Trade (DIT).

Development

Installing

$ git clone https://github.com/uktrade/directory-sso
$ cd directory-sso
$ [create virtual environment]
$ source .venv/bin/activate
$ make requirements

Requirements

Python 3.6

Postgres

Configuration

Secrets such as API keys and environment specific configurations are placed in conf/env/secrets-do-not-commit - a file that is not added to version control. To create a template secrets file with dummy values run make secrets.

Commands

Command Description
make clean Delete pyc files
make pytest Run all tests
make pytest test_foo.py Run all tests in file called test_foo.py
make pytest -- --last-failed` Run the last tests to fail
make pytest -- -k foo Run the test called foo
make pytest -- Run arbitrary pytest command
make manage Run arbitrary management command
make webserver Run the development web server
make requirements Compile the requirements file
make install_requirements Installed the compile requirements file
make css Compile scss to css
make secrets Create your secret env var file

CSS development

If you're doing front-end development work you will need to be able to compile the SASS to CSS. For this you need:

Requirements

node SASS

$ npm install yarn
$ yarn install --production=false

Compiling

We add compiled CSS files to version control. This will sometimes result in conflicts if multiple developers are working on the same SASS files. However, by adding the compiled CSS to version control we avoid having to install node, npm, node-sass, etc to non-development machines.

You should not edit CSS files directly, instead edit their SCSS counterparts.

Testing

We are using distributed testing by default. You can disable it by removing -n auto --dist=loadfile from the pytest.ini You can also disable it by running pytest with --dist=no --pdb and insert a breaking assertion (e.g. assert 0) where you would normally pdb.set_trace().

Helpful links

Related projects:

https://github.com/uktrade?q=directory https://github.com/uktrade?q=great

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 81.1%
  • HTML 11.2%
  • CSS 5.2%
  • JavaScript 2.2%
  • Makefile 0.3%