- Introduced a Rake task `packets:needing_ocr` to list photos of seed packets that lack text, outputting results as JSON lines.
- Created a Python script `read_packets.py` to process the output of the Rake task, downloading images and performing OCR to extract text.
- Updated model specs for `Crop` to ensure proper handling of photos associated with different seeds.
- Refactored API request specs for `Photos` and `Seeds`, removing unnecessary attributes from the response.
- Added tests for the new Rake task to ensure correct functionality and output format.
* Filter harvest reminders in SQL instead of Ruby memory
- Add `harvest_in_next_week` scope to `PredictHarvest` concern
- Use SQL scope in `NotifierMailer#harvest_reminder` and `exists?` in `growstuff:send_harvest_reminders` task
- Add unit specs for `.harvest_in_next_week` scope and rake task
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Filter harvest reminders in SQL instead of Ruby memory
- Add `harvest_in_next_week` scope to `PredictHarvest` concern
- Use SQL scope in `NotifierMailer#harvest_reminder` and `exists?` in `growstuff:send_harvest_reminders` task
- Add unit specs for `.harvest_in_next_week` scope and rake task
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Filter harvest reminders in SQL instead of Ruby memory
- Add `harvest_in_next_week` scope to `PredictHarvest` concern
- Use SQL scope in `NotifierMailer#harvest_reminder` and `exists?` in `growstuff:send_harvest_reminders` task
- Add unit specs for `.harvest_in_next_week` scope and rake task
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
* Add members:cleanup_inactive rake task
This task identifies and deletes members who have not logged in for over
24 months and have no gardens, plantings, or other activity (posts,
comments, seeds, harvests, etc).
Includes support for DRY_RUN=true to preview deletions.
Added tests in spec/tasks/members_spec.rb.
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Refactor activity check to Member#has_activity? and update rake task
- Added `Member#has_activity?` to encapsulate the check for gardens, plantings, and other activity.
- Updated `members:cleanup_inactive` rake task to use `Member#has_activity?`.
- Maintained `DRY_RUN` support and existing tests.
Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>
* Apply suggestion from @CloCkWeRX
* Apply suggestions from code review
Co-authored-by: Daniel O'Connor <daniel.oconnor@gmail.com>
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Adds the `sitemap_generator` gem to generate a sitemap.
- Includes static routes and dynamic routes for active crops, plantings, seeds, photos, posts, and members.
- Implements a caching mechanism to ensure the sitemap is generated no more frequently than every 72 hours.
- Updates `robots.txt` to point to the new sitemap.
- Includes a unit test for the caching Rake task.