-
Notifications
You must be signed in to change notification settings - Fork 13
Add test for markdown emoji encoding #43
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
base: main
Are you sure you want to change the base?
Add test for markdown emoji encoding #43
Conversation
Learn moreAll Green is an AI agent that automatically: ✅ Addresses code review comments ✅ Fixes failing CI checks ✅ Resolves merge conflicts |
|
Warning Rate limit exceeded@Jagriti-student has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 2 minutes and 24 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
WalkthroughUpdates a test file with minor formatting and trailing-comma adjustments; preserves test behavior (emoji/UTF-8 assertions). Modifies project deps in Changes
Sequence Diagram(s)(omitted — changes are test formatting and dependency edits without new multi-component control flow) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 3
🧹 Nitpick comments (1)
tests/test_reporting.py (1)
30-31: Consider explicitly asserting successful encoding.The UTF-8 encoding check on line 31 will raise an exception if encoding fails, which is good. However, for clarity and better test output, consider capturing and asserting explicitly:
🔎 Suggested improvement:
- # UTF-8 safety check (important for Windows) - markdown.encode("utf-8") + # UTF-8 safety check (important for Windows) + encoded = markdown.encode("utf-8") + assert len(encoded) > 0, "Markdown should encode to non-empty UTF-8 bytes"
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
README.md(1 hunks)src/agentunit/adapters/base.py(1 hunks)src/agentunit/core/__init__.py(1 hunks)src/agentunit/core/exceptions.py(1 hunks)src/agentunit/core/replay.py(2 hunks)src/agentunit/core/runner.py(1 hunks)src/agentunit/core/scenario.py(4 hunks)src/agentunit/core/trace.py(3 hunks)src/agentunit/py.typed(0 hunks)tests/test_reporting.py(1 hunks)
💤 Files with no reviewable changes (1)
- src/agentunit/py.typed
🧰 Additional context used
🧬 Code graph analysis (1)
src/agentunit/adapters/base.py (3)
tests/test_runner.py (2)
execute(30-38)cleanup(40-41)src/agentunit/datasets/base.py (1)
DatasetCase(19-27)src/agentunit/core/trace.py (1)
TraceLog(26-78)
⏰ 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). (3)
- GitHub Check: Test (Python 3.10)
- GitHub Check: Test (Python 3.10)
- GitHub Check: Test (Python 3.12)
🔇 Additional comments (10)
src/agentunit/core/exceptions.py (1)
1-23: LGTM: Docstring formatting improvements.The conversion from single-line to multi-line docstrings improves consistency across the codebase. No functional changes.
src/agentunit/core/runner.py (1)
1-3: LGTM: Docstring formatting improvement.Consistent with the broader PR effort to standardize multi-line docstrings.
src/agentunit/core/__init__.py (1)
1-3: LGTM: Docstring formatting improvement.Maintains consistency with other core modules.
src/agentunit/core/trace.py (1)
1-29: LGTM: Docstring formatting improvements.Consistent multi-line docstring formatting applied to module, TraceEvent, and TraceLog classes.
src/agentunit/core/replay.py (1)
1-15: LGTM: Docstring formatting improvements.Consistent multi-line formatting applied to module and function docstrings.
src/agentunit/core/scenario.py (1)
1-102: LGTM: Docstring formatting improvements.Consistent multi-line docstring formatting applied to the module, Scenario class, and factory methods (from_crewai, from_autogen).
README.md (1)
206-220: The "Running CI Checks Locally" section appears only once in README.md (line 206). No duplication exists.Likely an incorrect or invalid review comment.
src/agentunit/adapters/base.py (3)
35-42: ✅ Clear documentation for lazy initialization.The expanded
prepare()docstring effectively communicates the purpose and return type. The mention of resources (graphs, flows) provides concrete context for implementers.
46-55: ✅ Proper parameter and return documentation.The
execute()docstring now includes well-structured Args and Returns sections that clearly document the expected inputs and output type, improving API clarity for subclass implementations.
58-66: ✅ Helpful cleanup documentation.The added docstring for
cleanup()provides useful context about resource release with concrete examples (temporary files, servers), which helps future maintainers understand when and why to override this hook.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Signed-off-by: Jagriti-student <jagriti7989@gmail.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: 1
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (1)
pyproject.toml
Signed-off-by: Jagriti-student <jagriti7989@gmail.com>
Signed-off-by: Jagriti-student <jagriti7989@gmail.com>
Signed-off-by: Jagriti-student <jagriti7989@gmail.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: 1
🤖 Fix all issues with AI agents
In @pyproject.toml:
- Line 37: The CI fails because pyproject.toml was changed (jsonschema optional
version updated) but poetry.lock is stale; run the lock regeneration command
(poetry lock --no-update) to regenerate poetry.lock, verify the updated
poetry.lock is added to git, commit the updated poetry.lock alongside the
pyproject.toml change, and push so the pipeline uses the synchronized lock file.
🧹 Nitpick comments (1)
pyproject.toml (1)
41-43: Consider adding jsonschema to an extras group for discoverability.While jsonschema is now correctly marked optional, it's not included in any
[tool.poetry.extras]group. Users cannot explicitly install it viapoetry install -E <group>. Consider adding it for consistency withragasandlanggraph.📦 Suggested extras group addition
[tool.poetry.extras] ragas = ["ragas"] +jsonschema = ["jsonschema"] integration-tests = ["langgraph"]Alternatively, if jsonschema is primarily for validation features, you could group it semantically:
[tool.poetry.extras] ragas = ["ragas"] +validation = ["jsonschema"] integration-tests = ["langgraph"]
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
pyproject.tomltests/test_reporting.py
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/test_reporting.py
🧰 Additional context used
🪛 GitHub Actions: CI
pyproject.toml
[error] 1-1: Failed during 'poetry install --with dev': pyproject.toml changed significantly since poetry.lock was last generated. Run 'poetry lock' to fix the lock file.
🔇 Additional comments (1)
pyproject.toml (1)
37-37: Good fix—jsonschema is now correctly marked optional.This change addresses the previous review concern by aligning the dependency declaration with how
validator.pyuses jsonschema (via try-except withHAS_JSONSCHEMA). The optional flag now matches the graceful fallback pattern in the code.
pyproject.toml
Outdated
| scipy = "^1.11.0" | ||
| ragas = { version = ">=0.1.9", optional = true } | ||
| jsonschema = "^4.25.1" | ||
| jsonschema = { version = "^4.25.1", optional = true } |
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.
Regenerate poetry.lock to fix pipeline failure.
The CI pipeline is failing because pyproject.toml has changed but poetry.lock is out of sync. Run poetry lock to update the lock file and commit the changes.
#!/bin/bash
# Command to regenerate the lock file
poetry lock --no-update🤖 Prompt for AI Agents
In @pyproject.toml at line 37, The CI fails because pyproject.toml was changed
(jsonschema optional version updated) but poetry.lock is stale; run the lock
regeneration command (poetry lock --no-update) to regenerate poetry.lock, verify
the updated poetry.lock is added to git, commit the updated poetry.lock
alongside the pyproject.toml change, and push so the pipeline uses the
synchronized lock 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: 2
🤖 Fix all issues with AI agents
In @pyproject.toml:
- Around line 38-41: Remove the Git merge conflict markers (<<<<<<< HEAD,
=======, >>>>>>>) from the pyproject.toml snippet and keep only a single, valid
dependency declaration for jsonschema (i.e., delete the conflict markers and one
of the duplicate jsonschema lines so there is exactly one jsonschema = "^4.25.1"
entry); ensure the resulting TOML is syntactically valid so Poetry can parse it.
- Line 35: Resolve the merge conflict in pyproject.toml by removing the
duplicate jsonschema declaration inside the merge conflict block and leaving
only one jsonschema entry alongside the existing scipy = "^1.11.0"; specifically
remove the jsonschema line within the conflict block so the final file contains
a single jsonschema and a single scipy entry, then update the PR description to
explain why scipy and jsonschema were added (or remove them if not needed for
this PR) and note that test_markdown_contains_emojis does not require these
dependencies.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (2)
pyproject.tomltests/test_reporting.py
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/test_reporting.py
⏰ 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: Test (Python 3.10)
|
I have solve the issue. |

closes #15
Summary by CodeRabbit
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.