Commit Graph

4134 Commits

Author SHA1 Message Date
Rebecca Law
a01838e833 Drop the Notification to sender mapping tables.
We no longer need them because we record the text value of the sender on the notification.
2017-11-30 15:53:08 +00:00
kentsanggds
adc194f1bb Merge pull request #1449 from alphagov/pyup-pin-awscli-1.14.1
Pin awscli to latest version 1.14.1
2017-11-30 13:47:52 +00:00
Rebecca Law
bfa1fce559 Merge pull request #1445 from alphagov/stop-populating-mapping-tables
Stop populating the notification to sender mapping table
2017-11-30 13:44:32 +00:00
Rebecca Law
e9a1cc5f83 Stop deleting the mapping tables. 2017-11-30 11:27:08 +00:00
Rebecca Law
876d30e675 Merge branch 'master' into stop-populating-mapping-tables 2017-11-30 11:20:29 +00:00
Leo Hemsted
b1a4cc1043 Merge pull request #1451 from alphagov/leohemsted-patch-1
exclude build folder from flake8
2017-11-30 09:56:58 +00:00
Leo Hemsted
e1bc94136b exclude build folder from flake8 2017-11-30 09:56:44 +00:00
Richard Chapman
633d17d14a Merge pull request #1450 from alphagov/rc_increase_gunicorn_threads
Decreased Gunicorn threads
2017-11-30 09:52:59 +00:00
Richard Chapman
388bba2365 Decreased Gunicorn threads
Increasing the Gunicorn workers to 10 actually made the API decrease
in performance from ~200 requests/sec with with 20 API instances to
150 requests per/sec. The base value is 5 so this is to test how the API
performs with a slight increase.
2017-11-30 09:25:28 +00:00
pyup-bot
59a37d79e5 Pin awscli to latest version 1.14.1 2017-11-30 04:19:44 +00:00
Leo Hemsted
2f569341f9 Merge pull request #1446 from alphagov/flake8-fix
fix linter stuff
2017-11-29 17:37:31 +00:00
Leo Hemsted
be94894753 fix linter stuff 2017-11-29 17:18:53 +00:00
Rebecca Law
a5ceb4ba3c Fix linter 2017-11-29 17:17:08 +00:00
Rebecca Law
8fc0c8b10d Merge branch 'master' into stop-populating-mapping-tables 2017-11-29 16:57:29 +00:00
Leo Hemsted
4e741bab90 Merge pull request #1441 from alphagov/flake8-tests
Flake8 tests
2017-11-29 16:54:29 +00:00
Rebecca Law
8aa94af5d7 Stop populating the notification to sender mapping table when creating a notificaiton. 2017-11-29 16:47:23 +00:00
Rebecca Law
b6c348bc99 Merge pull request #1444 from alphagov/revert-config-change
Remove SQLALCHEMY_ECHO for test
2017-11-29 16:46:40 +00:00
Rebecca Law
3b1112d4e4 Remove SQLALCHEMY_ECHO for test 2017-11-29 15:15:03 +00:00
Rebecca Law
95fd1e8c31 Merge pull request #1434 from alphagov/pyup-update-pytest-3.2.5-to-3.3.0
Update pytest to 3.3.0
2017-11-29 14:52:53 +00:00
Rebecca Law
d3017da94a Merge pull request #1438 from alphagov/use-reply-to-in-send-to-provider
Use reply to in send to provider
2017-11-29 14:52:26 +00:00
Rebecca Law
fbcf777884 Remove unused import 2017-11-29 14:38:38 +00:00
Rebecca Law
ac6d041d26 Merge branch 'master' into use-reply-to-in-send-to-provider 2017-11-29 14:34:28 +00:00
Rebecca Law
39950c47bc Remove \t 2017-11-29 14:30:02 +00:00
Richard Chapman
c14b396deb Merge pull request #1443 from alphagov/rc_increase_gunicorn_threads
Increased Gunicorn threads
2017-11-29 14:25:18 +00:00
Richard Chapman
349887178c Increased Gunicorn threads
Increased Gunicorn threads to 10 on staging to test if there is a
performance increase when testing request per second. Increased to 10.
Gunicorn recommend 2 x cores + 1 however on PaaS the number of cores
is not consistent.
2017-11-29 14:13:26 +00:00
Venus Bailey
795056bc1b Merge pull request #1440 from alphagov/vb-govuk-db-migration
Migration to create new database table service_callback_api
2017-11-29 11:46:51 +00:00
Leo Hemsted
82acec87b6 flake8 the entire repo now that the tests are good 👌 2017-11-28 17:29:43 +00:00
Leo Hemsted
08494ef206 more flake8. lots of unused imports and variables that didn't get used. i tried to preserve old variable names as comments when it looked like they were useful (eg when they were describing timestamps) 2017-11-28 17:23:09 +00:00
Leo Hemsted
b1cccdcc6b First batch of flake8 changes.
Many unused variables, and replacing some old fixtures with
admin_request before I realised just how many there where 😩
2017-11-28 17:00:01 +00:00
Leo Hemsted
6ff9b8526a Merge branch 'master' into pyup-update-pytest-3.2.5-to-3.3.0 2017-11-28 15:33:47 +00:00
Leo Hemsted
363105774f Merge pull request #1439 from alphagov/flake8
Flake8
2017-11-28 15:33:07 +00:00
venusbb
5761d22822 Migration to create new database table service_callback_api 2017-11-28 15:25:15 +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
28088428f1 flake8 - misc flake8 errs.
* unused variables
* variables in loops overshadowing imports
* excepts with no defined exc type (tried to avoid `except Exception` too)
* history mapper is still too complex
* default variables should never be mutable
2017-11-28 14:28:01 +00:00
Leo Hemsted
28d5f9b87f flake8 - remove unused imports and ensure they're always at the top of the file 2017-11-28 14:28:01 +00:00
Leo Hemsted
043dee5a54 ensure no tests share the same name (using flake8's checker) 2017-11-28 14:28:01 +00:00
Leo Hemsted
3ee351b802 remove unused db.py and add flake8 config 2017-11-28 14:26:40 +00:00
Leo Hemsted
9a0c01fee5 Merge pull request #1436 from alphagov/click-tweaks
Click tweaks
2017-11-28 14:26:29 +00:00
Rebecca Law
0d86738696 Merge branch 'master' into use-reply-to-in-send-to-provider 2017-11-28 13:20:26 +00:00
Rebecca Law
a7232381bf Merge pull request #1433 from alphagov/add-reply-to-notifications
Populate reply-to-text field in notifications
2017-11-28 13:19:36 +00:00
Leo Hemsted
5b7118973e take advantage of click's type validation/coercion
(saves us having to write the stuff ourselves). Also adds a small
click plugin to do datetime parsing.

Sample output:

```
[leohemsted:~/dev/api]$ flask command create_provider_rates --help
Usage: flask command create_provider_rates [OPTIONS]

  Backfill rates for a given provider

Options:
  -p, --provider_name [mmg|firetext|ses]
                                  [required]
  -c, --cost FLOAT                Cost (pence) per message including decimals
                                  [required]
  -d, --valid_from DATE           [required]
  --help                          Show this message and exit.
[leohemsted:~/dev/api]$ flask command create_provider_rates -p ses -c 1.234 -d invalid
Usage: flask command create_provider_rates [OPTIONS]

Error: Invalid value for "-d" / "--valid_from": Could not parse datetime string "invalid" formatted as %Y-%m-%dT%H:%M:%S
```
2017-11-28 12:50:29 +00:00
Rebecca Law
b0d88ec08c Updates as per review comments 2017-11-28 11:05:56 +00:00
Leo Hemsted
300ff0ebf6 Merge pull request #1435 from alphagov/fix-bad-test
fix test that did not depend on the notify-db-session fixture, so left a messy db
2017-11-28 11:02:55 +00:00
Leo Hemsted
2b54c2308b fix test that did not depend on the notify-db-session fixture, so left a messy db 2017-11-28 10:42:54 +00:00
Leo Hemsted
721202b44f use more click functionality to reduce our own codes' complexity 2017-11-28 10:35:46 +00:00
Leo Hemsted
fa3b48b357 Merge pull request #1421 from alphagov/celery-fix
celery.task.retry exc param should be a throwable.
2017-11-28 10:19:14 +00:00
pyup-bot
8b6036e0e2 Update pytest from 3.2.5 to 3.3.0 2017-11-27 22:37:37 +00:00
Rebecca Law
ab5b7c20a7 Use sms sender or reply to email address of the Notify service in create_2fa_code depending on message type. 2017-11-27 16:52:52 +00:00
Rebecca Law
caf810eb76 Select sms sender or email reply to when creating a 2fa code notification 2017-11-27 16:49:18 +00:00
Venus Bailey
9af2b54e48 Merge pull request #1413 from alphagov/pyup-update-boto3-1.4.7-to-1.4.8
Update boto3 to 1.4.8
2017-11-27 16:09:25 +00:00