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

Added option to include endpoint details #62

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

alex-gts
Copy link

Allows for setting if full endpoint details are returned, and fixes a bug where endpoint details weren't returned when retrieving results from cache.

@Shutgun
Copy link
Collaborator

Shutgun commented Nov 21, 2024

Hi @alex-gts , the more I think about it, I guess it was not intended to hide the endpoint details. Am I right that by adding

all="done",

as line 77 the issue is fixed? By reading the API docs and doing some tests I didn't find any reason to use off on the high level. And if it really is that easy, I guess I would also strip the include_details parameter.

@alex-gts
Copy link
Author

Hi @Shutgun,

The only reason I added it in is that not requesting full details could be quicker. Therefore, if someone was optimising for speed they could omit the slower, more detailed report.

This is why I added the extra check at line 86, so that you can choose to not return details, extending the existing functionality that returned full details regardless.

It is fully backward compatible, and so having the extra parameter poses no risk to existing implementations.

That said, it does not directly affect my use case and so my issue would be fixed by just all="done" as you mentioned.

@Shutgun
Copy link
Collaborator

Shutgun commented Nov 25, 2024

I made a few (to be honest not many) tests on the performance and I don't think it makes any difference. To keep the code simple: could you change the PR to just adding the all parameter?

@Shutgun
Copy link
Collaborator

Shutgun commented Nov 25, 2024

The test failure in unrelated and comes from a change in behavior of pytest-httpx. Don't worry about that.

@alex-gts
Copy link
Author

All done, I've removed the include_details parameter.

The only change now is the addition of all="done" at line 77.

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.

2 participants