-
Notifications
You must be signed in to change notification settings - Fork 43
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
test: Add auto-doc generation #2051
Conversation
24adfaf
to
2fa38e8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2051 +/- ##
===========================================
- Coverage 73.89% 73.83% -0.06%
===========================================
Files 248 248
Lines 24808 24820 +12
===========================================
- Hits 18330 18324 -6
- Misses 5218 5231 +13
- Partials 1260 1265 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
1120dc1
to
f9ce9ed
Compare
Haven't done a full review (and merging this isn't dependent on my review). Just want to chime in and say this looks really nice! Should really expand the kinds of tests we can write, without being exceedingly laborious/tedious. Additionally when we re-enable the benchmarks, can also be a really great data generation for that as well. Cool shit! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this, so please don't think otherwise based on the number of comments. I'm only part way through my review and will continue after the standup.
a232e7d
to
1adc5ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still working my way though, but submitting comments so far
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like this, but I think the code needs a bit more documentation before it can be merged.
Please comment against any comment/discussion-threads you resolve, it makes it much easier for me to tell what (if anything) has been done to resolve them.
e1e88ff
to
f7b11df
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a bunch Islam! :)
## Relevant issue(s) Resolves sourcenetwork#1974 ## Description This pull request introduces `gen.AutoGenerateDocs` function, a dynamic and versatile tool designed for the automatic generation of documents based on specified collection definitions. This functionality is essential for testing and simulating various data models and scenarios, providing extensive customization and intelligent demand calculation for document generation.
## Relevant issue(s) Resolves sourcenetwork#1974 ## Description This pull request introduces `gen.AutoGenerateDocs` function, a dynamic and versatile tool designed for the automatic generation of documents based on specified collection definitions. This functionality is essential for testing and simulating various data models and scenarios, providing extensive customization and intelligent demand calculation for document generation.
Relevant issue(s)
Resolves #1974
Description
This pull request introduces
gen.AutoGenerateDocs
function, a dynamic and versatile tool designed for the automatic generation of documents based on specified collection definitions. This functionality is essential for testing and simulating various data models and scenarios, providing extensive customization and intelligent demand calculation for document generation.Key Features
Dynamic Document Generation:
AutoGenerateDocs
can generate documents adhering to a defined schema, interpreting types and relationships to create realistic, interconnected data structures.Intelligent Demand Calculation: The function calculates the 'demand' for documents based on the configuration, adjusting the number of generated documents for consistency in relationships (e.g., one-to-one, one-to-many).
Flexible Configuration: Documents can be configured directly within the schema using annotations or via options passed to the function, with options taking precedence.
Customization Options: Includes capabilities like
WithTypeDemand
,WithFieldRange
,WithFieldLen
,WithFieldGenerator
, andWithRandomSeed
for extensive customization and deterministic output.Additional Functionality: Generation of Predefined Documents
GenerateDocs Function: Allows the generation of predefined documents, considering only the fields present in the schema and ignoring any extra fields in the
DocList
.Tasks
How has this been tested?
Unit and integration tests.
Specify the platform(s) on which this was tested: