Coder Social home page Coder Social logo

alphagov / notifications-govuk-alerts Goto Github PK

View Code? Open in Web Editor NEW
6.0 13.0 3.0 5.16 MB

Home Page: https://www.gov.uk/alerts

License: MIT License

HTML 47.66% Python 38.42% JavaScript 6.32% SCSS 2.92% Makefile 1.93% Jinja 0.72% Shell 2.04%
emergencyalerts

notifications-govuk-alerts's Introduction

emergency-alerts-govuk

Website for emergency alerts, hosted under /alerts on GOV.UK.

* Note that, even when connected to the VPN, you may see a 403 Forbidden page due to an issue with the way GOV.UK Fastly is configured with Fastly shielding.

Setting up to run the gov.uk/alerts locally

Local Development Environment Setup

Ensure that you have first followed all of the local development environment setup steps, that can be found here, before attempting to run the gov.uk/alerts locally.

Python version

You can find instructions on setting the correct Python version here.

NodeJS & NPM

If you don't have NodeJS on your system, install it with homebrew.

brew install node

nvm is a tool for managing different versions of NodeJS. Follow the guidance on nvm's github repository to install it.

Once installed, run the following to switch to the version of NodeJS for this project. If you don't have that version, it should tell you how to install it.

nvm use

Additional Dependencies for Macbook M1 Pro Users

To compile and run the project you need the following

brew install proj
brew install geos

Pre-commit

  • If pre-commit is not already installed on your machine, run brew install pre-commit

  • In this repository’s folder, run pre-commit install and pre-commit install-hooks

To run the application

The instructions to run the gov.uk/alerts server can be found here.

We aim to match the browsers supported by GOVUK Frontend (includes Internet Explorer 8-10).

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.

This app can also be run as a Celery worker, but this is currently broken on some machines. See #214

To test the application

The instructions for running the unit tests for gov.uk/alerts server can be found here.

To continuously run js tests, run npm run test-watch.

To run a specific JavaScript test, you'll need to copy the full command from package.json.

Further documentation

notifications-govuk-alerts's People

Contributors

quis avatar karlchillmaid avatar adam-c-mitchell avatar tombye avatar benthorner avatar idavidmcdonald avatar lstevens-cabinet-office avatar jonathan-owens-gds avatar gds-gharper avatar rjbaker avatar crystalpea avatar sakisv avatar leohemsted avatar jakewych avatar dependabot[bot] avatar leylayaltiligil avatar klssmith avatar 36degrees avatar timwis avatar whpearson avatar

Stargazers

Dare Osewa avatar Ben. avatar Paul Smith avatar Matt Shaw avatar Terence Eden avatar  avatar

Watchers

Neustradamus avatar  avatar Alex Monk avatar Tom avatar James Cloos avatar Steven Fountain avatar  avatar Rebecca Law avatar Roberto avatar Sebastian Schmieschek avatar Stephen Harker avatar  avatar  avatar

notifications-govuk-alerts's Issues

Implement a machine-readable CAP-XML feed of alerts

There is currently no way to get a machine readable feed of alerts that can be integrated into other systems.

The standard for this is the Common Alerting Protocol which is used worldwide as an open transport mechanism for emergency alerts.

It would be really excellent to see this implemented. Right now the only option is screen-scraping and that is missing important data needed for reliable parsing, such as richer geographical information.

Local development broken on Mac M1

Relates to: https://www.pivotaltracker.com/story/show/181498273

Celery needs pycurl in order to run, but we've been unable to set this up reliably, especially on new machines with the new Mac M1 chip. It's still possible to run the tests in this repo, but not the app itself locally.

Suggested action

Dockerise running the app i.e. make-run-celery-with-docker.

This is the approach we took with Celery for the API repo. At the same time, we should update the README to describe the environment variables needed to run the publishing task locally e.g. to push to S3.

Data source

Out of curiosity, folk: are you in a position to elaborate on how alert data will be sourced when alerts are sent, e.g. a REST API, somehow being automatically added to data.yaml, etc?

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.