fix(farmer_demo): assign FARM group type to farm demo data (#1120)#322
Open
emjay0921 wants to merge 1 commit into
Open
fix(farmer_demo): assign FARM group type to farm demo data (#1120)#322emjay0921 wants to merge 1 commit into
emjay0921 wants to merge 1 commit into
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 19.0 #322 +/- ##
==========================================
- Coverage 74.28% 67.11% -7.17%
==========================================
Files 372 100 -272
Lines 25385 9817 -15568
==========================================
- Hits 18857 6589 -12268
+ Misses 6528 3228 -3300
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why is this change needed?
The farmer demo data generator created farm groups with a blank Group Type (OP#1120). Farm groups should default to Farm, and cooperative container groups to Cooperative. Neither generator set
group_type_id, and nofarmcode existed in theurn:openspp:vocab:group-typevocabulary (onlycooperativewas created at runtime).How was the change implemented?
_ensure_farm_group_type()(mirrors the existing_ensure_cooperative_group_type()) to create a localfarmgroup-type code viaget_or_create_local— in both the story-farm wizard and the seeded-farm utility.group_type_id = farmon every farm group created by both generators (story farms in_create_farm, and the ~730 seeded/volume farms).group_type_id = cooperative; member farms stay Farm (a farm is still a farm inside a cooperative — only the container is a Cooperative).New unit tests
test_1120_cooperative_container_typed_cooperative— the cooperative container is typedcooperativeand its member farms are typedfarm.group_type_id.code == "farm"assertions to the seeded-farm generator test, the story-farm group test, and the_create_farmhelper test.Unit tests executed by the author
spp_farmer_registry_demosuite: 0 failed, 0 error(s) of 133 tests (fresh DB,--stop-after-init).How to test manually
Related links
https://projects.acn.fr/work_packages/1120