Skip to content

Add sample data generation cli#15

Open
PierreGauthier wants to merge 1 commit intomainfrom
feat-sample-data-generator
Open

Add sample data generation cli#15
PierreGauthier wants to merge 1 commit intomainfrom
feat-sample-data-generator

Conversation

@PierreGauthier
Copy link
Copy Markdown
Collaborator

Q A
Branch? master for features / current stable version branch for bug fixes
Tickets #...
License OSL-3.0

@PierreGauthier PierreGauthier requested a review from Copilot April 24, 2026 10:11
@PierreGauthier PierreGauthier self-assigned this Apr 24, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a Symfony Console CLI to generate full sample datasets (catalogs, localized catalogs, metadata/source fields/options, categories, products) and includes translation resources to localize generated labels/names.

Changes:

  • Introduces gally:sample-data:generate command with presets and CLI overrides.
  • Adds generators/providers/models to create and index catalogs, categories, products, and metadata in batch.
  • Adds new XLIFF translation catalogs for product name fragments and source field option labels.

Reviewed changes

Copilot reviewed 27 out of 37 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
src/Resources/translations/source_field_options.de.xlf Adds DE translations for generated source-field option labels.
src/Resources/translations/product.fr.xlf Adds FR translations for generated product name tokens.
src/Resources/translations/product.es.xlf Adds ES translations for generated product name tokens.
src/Resources/translations/product.de.xlf Adds DE translations for generated product name tokens.
src/Resources/config/services.yaml Registers generators/providers/services and wires the new CLI command.
src/Provider/UserProvider.php Creates default users needed for the sample dataset.
src/Provider/ProductNameProvider.php Generates category-aware product name translation keys.
src/Provider/MetadataProvider.php Creates extra metadata entities for generation.
src/Provider/LocaleProvider.php Enumerates locales/currencies and picks least-used locales.
src/Provider/FieldTypeProvider.php Defines field-type distribution and templates for source fields.
src/Provider/CategoryHierarchyProvider.php Generates realistic category hierarchies based on templates.
src/Model/GenerationResult.php Captures counts/timing/memory metrics for a generation run.
src/Model/GenerationConfig.php Holds generation parameters (presets, counts, seed, etc.).
src/Generator/SourceFieldOptionGenerator.php Generates select-field options and localized labels in batches.
src/Generator/SourceFieldGenerator.php Generates source fields per metadata entity with localized labels.
src/Generator/ProductGenerator.php Generates product documents, adds categories/images/names and variants.
src/Generator/LocalizedCatalogGenerator.php Creates localized catalogs with locale diversity rules.
src/Generator/CategoryGenerator.php Generates categories + localized configurations and indexes them.
src/Generator/CatalogGenerator.php Generates catalogs in batches.
src/Generator/AbstractGenerator.php Base generator utilities (batching, progress bar).
src/Generator/AbstractEntityGenerator.php Base indexing/localization pipeline for entity documents.
src/Command/GenerateTestDataCommand.php New CLI entrypoint orchestrating database reset + generation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Command/GenerateTestDataCommand.php Outdated
Comment thread src/Generator/ProductGenerator.php Outdated
Comment thread src/Model/GenerationConfig.php
Comment thread src/Generator/SourceFieldOptionGenerator.php
Comment thread src/Generator/LocalizedCatalogGenerator.php Outdated
Comment thread src/Provider/CategoryHierarchyProvider.php
Comment thread src/Generator/AbstractGenerator.php Outdated
Comment thread src/Generator/AbstractGenerator.php
Comment thread src/Generator/AbstractEntityGenerator.php Outdated
Comment thread src/Generator/LocalizedCatalogGenerator.php Outdated
@PierreGauthier PierreGauthier force-pushed the feat-sample-data-generator branch 2 times, most recently from b8a7968 to 16410d6 Compare April 27, 2026 12:02
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