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

Making search document subscriptable #2615

Merged
merged 13 commits into from Mar 15, 2023

Conversation

aksinha334
Copy link
Contributor

@aksinha334 aksinha334 commented Mar 14, 2023

Pull Request check-list

Please make sure to review and check all of these items:

  • Does $ tox pass with this change (including linting)?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Please provide a description of the change here.
[Fixed issue #2598 - make Document class subscriptable]

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 ⚠️

Comparison is base (a372ba4) 92.28% compared to head (b3fb5f9) 92.28%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2615      +/-   ##
==========================================
- Coverage   92.28%   92.28%   -0.01%     
==========================================
  Files         115      115              
  Lines       29754    29759       +5     
==========================================
+ Hits        27458    27462       +4     
- Misses       2296     2297       +1     
Impacted Files Coverage Δ
redis/commands/search/document.py 90.90% <100.00%> (+3.40%) ⬆️
tests/test_search.py 99.16% <100.00%> (+<0.01%) ⬆️

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aksinha334
Copy link
Contributor Author

Hi @dvora-h , any idea how to re-run the checks, I think it's failing for some other reason.

@aksinha334
Copy link
Contributor Author

image

Checks are failing which is unrelated to PR changes.

@chayim , can you check this once.

@dvora-h
Copy link
Collaborator

dvora-h commented Mar 15, 2023

@aksinha334 Thanks for contributing this feature! Can you please add a test for it?

@chayim chayim added the feature New feature label Mar 15, 2023
@chayim chayim changed the title Fixed issue #2598 - make Document class subscriptable Making search document subscriptable Mar 15, 2023
@aksinha334 aksinha334 force-pushed the usr/aksinha334/redis-py#issue2598 branch from 948a142 to 39bfa18 Compare March 15, 2023 16:12
davemcphee and others added 9 commits March 15, 2023 21:51
* update json().arrindex() default values

* add unit test

* fix falsy checks

* more unit tests

* add asyncio tests

* fix lint line length

---------

Co-authored-by: Alex Schmitz <aschmitz@box.com>
* speeding up the protocol parser

* linting

* changes to ease
Co-authored-by: dvora-h <67596500+dvora-h@users.noreply.github.com>
* update return type of smismember

* use Literal instead of int
@aksinha334
Copy link
Contributor Author

image

Hi @dvora-h @chayim , again check is failing on unrelated changes of PR, now failing in redis/asyncio/client.py line 463.

I've also added test of this PR. Can you please check for failure and review PR.

from redis.commands.search.result import Result --> returns Document class, so I have simply did subscriptable on that.

Sorry for long commit, I had to rebase, still learning.

@aksinha334
Copy link
Contributor Author

aksinha334 commented Mar 15, 2023

Hi @dvora-h , check has been passed and test has been added for this PR. Can you please review the PR?

@dvora-h dvora-h merged commit 8bfd492 into redis:master Mar 15, 2023
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants