Skip to content

Refactor Backend.fetch to centralize logic#848

Open
vchrombie wants to merge 1 commit intochaoss:mainfrom
vchrombie:527-simply-fetch-and-fetch_items
Open

Refactor Backend.fetch to centralize logic#848
vchrombie wants to merge 1 commit intochaoss:mainfrom
vchrombie:527-simply-fetch-and-fetch_items

Conversation

@vchrombie
Copy link
Copy Markdown
Member

@vchrombie vchrombie commented Aug 28, 2024

Fixes #527

I trying an attempt to solve this issue. I picked the Gitter backend to get started and see get some feedback on the changes. I will be working on rest of the backends one by one. I am sure this is going to be a huge PR, so I will take some time and add a backend each time allowing time for reviewing.

Let me know if you have any suggestions.

@vchrombie vchrombie marked this pull request as draft August 28, 2024 03:57
@vchrombie vchrombie force-pushed the 527-simply-fetch-and-fetch_items branch 6 times, most recently from f9e99f1 to 529c9ab Compare September 3, 2024 19:45
@sduenas
Copy link
Copy Markdown
Member

sduenas commented Sep 20, 2024

I saw two weeks ago some code to change this problem but I don't see it now. Any issues with it? Is there any way I can help?

@vchrombie vchrombie force-pushed the 527-simply-fetch-and-fetch_items branch from 529c9ab to 921f269 Compare December 28, 2025 17:28
@vchrombie
Copy link
Copy Markdown
Member Author

vchrombie commented Dec 28, 2025

I am taking a stab at this again, will fix the linting issues and remove the changes to tests.

@vchrombie vchrombie force-pushed the 527-simply-fetch-and-fetch_items branch from 921f269 to 5c5025e Compare December 28, 2025 23:07
@vchrombie vchrombie marked this pull request as ready for review December 28, 2025 23:13
@vchrombie vchrombie force-pushed the 527-simply-fetch-and-fetch_items branch from 5c5025e to fbbab39 Compare December 28, 2025 23:15
Refactor `Backend.fetch` to support `**kwargs` and delegate directly to
`fetch_items()`. This removes the need for subclasses to override `fetch()`
solely for parameter passing. Updated 30+ backends to handle default parameters
(like `from_date`, `offset`) within `fetch_items()` instead of `fetch()`.

Signed-off-by: Venu Vardhan Reddy Tekula <venuvrtekula@gmail.com>
@vchrombie vchrombie force-pushed the 527-simply-fetch-and-fetch_items branch from fbbab39 to 7c0fa18 Compare December 28, 2025 23:16
@vchrombie vchrombie changed the title Simplify fetch() and fetch_items() in the backends Refactor Backend.fetch to centralize logic Dec 28, 2025
@vchrombie
Copy link
Copy Markdown
Member Author

@sduenas, could you please take a chance to review this approach? What do you think, let me know if you have any suggestions.

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.

Simplify fetch() and fetch_items()

2 participants