mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-03-10 21:32:25 -04:00
474d7dfda834ebf2f0966f176fb6da556808d8a1
Some users have reported a problem with the received text message report: > I have tested the reply service but in the excel report the mobile > number is showing as 4.47900E+23. How can I change the format so that > it is show the mobile number that has replied? This is happening because Excel is interpreting a phone number in the format `447900900123` as a number in [scientific notation](https://en.wikipedia.org/wiki/Scientific_notation), in other words 4.479 × 10<sup>23</sup>. `447900900123` is the format that our provider is giving us the number in – there’s no guarantee it will always be in this format. We can prevent this behaviour by putting spaces in the numbers. Excel and Google Sheets won’t try to convert a string with spaces into a number. I think we used to do this for the sent text messages report but probably stopped because we decided it was better to keep the phone number in the same format as it had been supplied to us for reconcilliation purposes.
…
…
notifications-admin
GOV.UK Notify admin application - https://www.notifications.service.gov.uk/
- Register and manage users
- Create and manage services
- Send batch emails and SMS by uploading a CSV
- Show history of notifications
Setting up
Python version
At the moment we run Python 3.9 in production.
NPM packages
brew install node
NPM is Node's package management tool. n is a tool for managing different versions of Node. The following installs n and uses the long term support (LTS) version of Node.
npm install -g n
n lts
environment.sh
In the root directory of the application, run:
echo "
export NOTIFY_ENVIRONMENT='development'
export FLASK_APP=application.py
export FLASK_ENV=development
export WERKZEUG_DEBUG_PIN=off
"> environment.sh
AWS credentials
To run parts of the app, such as uploading letters, you will need appropriate AWS credentials. See the Wiki for more details.
To run the application
# install dependencies, etc.
make bootstrap
# run the web app
make run-flask
Then visit localhost:6012.
Any Python code changes you make should be picked up automatically in development. If you're developing JavaScript code, run npm run watch to achieve the same.
To test the application
# install dependencies, etc.
make bootstrap
# run all the tests
make test
# continuously run js tests
npm run test-watch
To run a specific JavaScript test, you'll need to copy the full command from package.json.
Further docs
Description
Languages
Python
69.3%
HTML
16.6%
JavaScript
11.1%
SCSS
0.9%
Nunjucks
0.7%
Other
1.4%