pycon icon indicating copy to clipboard operation
pycon copied to clipboard

Change conference name from multi-lingual field to CharField

Open marcoacierno opened this issue 5 months ago • 6 comments

Convert Conference.name from I18nCharField to models.CharField

Changes

  • Convert Conference.name from I18nCharField to models.CharField
  • Remove unused I18nCharField import from conference model
  • Create migration 0055 to handle database schema change
  • Update GraphQL Conference type to use regular field instead of localized resolver

Closes #4066

Generated with Claude Code

marcoacierno avatar Aug 03 '25 20:08 marcoacierno

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
pycon ✅ Ready (Inspect) Visit Preview Aug 4, 2025 3:01pm

vercel[bot] avatar Aug 03 '25 20:08 vercel[bot]

@claude there are a few places where we do conference.name.localize(language_code). We don't ned the localize anymore, we can use name directly

marcoacierno avatar Aug 04 '25 13:08 marcoacierno

Claude finished @marcoacierno's task —— View job


Finding and fixing conference.name.localize() calls ✅

  • [x] Read repository setup instructions (CLAUDE.md)
  • [x] Search for all instances of conference.name.localize
  • [x] Update each instance to use direct name access
  • [x] Run linting/testing if available
  • [x] Commit and push changes

Completed! Found and updated 25 instances across 11 files:

  • backend/sponsors/tests/test_tasks.py
  • backend/sponsors/tasks.py
  • backend/submissions/tests/test_admin.py
  • backend/submissions/admin.py
  • backend/submissions/tasks.py
  • backend/schedule/views.py
  • backend/grants/tests/test_tasks.py
  • backend/grants/tasks.py
  • backend/schedule/tests/test_views.py
  • backend/schedule/tests/test_tasks.py
  • backend/schedule/video_upload.py
  • backend/schedule/tasks.py

All instances of conference.name.localize(language_code) have been replaced with direct conference.name usage to match the CharField conversion. Changes committed and pushed to the PR branch.

claude[bot] avatar Aug 04 '25 13:08 claude[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :warning: Please upload report for BASE (main@f8a87d3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4462   +/-   ##
=======================================
  Coverage        ?   94.53%           
=======================================
  Files           ?      352           
  Lines           ?    10131           
  Branches        ?      733           
=======================================
  Hits            ?     9577           
  Misses          ?      461           
  Partials        ?       93           
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Aug 04 '25 13:08 codecov[bot]

@claude We likely need to update the ConferenceFactory as well to not set name as a multi-lingual field anymore

marcoacierno avatar Aug 04 '25 14:08 marcoacierno

Claude encountered an error —— View job


Updating ConferenceFactory to use CharField

  • [x] Read repository setup instructions (CLAUDE.md)
  • [x] Search for ConferenceFactory in the codebase
  • [x] Analyze current multi-lingual implementation
  • [x] Update factory to use simple CharField
  • [ ] Run linting/testing if available
  • [ ] Commit and push changes

Updated ConferenceFactory and test:

  • Changed name = LanguageFactory("name") to name = factory.Faker("word") in backend/conferences/tests/factories.py:27
  • Updated test in backend/conferences/tests/test_models.py to use simple string instead of LazyI18nString
  • Removed unused LazyI18nString import

Committing changes...

claude[bot] avatar Aug 04 '25 14:08 claude[bot]