Commit Graph

6987 Commits

Author SHA1 Message Date
Leo Hemsted
028b81b787 simplify validate_date_range_is_within_a_financial_year
we can use the get_financial_year_for_datetime function
to massively simplify this
2019-08-30 12:18:00 +01:00
Leo Hemsted
b7e8f1baa2 rename which_financial_year to get_financial_year_for_datetime
also fix bug on the very second of rollover, march 31st 23:00:00, and
add tests
2019-08-30 12:18:00 +01:00
Rebecca Law
2abcda47a3 Remove print 2019-08-30 12:17:59 +01:00
Rebecca Law
1c94d6d24a Added command to populate data for annual billing based on last years values. 2019-08-30 12:17:59 +01:00
Rebecca Law
cb7fff6100 Add endpoint to return structured data 2019-08-30 12:17:59 +01:00
Rebecca Law
4c36e22e93 [WIP]
fire alarm is going off - better save :)
2019-08-30 12:17:59 +01:00
Rebecca Law
1a5763feb6 Compare result tuple rather than each element in tuple (just to make it a little shorter)
Change order of columns
2019-08-30 12:17:59 +01:00
Rebecca Law
3b16950aee Final touches on tests and query for itemised letter billing data. 2019-08-30 12:17:59 +01:00
Rebecca Law
236d111c22 Update queries for data model change (removal of organisation_to_service)
New query to get letter breakdown.
2019-08-30 12:17:59 +01:00
Chris Hill-Scott
703effe31f Merge pull request #2600 from alphagov/add-gp-org-type
Add ‘GP’ as an org type
2019-08-28 15:47:41 +01:00
Chris Hill-Scott
8d9038c3e9 Give GP practices NHS branding by default
Previously we were doing it based on their email address. This will also
apply it if they self-select as a GP surgery, even if they don’t have an
NHS email address.
2019-08-28 15:33:00 +01:00
Chris Hill-Scott
edb5790b7c Use nhs_gp not gp as org type
Means we have the option of looking for anything starting with `nhs` as
a way of filtering organisations.
2019-08-28 15:24:30 +01:00
pyup-bot
44872388a8 Update sqlalchemy from 1.3.3 to 1.3.8 2019-08-28 14:00:16 +01:00
pyup-bot
bbd82e9957 Update psycopg2-binary from 2.8.2 to 2.8.3 2019-08-28 14:00:14 +01:00
pyup-bot
b695bce284 Update marshmallow from 2.19.2 to 3.0.1 2019-08-28 14:00:13 +01:00
pyup-bot
7f32ed76b1 Update marshmallow-sqlalchemy from 0.16.3 to 0.17.0 2019-08-28 14:00:11 +01:00
pyup-bot
83e894a287 Update jsonschema from 3.0.1 to 3.0.2 2019-08-28 14:00:09 +01:00
pyup-bot
9bc886aad4 Update eventlet from 0.24.1 to 0.25.1 2019-08-28 14:00:08 +01:00
pyup-bot
b751393b53 Update flask from 1.0.2 to 1.1.1 2019-08-28 14:00:06 +01:00
pyup-bot
fd5bf4fb2a Update flask-migrate from 2.4.0 to 2.5.2 2019-08-28 14:00:05 +01:00
Chris Hill-Scott
a5b36457f2 Add ‘GP’ as an org type
Although their allowances are the same as what we call `nhs_local` it
makes more sense to store them separately because:
- we already present them as two separate choices to the user
- we may want to handle them differently in the future, eg in terms of
  what branding choices are available to them
