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

Generate sample bulk add trainee CSVs #4912

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

Conversation

stevehook
Copy link
Contributor

@stevehook stevehook commented Dec 27, 2024

Context

This PR just extends (and refactors) a rake task that we built to generate sample data for the bulk CSV trainee upload feature.

Changes proposed in this pull request

This PR adds options to:

  • Include invalid values (to test error handling)
  • Include missing required values (to test error handling)
  • Include placement data
  • Include degree data

It also extracts all the logic to a SampleTraineeDataGenerator service class

Guidance to review

Do the generated files work (or fail) as expected?

Important business

  • Does this PR introduce any PII fields that need to be overwritten or deleted in db/scripts/sanitise.sql?
  • Does this PR change the database schema? If so, have you updated the config/analytics.yml file and considered whether you need to send 'import_entity' events?
  • Do we need to send any updates to DQT as part of the work in this PR?
  • Does this PR need an ADR?

NB: Please notify the #twd_data_insights team and ask for a review if new fields are being added to analytics.yml

- Various corrections to the data generation to fix import validation
  errors
- Added tasks to generate invalid data
@stevehook stevehook changed the title Generate sample bulk add trainee csvs Generate sample bulk add trainee CSVs Dec 27, 2024
Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 94.11765% with 3 lines in your changes missing coverage. Please review.

Project coverage is 96.09%. Comparing base (d5bfb26) to head (e291751).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...vices/bulk_update/sample_trainee_data_generator.rb 94.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4912      +/-   ##
==========================================
- Coverage   96.10%   96.09%   -0.01%     
==========================================
  Files         743      744       +1     
  Lines       16050    16101      +51     
==========================================
+ Hits        15425    15473      +48     
- Misses        625      628       +3     
Flag Coverage Δ
unittests 96.09% <94.11%> (-0.01%) ⬇️

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.

Copy link

sonarqubecloud bot commented Jan 3, 2025

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.

1 participant