Commit Graph

69 Commits

Author SHA1 Message Date
David McDonald
ade08e23da Tidy up Readme 2020-01-07 10:26:07 +00:00
David McDonald
542f3b23aa Remove coveralls
We don't use it anymore
2019-12-24 08:37:19 +00:00
Tom Byers
62b606af17 Update README about python to use
We now run python 3.6 in production and there are issues with marshmallow-sqlalchemy using 3.5.
2019-11-22 14:15:34 +00:00
Leo Hemsted
e094dd4bfd remove loadtesting from providers
we don't use it since we wrote our own provider stubs for performance
tests.

this removes it from the api - it's still in the DB and will be
retrieved by queries, but is set to disabled on prod
2019-10-23 11:45:07 +01:00
Leo Hemsted
7a711cf314 Revert "Zero downtime deploy" 2019-05-15 13:48:40 +01:00
Leo Hemsted
39c8e1ede4 update readme 2019-05-09 14:50:38 +01:00
Pea Tyczynska
39d521cfc0 Update instructions about creating a new worker app in the README 2019-04-30 12:07:42 +01:00
Chris Heathcote
12cbdc550d Update README.md to reflect Postgres version needed
Added note about installing Postgres 9.6
2018-11-07 16:33:22 +00:00
Chris Hill-Scott
87017fc3d1 Merge pull request #2197 from alphagov/quis-patch-1
Update description of what the API repo is for
2018-10-31 11:12:55 +00:00
Chris Hill-Scott
69838919f2 Document Python version 2018-10-30 13:33:56 +00:00
Chris Hill-Scott
f23bd76255 Update description of what the API repo is for 2018-10-30 13:30:46 +00:00
Chris Hill-Scott
b8913b62ec Fix broken Markdown headings in README 2018-07-30 15:25:48 +01:00
Alexey Bezhan
75940c9566 Pin all application requirements in requirements.txt
The list of top-level dependencies is moved to requirements-app.txt,
which is used by `make freeze-requirements` to generate the full
list of requirements in requirements.txt.

This is based on alphagov/digitalmarketplace-api#615, so rationale
from that PR applies here.