2019-08-27 17:01:03 +01:00
Leo Hemsted
d3449c37da Merge pull request #2593 from alphagov/split-up-nightly-tasks
split up reporting tasks in to separate tasks per day
2019-08-21 15:58:17 +01:00
Leo Hemsted
1d9fd775d3 move delete tasks to 4am
just to make sure they definitely run after the create tasks
2019-08-21 11:15:49 +01:00
Rebecca Law
d40cbf8d74 Merge pull request #2594 from alphagov/update-alert-for-letters-in-created
Update alert for letters in created status
2019-08-20 13:49:27 +01:00
Pea (Malgorzata Tyczynska)
009406898f Merge pull request #2596 from alphagov/lighter-serialize-for-users
Leaner serialize for user model for displaying list of users
2019-08-20 11:40:07 +01:00
Leo Hemsted
8f13697cf1 Revert "trigger nightly delete tasks from the create notification status task"
This reverts commit 58f24a0a83.
2019-08-19 16:06:25 +01:00
Leo Hemsted
36dd750637 split up reporting tasks in to separate tasks per day
to try and speed up overall time by parallelising
2019-08-19 16:06:25 +01:00
Rebecca Law
ad389e7252 Merge pull request #2591 from alphagov/remove-org-to-service-table
Remove the organisation_to_service table.
2019-08-19 15:15:00 +01:00
Rebecca Law
8fdf700b90 Remove print statement 2019-08-19 14:51:21 +01:00
Pea Tyczynska
b2f811662d Leaner serialize for user model for displaying list of users 2019-08-19 13:31:29 +01:00
Pea (Malgorzata Tyczynska)
25819d0690 Merge pull request #2595 from alphagov/serialize-for-lighter-query
Use serialize instead of marshmallow schema for lighter query
2019-08-19 11:40:31 +01:00
Pea Tyczynska
252be67436 Use serialize instead of marshmallow schema for lighter query
Find services by name feature was timing out for big collections
of results.
2019-08-16 17:30:04 +01:00
Pea (Malgorzata Tyczynska)
7e43b5bbc3 Merge pull request #2587 from alphagov/find_services_by_partial_name
Find services by partial name
2019-08-16 11:21:19 +01:00
Rebecca Law
f097abe82b Change the query to get the notifications for the check_templated_letter_state.
Now looking at the updated_at date, we are getting the alert if the notification was created_at:17:29 updated to created status at 17:30, so the letter is in the next days bucket.

Not sure if I want to make this change, there isn't an index on updated_at, so the query might be slow.
2019-08-16 10:37:51 +01:00
Leo Hemsted
92d78956be Merge pull request #2592 from alphagov/reporting-worker
Add reporting worker
2019-08-15 17:22:27 +01:00
Leo Hemsted
e5c76ffda7 reduce days to process from 10 to 4
to try and speed it up temporarily.
2019-08-15 17:06:38 +01:00
Leo Hemsted
3a0bf2b23e Add reporting worker
also remove references to unused statistics queue
2019-08-15 16:42:15 +01:00
Leo Hemsted
689d76d820 Merge pull request #2590 from alphagov/delete-tasks
trigger nightly delete tasks from the create notification status task
2019-08-15 15:39:00 +01:00
Rebecca Law
b37de7785c Remove the organisation_to_service table.
This table is no longer used or referenced in the code.
We can remove this mapping table now that the organisation to service relationship is handled by the foreign key in Services.
2019-08-15 15:17:53 +01:00
Rebecca Law
5ae77efbe0 Merge pull request #2586 from alphagov/add-org-id-to-services-2
Add organisation_id to Service.
2019-08-15 10:03:52 +01:00
Leo Hemsted
58f24a0a83 trigger nightly delete tasks from the create notification status task
the nightly tasks need to run after the create nightly notification
status task - so that test notifications are still there to record
stats for, and to stop the risk of deleting notificaitons part-way
through recording stats for them.
2019-08-14 18:04:45 +01:00
Rebecca Law
fdee6cbfb2 As per PR comments:
- Remove Organisation.services
- added backref='services' to Services.organisation relationship and removed redundant foreign_keys argument.
2019-08-14 13:23:20 +01:00
Sakis
c6d6c1ac7d Merge pull request #2588 from alphagov/enable-statsd-exporter-production
Enable statsd exporter for production
2019-08-14 12:38:33 +01:00
Athanasios Voutsadakis
02f50975b9 Run make freeze-requirements 2019-08-14 11:52:32 +01:00
Athanasios Voutsadakis
cd936d2e71 Enable statsd exporter for production
Also bump the utils version to include a fix on the error handling logic
when we fail to send a metric.
2019-08-14 11:42:13 +01:00
Rebecca Law
c4127d0508 Improve the data migration and downgrade script. 2019-08-14 11:01:22 +01:00
Rebecca Law
55dc7184cc Add organisation_id to Service.
This is the second commit in the series to add organisation_id to Service.
- Data migration to update services.organisation_id from data in organisation_to_service
 (The rollback will lose any updates to organisation unless the script is updated to set organistion_to_service from service.organisation_id )
- Update Service.organisation relationship to a ForeignKey relationship to Organisation.
- Update Organisation.services to a backref relationship to Service.
2019-08-13 17:25:30 +01:00
Pea Tyczynska
52a1316a7e Find services by partial name 2019-08-13 17:20:37 +01:00
Leo Hemsted
b07944d9f5 Merge pull request #2585 from alphagov/config-typo
fix typo in config
2019-08-13 15:28:22 +01:00
Leo Hemsted
7b8028d03f fix typo in config
was a `,`, not a `:`, so 'options' was a set rather than a dictionary.
2019-08-13 15:19:28 +01:00