Skip to content

Task/sms parts#392

Open
jzbahrai wants to merge 2 commits intomainfrom
task/sms-parts
Open

Task/sms parts#392
jzbahrai wants to merge 2 commits intomainfrom
task/sms-parts

Conversation

@jzbahrai
Copy link
Copy Markdown
Collaborator

@jzbahrai jzbahrai commented Jan 29, 2026

Summary | Résumé

Update the the template calculation to return all the different message part details:

  1. Character count
  2. fragments

  3. Characters that will be encoded as unicode

Related Issues | Cartes liées

https://app.zenhub.com/workspaces/notify-planning-614b3ad91bc2030015ed22f5/issues/gh/cds-snc/notification-planning/2939

Test instructions | Instructions pour tester la modification

added tests

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@jzbahrai jzbahrai marked this pull request as ready for review January 29, 2026 17:55
Copilot AI review requested due to automatic review settings January 29, 2026 17:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new message_parts() method to the SMSMessageTemplate class that returns detailed SMS fragment information including character count, fragment count, and unicode characters. It also fixes a typo in the FRENCH_NON_GSM_CHARACTERS constant name and updates the unicode detection to include French characters.

Changes:

  • Added message_parts() method to return SMS message details (character count, fragments, unicode chars)
  • Fixed typo: FRENCH_NON_GSM_CHARACTESRFRENCH_NON_GSM_CHARACTERS
  • Updated unicode detection to include both Welsh and French non-GSM characters

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_template.py Added comprehensive test suite for the new message_parts() method covering various scenarios
notifications_utils/template.py Implemented message_parts() method and updated unicode detection logic
notifications_utils/sanitise_text.py Fixed typo in FRENCH_NON_GSM_CHARACTERS constant name
pyproject.toml Bumped version from 53.2.13 to 53.2.14
.github/actions/waffles/requirements.txt Updated dependency reference to version 53.2.14
.devcontainer/Dockerfile Updated base image to specify bookworm variant

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jzbahrai jzbahrai requested a review from smcmurtry January 29, 2026 19:12
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