We had a problem with unpinned packages on new deployments leading
to failed tests (e.g. alphagov/notifications-admin#2144) which is
why we're implementing this now.

After re-evaluating pipenv again, this still seems like the least
disruptive approach:

* pyup.io has experimental support for Pipfile, but doesn't respect
  version ranges or updating hashes in the lock file
* CloudFoundry buildpack recognizes and supports Pipfiles out of the
  box, but the support is relatively new. For example until recently
  CF would install dev packages during deployment. It's also based on
  generating a requirements file from the Pipfile, which doesn't
  properly support pinning VCS dependencies (eg it doesn't set the
  #egg= version, meaning pip will not upgrade the package if it's
  already installed).
* pipenv has a strict dependency resolution algorithm, which doesn't
  appear to be well documented and can cause some unexpected failures.
  For example, pipenv doesn't seem to be able to install `awscli-cwlogs`
  package at all, believing it to have a version conflict for `botocore`
  (which it doesn't list as a direct dependency) while neither `pip` nor
  `pip-tools` highlight any issues with it.
* While trying out `pipenv install` on our list of dependencies it would
  regularly fail to install utils with a "Will try again." message.
  While the installation succeeds after a retry, this doesn't inspire
  confidence.
* The switch to Pipfile and pipenv-managed virtualenvs requires a series
  of changes to `make` targets and scripts - replacing `pip install` with
  `pipenv`, removing references to requirements files and prefixing
  commands with `pipenv run`. While it's likely to simplify the overall
  process of managing dependencies, it would require time to properly
  implement across our applications and environments (Jenkins, PaaS,
  docker containers, and dev machines).
2018-07-10 14:59:04 +01:00
Athanasios Voutsadakis
19129a1313 Describe process for creating a new worker app 2018-03-08 14:02:08 +00:00
Leo Hemsted
073c48a0a7 move all static env vars from env.sh to config file in dev
There's no reason to have things that never change in environment.sh.
you'll want to update your environment.sh, then restart your shells
(`exec bash` or `exec zsh` etc)

This also changes the database to be set statically in the config, but
overridable from the command line if you need to - for example, jenkins
will override it with the dockerised postgres uri.
2018-02-21 18:12:03 +00:00
Leo Hemsted
90e9a2f1b3 use flake8 instead of pycodestyle
since there are thousands and thousands of errors in the tests files
at the moment, i propose fixing those errors in separate PR for now.
2017-11-28 14:28:01 +00:00
Leo Hemsted
d30a8b83c1 update readme and ensure makefile up to date 2017-11-23 17:04:58 +00:00
Leo Hemsted
9f56dccdee Remove flask-script, move commands to click
click (http://click.pocoo.org/) is used by flask to run its cli args.
In removing flask_script (it's unmaintained), we had to migrate all our
commands to use click. This is a change for the better in my eyes - you
don't need to define the command in several places, and it makes
managing options a bit easier.

View diff with whitespace turned off unless you're a masochist.
2017-11-23 17:04:58 +00:00
Chris Hill-Scott
0791c87b1e Add Coveralls badge
We should be proud 😎

[![Coverage Status](https://coveralls.io/repos/alphagov/notifications-api/badge.svg?branch=master&service=github)](https://coveralls.io/github/alphagov/notifications-api?branch=master)
2017-02-24 16:56:01 +00:00
Chris Hill-Scott
c2999ed5ad Use pycodestyle instead of PEP8
PEP8 was renamed to pycodestyle; this issue explains why:
https://github.com/PyCQA/pycodestyle/issues/466

This commit changes our tests to use pycodestyle instead of pep8.

It also means:
- making a couple of whitespace changes to appease the linter
- disabling warnings for bare `Except`s (ie `Except` instead of `Except
  ValueError`) – this seems like a sensible thing to catch but I’m not
  going to make meaningful code changes in this commit
2017-02-01 09:19:32 +00:00
minglis
22f6161440 Merge pull request #752 from alphagov/update-readme
Update README
2016-12-02 10:14:00 +00:00
Martyn Inglis
cea48140f8 Added README to tell users how tp switch REDIS on 2016-12-02 10:11:31 +00:00
Martyn Inglis
687f217d7b Updated readme 2016-12-02 10:09:36 +00:00
Jenny Duckett
84f89fb768 Update README
- the bootstrap script needs to be run before the app will run, so mention
  that first
- explain what run_celery_beat.sh is for and that it isn't required to run the
  app
2016-11-30 17:49:47 +00:00
Martyn Inglis
7b859fcca1 Set up REDIS config.
Switched OFF on DEV and by DEFAULT
Switched ON for TESTS
Switched ON on PREVIEW - STAGING - PRODUCTION

URL set via ENV file - set in environment_test.sh. DEVS will need to update environment.sh. README updated.
2016-11-28 09:39:56 +00:00
Leo Hemsted
a51dfb41d0 typo
paul tried to copy + paste command
2016-11-16 16:11:23 +00:00
Peter Chamberlin
b3c213406d Changes after review, and further thinking... 2016-10-04 15:12:04 +01:00
Pete
f8db1a9731 Spelling 2016-10-04 12:30:55 +01:00
Pete
555163aa48 AWS region should probably be user-defined too 2016-10-04 12:30:37 +01:00
Peter Chamberlin
df2d081c14 Removed extraneous back ticks 2016-10-04 12:05:46 +01:00
Peter Chamberlin
26325ff5e7 Corrected repo name/link for func tests 2016-10-04 11:18:43 +01:00
Peter Chamberlin
214071707b Updated README based on my experience getting things running 2016-10-04 11:12:55 +01:00
Martyn Inglis
36425cd035 Removed travis image 2016-09-27 12:39:30 +01:00
minglis
c50a0200d4 Merge pull request #664 from alphagov/rationalise-config
Simplified the config. Aim is to get the actual secrets in credstash …
2016-09-08 10:27:31 +01:00
imdadahad
b1013d8d31 Merge pull request #660 from alphagov/update-readme
Update README to include additonal instructions
2016-09-07 16:05:24 +01:00
Martyn Inglis
c1b00a5f0c Simplified the config. Aim is to get the actual secrets in credstash to be env specific, and not the random collection of things we have at the moment.
Secret definition also includes env specific things such as URLs / Queue prefixes / URLs for providers and so on.
2016-09-07 09:35:31 +01:00
Imdad Ahad
d8a8a69aff Update README to include additonal instructions 2016-09-06 10:30:57 +01:00
Rebecca Law
4d1c34fcce A little bit of clean up.
- Remove the deploy to staging | live links in the README
- Update most of the outdated requirements. Left Flask update out for now.
2016-09-05 16:45:54 +01:00
Leo Hemsted
95e3f39c6f Merge pull request #632 from alphagov/readme-cleanup
cleaned up readme + environment file
2016-08-31 17:08:49 +01:00
Leo Hemsted
5ac4e630d8 remove some legacy code/tests relating to old invite/verification code 2016-08-31 14:49:26 +01:00
Leo Hemsted
62e5361b0c cleaned up environment file
* sorted list in README and environment_test.sh
* removed some unused vars
* cleaned up some names to be more accurate in the readme
* removed twilio as a dependency
2016-08-24 16:23:11 +01:00
Leo Hemsted
a3fe1dff1f include section on testing in readme.md 2016-08-24 14:30:46 +01:00
Leo Hemsted
a6cd490942 add organisation and branding models
a service now has branding and organisation_id columns, and two new
tables have been aded to reflect these:
* branding is a static types table referring to how a service wants
  their emails to be branded:
    * 'govuk' for GOV UK branding (default)
    * 'org' for organisational branding only
    * 'both' for co-branded output with both
* organisation is a table defining an organisation's branding. this
  contains three entries, all of which are nullable
    * colour - a hex code for a coloured bar on the logo's left
    * logo - relative path for that org's logo image
    * name - the name to display on the right of the logo
2016-08-09 15:59:16 +01:00
Nicholas Staples
dd9a7f09c5 Twilio config variables removed. 2016-06-13 08:39:33 +01:00
Nicholas Staples
fe7d894420 Replaced mmg from number and firetext from number with single from number.
Fix merge mistake.

Fix tests from merge.

Update config to include correct staging and live names.
2016-06-06 16:41:33 +01:00
Nicholas Staples
15607c0977 Add server_commands and update readme.md
Update command to search for services from the user.
2016-05-18 12:20:56 +01:00
Rebecca Law
992f9d78f9 There is a problem where columns on the templates table were not set.
It is also discovered that columns that have a default value and use the version mixin must set the value when creating the db object before the insert otherwise the history table will be missing the default value.
Updated the templates_history.created_by_id with a value where missing, using the current version of the template for this value.
Update templates_history.archived to false. This is okay as we do not yet have a way to set this value to true.
Removed the versions attribute from the TemplateSchema, there is not a need for this column.
2016-05-16 16:16:14 +01:00
Chris Hill-Scott
2e5df51b65 Fix syntax error in README 2016-04-26 14:16:01 +01:00
Rebecca Law
c132bbf46e Rename NOTIFY_FROM_NUMBER to MMG_FROM_NUMBER, there should be a separate short code per provider. 2016-04-07 10:18:46 +01:00
Chris Hill-Scott
d8c29baa0e Add deployment badges 2016-03-22 09:40:07 +00:00