-
Notifications
You must be signed in to change notification settings - Fork 211
Add Rake Task to Import Australian Food Data #4353
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
Conversation
This commit introduces a Rake task to import data from a CSV file into the `australian_food_classification_data` table. The Rake task is idempotent and uses a robust header mapping to ensure data is imported correctly. A corresponding model and a comprehensive test suite have also been added. This change addresses the feedback from the previous code review, ensuring the import process is reliable and maintainable.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
…/Growstuff/growstuff into feat/import-australian-food-data
* Check presence of version members before accessing * Fix(specs): Initialize @version_members in crops/show view spec The `crops/show` view spec was failing with a `NoMethodError` because the `@version_members` instance variable was `nil`. This variable is used in the `_history` partial, which is rendered by the `show` view. This commit fixes the spec by initializing `@version_members` to an empty hash in the `before` block of the spec. This ensures that the view can render without errors during the test run. * Remove defunct gitter * Merge pull request #4352 from Growstuff/add-public-food-key feat: Add Public Food Key to Crop model * Bump rubocop-rails from 2.34.1 to 2.34.2 Bumps [rubocop-rails](https://github.com/rubocop/rubocop-rails) from 2.34.1 to 2.34.2. - [Release notes](https://github.com/rubocop/rubocop-rails/releases) - [Changelog](https://github.com/rubocop/rubocop-rails/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop-rails@v2.34.1...v2.34.2) --- updated-dependencies: - dependency-name: rubocop-rails dependency-version: 2.34.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Optimize Data Improvement Page (#4356) * feat: Add data improvement page to crops controller This commit introduces a new data improvement page to the crops controller. The page displays tabbed lists of crops with missing data, allowing users to easily identify areas for data quality improvement. The following data quality categories are included: - Crops without photos - Crops without descriptions - Crops without a youtube video - Crops without alternate names - Crops without a scientific name with a wikidata id - Crops without row spacing - Crops without sun requirements - Crops without height All lists are sorted by planting count in descending order. * refactor: Optimize data improvement page to load tab data on demand This commit refactors the data improvement page to load data for each tab on demand, rather than loading all queries at once. This improves the performance of the page by only executing the query for the currently active tab. The controller action now uses a `case` statement based on a `tab` URL parameter to execute the appropriate query. The view has been updated to pass this parameter when a tab is clicked. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> * Merge pull request #4353 from Growstuff/feat/import-australian-food-data Add Rake Task to Import Australian Food Data * Fix styling --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This change adds a new Rake task to import Australian food classification data from a CSV file. The task is idempotent and uses a robust header mapping. The change also includes a new model and a comprehensive test suite.
PR created automatically by Jules for task 10489258624179564128 started by @CloCkWeRX