Coder Social home page Coder Social logo

ministryofjustice / money-to-prisoners-cashbook Goto Github PK

View Code? Open in Web Editor NEW
6.0 34.0 2.0 6.37 MB

Digital Cashbook – Business hub staff facing site for Prisoner Money suite of apps

License: MIT License

JavaScript 2.73% Python 61.88% HTML 33.23% Dockerfile 0.48% SCSS 1.69%
hmpps mtp

money-to-prisoners-cashbook's Introduction

Digital Cashbook – Prisoner Money

Business hub staff facing site for Prisoner Money suite of apps.

Requirements

  • Unix-like platform with Python 3.10 and NodeJS 20 (e.g. via nvm or fnm)

Running locally

It’s recommended that you use a python virtual environment to isolate each application.

The simplest way to do this is using:

python3 -m venv venv    # creates a virtual environment for dependencies; only needed the first time
. venv/bin/activate     # activates the virtual environment; needed every time you use this app

Some build tasks expect the active virtual environment to be at /venv/, but should generally work regardless of its location.

You can copy mtp_cashbook/settings/local.py.sample to local.py to overlay local settings that won’t be committed, but it’s not required for a standard setup.

In order to run the application locally, it is necessary to have the API running. Please refer to the money-to-prisoners-api repository.

Once the API has started locally, run

./run.py serve
# or
./run.py start

This will build everything and run the local server at http://localhost:8001/. The former also starts browser-sync at http://localhost:3001/.

You should be able to login using following credentials: test-prison-1 or test-prison-2

All build/development actions can be listed with ./run.py --verbosity 2 help.

Alternative: Docker

In order to run a server that’s exactly similar to the production machines, you need to have Docker installed. Run

./run.py local_docker

and you should be able to connect to the local server.

Developing

CircleCI

With the ./run.py command, you can run a browser-sync server, and get the assets to automatically recompile when changes are made, run ./run.py serve instead of ./run.py start. The server is then available at the URL indicated.

./run.py test

Runs all the application tests.

You can connect a local version of money-to-prisoners-common for development by pre-pending the following task to the run script.

python_dependencies --common-path [path]

Translating

Update translation files with ./run.py make_messages – you need to do this every time any translatable text is updated.

Requires transifex cli tool for synchronisation:

Pull updates from Transifex with ./run.py translations --pull. You’ll need to update translation files afterwards and manually check that the merges occurred correctly.

Push latest English to Transifex with ./run.py translations --push. NB: you should pull updates before pushing to merge correctly.

Deploying

This is handled by money-to-prisoners-deploy.

Additional Bespoke Packages

There are several dependencies of the money-to-prisoners-cashbook python library which are maintained by this team, so they may require code-changes when the dependencies (e.g. Django) of the money-to-prisoners-cashbook python library are incremented.

money-to-prisoners-cashbook's People

Contributors

chrishanes avatar dependabot[bot] avatar ibrechin avatar katy600 avatar lmoney-moj avatar madgoose avatar marcofucci avatar matharden avatar maxf avatar neilmendum avatar r4vi avatar staberinde avatar stevemarshall avatar teneightfive avatar ushkarev avatar vickymg avatar xoen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

money-to-prisoners-cashbook's Issues

Default branch is not main

Hi there
The default branch for this repository is not set to main
See repository settings/settings/branches to rename the default branch to main and ensure the Branch protection rules is set to main as well
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

A branch protection setting is not enabled: administrators require review

Hi there
The default branch protection setting called administrators require review is not enabled for this repository
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Require a pull request before merging option
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

A branch protection setting is not enabled: codeowners require reviews

Hi there
The default branch protection setting called codeowners require review is not enabled for this repository
This option affects a pull request, i.e a PR will need to be reviewed and approved by a CODEOWNER before it can be merged.
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Require review from Code Owners option
Create a .github/CODEOWNERS file
Add a or multiple entries of @ministryofjustice/team_name to the CODEOWNERS file
The team_name shall be a team from within the MoJ teams: https://github.com/orgs/ministryofjustice/teams
See GH Codeowners documentation: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

A branch protection setting is not enabled: Include administrators

Hi there
The default branch protection setting called Include administrators is not enabled for this repository
See repository settings/Branches/Branch protection rules
Either add a new Branch protection rule or edit the existing branch protection rule and select the Include administrators option
This will enable the branch protection rules to admin uses as well
See the repository standards: https://github.com/ministryofjustice/github-repository-standards
See the report: https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/github_repositories
Please contact Operations Engineering on Slack #ask-operations-engineering, if you need any assistance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.