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

[Debt] Improve seeding for RoD #10290

Merged
merged 49 commits into from
May 22, 2024
Merged

[Debt] Improve seeding for RoD #10290

merged 49 commits into from
May 22, 2024

Conversation

brindasasi
Copy link
Contributor

@brindasasi brindasasi commented May 7, 2024

πŸ€– Resolves #10110

πŸ‘‹ Introduction

Describe what this PR is solving.

πŸ•΅οΈ Details

This PR adds new pools to existing PoolTestSeeder and a new seeder PoolCandidateTestSeeder
This PR also refactors existing code to parameterize skills ,assessments , assessment steps, so we can create as many as we want
I've created the personas as hard coded names & emails instead of random generation from faker. This would be helpful to remember but let me know if team prefers otherwise.

πŸ§ͺ Testing

Assist reviewers with steps they can take to test that the PR does what it says it does.

  1. Run the seeder as a whole as migrate:fresh -seed
  2. Run individual seeders to verify them if you like PoolTestSeeder and PoolCandidateTest Seedder
  3. Verify with the given document

πŸ“Έ Screenshot

Add a screenshot (if possible).

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 71.11%. Comparing base (0c04b6e) to head (5bddd16).
Report is 3 commits behind head on main.

Additional details and impacted files
@@              Coverage Diff              @@
##               main   #10290       +/-   ##
=============================================
+ Coverage     38.62%   71.11%   +32.49%     
  Complexity     1404     1404               
=============================================
  Files           994      217      -777     
  Lines         30555     5439    -25116     
  Branches       6562        0     -6562     
=============================================
- Hits          11801     3868     -7933     
+ Misses        18591     1571    -17020     
+ Partials        163        0      -163     
Flag Coverage Ξ”
integrationtests 71.11% <ΓΈ> (ΓΈ)
unittests ?

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.

@brindasasi brindasasi marked this pull request as ready for review May 13, 2024 14:44

foreach ($skills->slice(0, 5) as $skill) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed this hard coded skills during pool creation as we need diff no. of skills for the tests.


GeneralQuestion::factory()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this also has been taken out so we can customize the no. of questions per pool

@brindasasi
Copy link
Contributor Author

I'm not getting why would this snapshot test fail .
Am looking into but any help would be appreciated

 at tests/Feature/SnapshotTest.php:169
    165β–•         // generate an overlap area between the unused skills and snapshot skills
    166β–•         // assert it has a length of zero, therefore, no unused skills were saved to the snapshot
    167β–•         $intersectedArray = array_intersect($unusedSkillIds, $snapshotSkillIds);
    168β–•         $intersectedArrayLength = count($intersectedArray);
  ➜ 169β–•         assertEquals($intersectedArrayLength, 0);
    170β–•     }
    171β–• 
    172β–•     // a cleanup routine to make the lines of a query easier to diff
    173β–•     private static function normalizeQueryLines(array $lines)

  1   tests/Feature/SnapshotTest.php:169

@petertgiles petertgiles self-requested a review May 14, 2024 13:23
@brindasasi
Copy link
Contributor Author

hmm .. not sure why this php test would fail all of a sudden .. checking on it

@brindasasi brindasasi added this pull request to the merge queue May 22, 2024
Merged via the queue into main with commit 5f14621 May 22, 2024
7 checks passed
@brindasasi brindasasi deleted the 10110-improve-ROD-seeding branch May 22, 2024 20: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.

♻️ Improve seeding for RoD
4 participants