uktrade / directory-ui-buyer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

directory-ui-buyer

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

Find A Buyer

Find A Buyer (FAB) - the Department for International Trade (DIT) service for exposing motivated British exporters to international buyers seeking British goods and service.


Development

Installing

$ git clone https://github.com/uktrade/directory-ui-buyer
$ cd directory-ui-buyer
$ [install and activate virtual environment]
$ pip install -r requirements_text.txt

Requirements

Python 3.9.5

redis

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:

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

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.

Session

Signed cookies are used as the session backend to avoid using a database. We therefore must avoid storing non-trivial data in the session, because the browser will be exposed to the data.

Helpful links

Related projects:

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

About

License:MIT License


Languages

Language:Python 52.9%Language:SCSS 22.7%Language:JavaScript 12.8%Language:HTML 10.7%Language:Makefile 0.9%Language:Procfile 0.0%