Skip to content
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

Create Vets::Collection #19895

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Create Vets::Collection #19895

wants to merge 16 commits into from

Conversation

stevenjcumming
Copy link
Contributor

@stevenjcumming stevenjcumming commented Dec 13, 2024

This is parent branch that will be merged when other PRs are merged into itself

Summary

  • Vets::Collection allows array of Vets::Model models to be sorted, filtered, or paginated.
  • Vets::Collection can also be created from an array of hashes or WillPaginate::Collections

I will review & update metadata & errors between Vets Model and Collection in another PR

Related issue(s)

Testing done

  • New specs created
  • Manual testing

Acceptance criteria

  • Copies functionality (sorted, filtered, paginated) of Common::Collection

* re-add collection

* linting
@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection/main/main December 23, 2024 13:36 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection/main/main December 23, 2024 13:56 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection/main/main December 23, 2024 15:59 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection-pagination/main/main December 23, 2024 16:00 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection/main/main January 2, 2025 20:55 Inactive
* add pagination class to collection

* add new tests to collection and pagination

* fix tests

* linting

* remove new requires that should be loaded

* fix formatting

* linting

* fix will_paginate logic and add test
Copy link

github-actions bot commented Jan 8, 2025

1 Error
🚫 This PR changes 549 LoC (not counting whitespace/newlines).

In order to ensure each PR receives the proper attention it deserves, those exceeding
500 will not be reviewed, nor will they be allowed to merge. Please break this PR up into
smaller ones.

If you have reason to believe that this PR should be granted an exception, please see the
Submitting pull requests for approval - FAQ.

File Summary

Files

  • lib/vets/collection.rb (+78/-0)

  • lib/vets/collections/finder.rb (+62/-0)

  • lib/vets/collections/pagination.rb (+41/-0)

  • spec/lib/vets/collection_spec.rb (+243/-0)

  • spec/lib/vets/collections/finder_spec.rb (+78/-0)

  • spec/lib/vets/collections/pagination_spec.rb (+47/-0)

    Note: We exclude files matching the following when considering PR size:

    *.csv, *.json, *.tsv, *.txt, *.md, Gemfile.lock, app/swagger, modules/mobile/docs, spec/fixtures/, spec/support/vcr_cassettes/, modules/mobile/spec/support/vcr_cassettes/, db/seeds, modules/vaos/app/docs, modules/meb_api/app/docs, modules/appeals_api/app/swagger/, *.bru, *.pdf
    

Big PRs are difficult to review, often become stale, and cause delays.

Generated by 🚫 Danger

@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection/main/main January 8, 2025 15:58 Inactive
* add finder class and spec

* complete finder class and spec

* adjust naming

* integrate finder with collection

* linting

* linting whitespace

* fix collection specs
@va-vfs-bot va-vfs-bot temporarily deployed to sjc-vets-collection/main/main January 10, 2025 14:22 Inactive
@stevenjcumming stevenjcumming marked this pull request as ready for review January 14, 2025 13:13
@stevenjcumming stevenjcumming requested a review from a team as a code owner January 14, 2025 13:13
@stevenjcumming
Copy link
Contributor Author

I'm putting this in draft until I can review with Eric

@stevenjcumming stevenjcumming marked this pull request as draft January 22, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants