Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bexley] Adapt postcode DB script to take URL for fetching CSV. #5365

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neprune
Copy link
Contributor

@neprune neprune commented Feb 11, 2025

[skip changelog]
closes https://github.com/mysociety/societyworks/issues/4463

Matthew:

  • I rearranged the script to put flow top / business logic middle / setup data last.
  • For use in production, it creates a new full file in a tempfile then moves into place. For updates it updates in place.
  • It works out the type of file (full or update) from its contents.
  • As we don't know what rows a COU file will contain, I thought it easiest to store the BLPU rows as well (then they can be updated if changes come in) and change the queries to check property shell then, rather than try and work out dependencies between the types.
  • As we don't use full text search, I changed the tables to be normal ones with a primary key, making updating much easier. If FTS is needed in future, that can be joined on (but you can't primary key a FTS table)

@neprune neprune force-pushed the bexley-auto-fetch-llpg-updates branch 2 times, most recently from ce3eae5 to 4715b27 Compare February 11, 2025 20:12
Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.44%. Comparing base (ed34041) to head (af8c0f1).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5365   +/-   ##
=======================================
  Coverage   82.43%   82.44%           
=======================================
  Files         416      416           
  Lines       32979    32979           
  Branches     5308     5308           
=======================================
+ Hits        27187    27188    +1     
+ Misses       4219     4218    -1     
  Partials     1573     1573           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dracos dracos force-pushed the bexley-auto-fetch-llpg-updates branch from 4715b27 to 7b86889 Compare February 13, 2025 09:16
@dracos dracos marked this pull request as ready for review February 13, 2025 09:16
@dracos dracos requested a review from chrismytton February 13, 2025 09:29
@dracos dracos force-pushed the bexley-auto-fetch-llpg-updates branch from 7b86889 to af8c0f1 Compare February 13, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants