-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: removed dataegap and test searchby keyword #56
Conversation
WalkthroughThe pull request removes the Changes
Possibly related PRs
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (2)
pridepy/pridepy.py (2)
238-239
: Fix the mismatch between function signature and implementation.The
date_gap
parameter is present in the function signature but not used in the implementation.Apply this diff to fix the signature:
-def search_projects_by_keywords_and_filters( - keyword, filter, page_size, page, date_gap, sort_direction, sort_fields -): +def search_projects_by_keywords_and_filters( + keyword, filter, page_size, page, sort_direction, sort_fields +):Also applies to: 246-248
56-57
: Fix inconsistency in default bandwidth values.The default bandwidth value in the function signatures (50M) doesn't match the
@click.option
default value and help text (100M).Apply this diff to fix the inconsistency:
- aspera_maximum_bandwidth: str = "50M", + aspera_maximum_bandwidth: str = "100M",Also applies to: 132-133
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
pridepy/pridepy.py
(1 hunks)pridepy/project/project.py
(0 hunks)pridepy/tests/test_search.py
(1 hunks)
💤 Files with no reviewable changes (1)
- pridepy/project/project.py
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
pridepy/tests/test_search.py (1)
23-26
:⚠️ Potential issueFix syntax errors and approve test improvements.
The test logic improvements make the test more robust and maintainable. However, there are syntax errors in the assertions that need to be fixed.
- assert len(result) == 2 - # Verify that search returns at least one result and contains the expected project - assert len(result) > 0, "Search should return at least one result" - assert any(r["accession"] == "PXD009476" for r in result), "Search should return the queried project" + # Verify that search returns at least one result and contains the expected project + self.assertGreater(len(result), 0, "Search should return at least one result") + self.assertTrue( + any(r["accession"] == "PXD009476" for r in result), + "Search should return the queried project" + )🧰 Tools
🪛 Ruff (0.8.2)
23-23: SyntaxError: Expected an identifier, but found a keyword 'assert' that cannot be used here
23-23: SyntaxError: Simple statements must be separated by newlines or semicolons
24-25: SyntaxError: Expected an expression
25-25: SyntaxError: Expected an identifier, but found a keyword 'assert' that cannot be used here
25-25: SyntaxError: Simple statements must be separated by newlines or semicolons
26-26: SyntaxError: Expected an identifier, but found a keyword 'assert' that cannot be used here
26-26: SyntaxError: Simple statements must be separated by newlines or semicolons
🪛 GitHub Actions: Python application
[error] 23-23: SyntaxError: invalid syntax
🪛 GitHub Actions: Python package
[error] 23-23: SyntaxError: invalid syntax
🧹 Nitpick comments (1)
pridepy/tests/test_search.py (1)
20-22
: Fix formatting for better readability.The method call parameters could be formatted more consistently:
- result = project.search_by_keywords_and_filters(keyword="PXD009476",query_filter="", - page_size=100,page=0 , sort_direction="DESC", - sort_fields="accession") + result = project.search_by_keywords_and_filters( + keyword="PXD009476", + query_filter="", + page_size=100, + page=0, + sort_direction="DESC", + sort_fields="accession" + )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pridepy/tests/test_search.py
(1 hunks)
🧰 Additional context used
🪛 Ruff (0.8.2)
pridepy/tests/test_search.py
23-23: SyntaxError: Expected an identifier, but found a keyword 'assert' that cannot be used here
23-23: SyntaxError: Simple statements must be separated by newlines or semicolons
24-25: SyntaxError: Expected an expression
25-25: SyntaxError: Expected an identifier, but found a keyword 'assert' that cannot be used here
25-25: SyntaxError: Simple statements must be separated by newlines or semicolons
26-26: SyntaxError: Expected an identifier, but found a keyword 'assert' that cannot be used here
26-26: SyntaxError: Simple statements must be separated by newlines or semicolons
🪛 GitHub Actions: Python application
pridepy/tests/test_search.py
[error] 23-23: SyntaxError: invalid syntax
🪛 GitHub Actions: Python package
pridepy/tests/test_search.py
[error] 23-23: SyntaxError: invalid syntax
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
Summary by CodeRabbit