Find A Buyer (FAB) - the Department for International Trade (DIT) service for exposing motivated British exporters to international buyers seeking British goods and service.
$ git clone https://github.com/uktrade/directory-ui-buyer
$ cd directory-ui-buyer
$ [install and activate virtual environment]
$ pip install -r requirements_text.txt
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
.
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 |
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.
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.
https://github.com/uktrade?q=directory https://github.com/uktrade?q=great