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

Various fixes for import scripts #613

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Commits on Sep 18, 2024

  1. Configuration menu
    Copy the full SHA
    2b5dfd9 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    5c290e0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    56accf3 View commit details
    Browse the repository at this point in the history

Commits on Sep 24, 2024

  1. Update import scripts to handle 2010 constituencies again

    We removed 2010 WMC constituencies from the import scripts back in July,
    because we figured all 2010 data had already been imported into the live
    site, and we wouldn’t need to import any more.
    
    But it’s actually useful to be able to recreate the situation of the live
    site (with multiple generations of WMCs) in local development too, which
    means we need the import scripts to keep working with WMCs, rather than
    relying on developers just having the right data already in their local
    environments.
    
    This commit reinstates the WMC (rather than WMC23) AreaType, and updates
    our mapit utility function to accept a `generation` parameter that will
    easily allow us to change the MapIt generation in future again too.
    
    With both 2010 and 2023 constituencies coming straight from MapIt now,
    there is no longer any need for the import_new_constituencies command.
    zarino committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    066a975 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    90fe225 View commit details
    Browse the repository at this point in the history
  3. Fix import scripts that failed when run with multiple AreaTypes

    These import scripts all used QuerySet.get() insted of QuerySet.filter()
    which was causing an exception when both WMC and WMC23 AreaTypes were
    present in the database.
    zarino committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    4d758cf View commit details
    Browse the repository at this point in the history
  4. Skip broken/outdated import scripts in run_all_import_scripts

    Also, run the scripts alphabetically for easier debugging.
    zarino committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    ba32ae1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    de43867 View commit details
    Browse the repository at this point in the history