Skip to content

Conversation

@btravisebsco
Copy link
Contributor

@btravisebsco btravisebsco commented Jan 20, 2026

Purpose

Add a feature to save the raw task statistics report data as JSON alongside the Markdown version of the reports. This will will allow alternative processing/presentation of that data in the future.

Refactor how i18n translations are handled to cache frequently-used translations to improve transformation performance across the board.

Update GitHub Actions to use uv.

Changes Made in this PR

Added a raw data directory to the output folder structure, added method on the migrationreport class to output the report dictionary as JSON, and add tests. Also bump package version.

Code Review Specifics

Task Checklist

  • Ran nox -rs safety.
  • Ran pre-commit run --all-files
  • Tests cover new or modified code.
  • Ran test suite: nox -rs tests
  • Code runs and outputs default usage info: cd src; poetry run python3 -m folio_migration_tools -h
  • Documentation updated

Warning Checklist

  • New dependencies added
  • Includes breaking changes

How to Verify

Open Questions

Learn Anything Cool?

- Introduced a new directory for raw migration reports in FolderStructure.
- Updated the migration report class to include a method for writing reports in JSON format.
- Enhanced folder verification to create missing directories as needed.
- Added tests to ensure the creation of subfolders and proper handling of missing base folders.
@codecov
Copy link

codecov bot commented Jan 20, 2026

Codecov Report

❌ Patch coverage is 83.33333% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.20%. Comparing base (9fc7d91) to head (81857ed).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
..._migration_tools/migration_tasks/loans_migrator.py 50.00% 5 Missing ⚠️
src/folio_migration_tools/folder_structure.py 62.50% 1 Missing and 2 partials ⚠️
...gration_tools/migration_tasks/requests_migrator.py 25.00% 3 Missing ⚠️
src/folio_migration_tools/circulation_helper.py 33.33% 2 Missing ⚠️
src/folio_migration_tools/mapper_base.py 33.33% 2 Missing ⚠️
...io_migration_tools/migration_tasks/batch_poster.py 33.33% 2 Missing ⚠️
...gration_tools/migration_tasks/reserves_migrator.py 33.33% 2 Missing ⚠️
src/folio_migration_tools/migration_report.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #980      +/-   ##
==========================================
+ Coverage   76.98%   77.20%   +0.21%     
==========================================
  Files         104      106       +2     
  Lines       13955    14036      +81     
  Branches     1734     1736       +2     
==========================================
+ Hits        10743    10836      +93     
+ Misses       2867     2859       -8     
+ Partials      345      341       -4     
Flag Coverage Δ
unittests 77.20% <83.33%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Introduced i18n caching with the `i18n_t` function to improve performance by caching translation results.
- Updated various modules to replace direct calls to `i18n.t` with the new `i18n_t` function for consistency and efficiency.
- Added tests for the i18n caching functionality to ensure correct behavior, including cache hits, misses, and parameterized translations.
- Ensured that all relevant translation strings across the migration tools are now utilizing the caching mechanism.
@sonarqubecloud
Copy link

@btravisebsco btravisebsco merged commit 7484203 into main Jan 22, 2026
5 checks passed
@btravisebsco btravisebsco deleted the feature/save-raw-report-data branch January 22, 2026 05:50
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