-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add minimal demo data seeder (tiny & decoupled) #26
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
base: main
Are you sure you want to change the base?
Conversation
This PR adds a simple WP-CLI command to seed minimal demo data for the plugin. It allows developers and testers to quickly set up a working plugin instance without manually creating events or speakers. Features: - Adds `includes/class-wpfa-seeder.php` to handle minimal demo data insertion. - Registers a WP-CLI command: `wp wpfa seed --minimal` and `wp wpfa seed-minimal`. - Creates: - 1 demo event (`wpfa_event`) - 2 demo speakers (`wpfa_speaker`) with remote-safe placeholder images from https://via.placeholder.com/ - Updates `fossasia-landing.php` to register the new seeder command. - Updates `README.md` with usage instructions. - Prepares `assets/demo/` folder for future placeholder assets. 🎯 Goal: Allow quick testing of plugin functionality with tiny, decoupled sample data. **Usage:** ```bash wp wpfa seed --minimal # or wp wpfa seed-minimal
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.
Sorry @NishilHoogar, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
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.
Pull Request Overview
This PR introduces a WP-CLI command to seed minimal demo data for the FOSSASIA plugin, enabling quick setup for testing and development. The seeding functionality creates sample events and speakers with remote placeholder images, avoiding the need to bundle local assets.
Key changes:
- Added new seeder class with WP-CLI command registration
- Integrated seeder into main plugin file alongside existing CLI commands
- Added documentation for the new seeding commands
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| fossasia-landing.php | Registered new WPFA_Seeder CLI command alongside existing WPFA_CLI command |
| README.md | Added usage documentation for the new wp wpfa seed-minimal command |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
README.md
Outdated
| | `[event_sessions]` | Displays event sessions with title, time, and abstract. | API endpoint or placeholder | | ||
| | `[event_schedule]` | Displays daily schedule in a table format. | API endpoint or placeholder | | ||
| <<<<<<< Updated upstream |
Copilot
AI
Oct 26, 2025
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.
Merge conflict markers were left in the file. Remove lines 102 and 187 (<<<<<<< Updated upstream and =======) along with line 203 (>>>>>>> Stashed changes) to resolve the conflict.
| <<<<<<< Updated upstream |
fossasia-landing.php
Outdated
| // Register WP-CLI command if in CLI context. | ||
| if ( defined( 'WP_CLI' ) && WP_CLI ) { | ||
| // Note: The user requested a new, simpler seeder. The existing one is more complex. | ||
| // We will keep both for now, but the new one will overwrite the 'wpfa seed' command. |
Copilot
AI
Oct 26, 2025
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.
The comment mentions that the new seeder will 'overwrite' the 'wpfa seed' command, but both commands are registered to different command names ('wpfa' for WPFA_CLI and the seeder registers its own subcommands). Clarify whether there's an actual command conflict or update the comment to accurately reflect that both can coexist with different subcommands.
| // We will keep both for now, but the new one will overwrite the 'wpfa seed' command. | |
| // We will keep both for now; both commands are registered under different command names or subcommands, so they can coexist without conflict. |
This PR adds a simple WP-CLI command to seed minimal demo data for the plugin. It allows developers and testers to quickly set up a working plugin instance without manually creating events or speakers.
Features:
includes/class-wpfa-seeder.phpto handle minimal demo data insertion.wp wpfa seed --minimalandwp wpfa seed-minimal.wpfa_event)wpfa_speaker) with remote-safe placeholder images from https://via.placeholder.com/fossasia-landing.phpto register the new seeder command.README.mdwith usage instructions.assets/demo/folder for future placeholder assets.Goal: Allow quick testing of plugin functionality with tiny, decoupled sample data.
Usage:
wp wpfa seed --minimal # or wp wpfa seed-minimal