Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

uktrade/return-to-office

Repository files navigation

image image

Return To Office

Introduction

"Return To Office" is a system used to manage people booking desks for safely returning to the office. The live URL is https://return-to-office.trade.gov.uk/.

Requirements

Setup

Local virtualenv

A local virtualenv is needed for a few reasons:

  1. To be able to run the pre-commit checks
  2. If using an IDE, so it has access to the library code and tooling

Note that the application is never actually run on the local machine while developing, only within Docker.

Initial setup

  • cp sample.env .env
    • Only the AUTHBROKER_XXX env variables are required to run the project locally
    • You can copy the AUTHBROKER_XXX values from Vault dit/platform/return-to-office/dev
    • Then replace all values of ASK-SOMEBODY in .env with the real values
  • make build
    • Build all Docker containers
  • npm install
  • make setup
    • Create local virtualenv, set up pre-commit hooks, initialize database

Running the application

Start everything using docker-compose: make up

Go to http://localhost:8000 and use your DIT Google account to log in.

Make sure to rebuild the Docker images if new dependencies are added to the requirements files: make build.

Making yourself superuser

After you login for the first time, do this to give yourself superuser access:

$ make shell
import custom_usermodel
me = custom_usermodel.models.User.objects.first()
me.is_staff = True
me.is_superuser = True
me.save()

Code style

return-to-office uses Black for code formatting and flake8 for code analysis. Useful commands:

  • make black - Check code is formatted correctly
  • make black_format - Reformat all code
  • make flake8 - Check code quality is up to scratch

About

Desk booking functionality.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages