Skip to content

Conversation

@jentyk
Copy link
Contributor

@jentyk jentyk commented Dec 8, 2025

Summary by CodeRabbit

  • New Features
    • Extended RQL list operators to accept sets as parameter values in addition to lists and tuples, offering increased flexibility when constructing queries.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 8, 2025

Walkthrough

The RQL query builder's list-operator value handling now accepts sets in addition to lists and tuples. Type checking for constants.LIST operators was expanded to recognize set types, causing set values to be joined with commas during encoding, matching the existing behavior for lists and tuples.

Changes

Cohort / File(s) Summary
RQL Type Support Expansion
mpt_api_client/rql/query_builder.py
Expanded type check for list-operator values to include set alongside list and tuple in constants.LIST handling

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single, localized change to a type check condition
  • No signature changes or error message modifications
  • No control flow alterations or functional dependencies affected

Poem

🐰 Sets now join the list-op crew,
Tuples, lists, and sets ring true,
Comma-joined with grace so neat,
RQL queries now complete!

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding support for the set type in the query builder operator handling, which matches the file changes in mpt_api_client/rql/query_builder.py.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/allow-set

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

Warnings
⚠️ PR title must include exactly one Jira issue key in the format MPT-XXXX.
⚠️

This PR modifies code (1 file(s)) but does not include any changes in the tests/ folder.

Please consider adding or updating tests to cover your changes.

Generated by 🚫 dangerJS against d625766

Copy link

@coderabbitai coderabbitai bot left a 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

🧹 Nitpick comments (1)
mpt_api_client/rql/query_builder.py (1)

107-112: Set support in rql_encode looks good; consider docs and ordering implications.

The updated type check to accept set alongside list/tuple for constants.LIST operators matches the PR goal and is functionally correct. A couple of small follow‑ups you may want to consider:

  • The rql_encode docstring and Args description still only mention “list/tuple”. It would be clearer to explicitly document that set is also accepted for list operators.
  • Joining a set with ",".join(value) makes the encoded string’s element order non‑deterministic, which is fine semantically for in/out, but might surprise callers or tests that assert on the exact string. If deterministic output matters, you could optionally normalize sets before joining (e.g., by sorting or documenting that order is undefined for sets).

No blocking issues here; these are minor polish/behavior‑clarity suggestions around the new set support.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3c15f02 and d625766.

📒 Files selected for processing (1)
  • mpt_api_client/rql/query_builder.py (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

@jentyk jentyk merged commit bb022a9 into main Dec 9, 2025
6 checks passed
@jentyk jentyk deleted the feat/allow-set branch December 9, 2025 11:35
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.

4 participants