Skip to content

Conversation

@ajbarnes
Copy link
Contributor

@ajbarnes ajbarnes commented Jun 25, 2025

Summary

This MR modernizes VA Explorer by bumping the underlying target python versions, upgrading requirements.txt packages to their latest versions, and using newer docker images to match.

Along the way, tweaks have been made to remedy any breaking/non-backwards compatible changes introduced by migrating between major versions of python, packages, or docker images.

Adds

  • new crispy-bootstrap4 dependency to comply with major version bump on django-crispy-forms migration instructions
  • skip_postgeneration_save logic to factories.py classes to fix deprecation warning introduced by factory-boy bump
  • required allauth AccountMiddleware added to handle changes introduced by django-allauth 0.56.0

Changes

  • updates project (unofficial) "release" version from 0.1.0 to 0.2.0 to indicate change via existing specifiers
  • moves project's supported python versions from [3.8, 3.9, 3.10] to [3.11, 3.12, 3.13] targeting 3.12
  • brings app's main Django dependency from 4.1 to 5.2
    • BaseUserCreationForm now used in >=4.2 instead of UserCreationForm used in <=4.1
    • multi_select.py monkeypatch updated to reflect latest version of django-multiselect source
  • beyond Django, bumps all packages in requirements/base.py to their latest versions
    • fixes issue introduced by pandas version bump from 1.5 to 2.0 related to datetimes, timedeltas, and parse_date
  • bumps all packages in requirements/local.txt to their latest versions
  • bumps all packages in requirements/docs.txt to their latest versions
  • bumps all packages in requirements/production.txt to their latest versions
  • updates main docker image from base python:3.8-slim to python:3.12-slim-bookworm
  • migrates postgres base image from 13.2 to 17.5
  • moves redis base image from 5.0 to 8

Removes

  • cleans up legacy reference to logging_event_handlers.js that no longer exists

Testing Suggestions

  1. Confirm all unit tests pass via pytest
  2. Run the app locally via runserver management command. (Create a superuser to login with if needed via seed_admin_user management command) (ensure your local install of postgres matches 17.5 as well)
  3. Login to app and confirm all functionality still works as expected since the only changes are underlying package bumps.
  4. Run the app via docker compose up -d
  5. Login to docker instance of app and confirm all functionality still works as expected

To get a useful seeded environment both locally and in docker, use these commands:

# Locally
./manage.py seed_admin_user test@example.com
./manage.py load_locations ./locations-file.csv
./manage.py load_va_csv ./example_vas.csv
docker compose up -d pycrossva interva5
./manage.py run_coding_algorithms

# Docker
docker cp ./locations-file.csv va_explorer_django:/app/locations-file.csv
docker cp ./example_vas.csv va_explorer_django:/app/example_vas.csv
docker exec -it va_explorer_django bash
  λ ./manage.py seed_admin_user test@example.com
  λ ./manage.py load_locations ./locations-file.csv
  λ ./manage.py load_va_csv ./example_vas.csv
  λ ./manage.py run_coding_algorithms
  λ exit
docker compose logs -f

@ajbarnes ajbarnes changed the title Version bump Version bump python, requirements.txt packages, and docker images Jun 25, 2025
@ajbarnes ajbarnes marked this pull request as ready for review July 10, 2025 12:46
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.

3 participants