docs: Add prescriptive testing strategy guide#278
docs: Add prescriptive testing strategy guide#278PredictiveManish wants to merge 2 commits intoopenml:mainfrom
Conversation
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The unit test example for
flow_existsstill depends on anexpdb_testfixture and patches the DB layer, which blurs the line between unit and DB tests; consider adjusting the example to avoid a DB fixture entirely so it better illustrates a pure unit test pattern. - There’s some potential confusion between
py_apias a fixture and thehttpx.AsyncClient/“FastAPI TestClient” terminology used in the text and tables; aligning the naming in examples, the fixtures reference, and the performance section would make it clearer which concrete fixture the ~60ms overhead refers to. - In the
persisted_flowfixture example you show manualcommit/rollbackwith a# Cleanup...comment; it might help to either show an explicit cleanup step (e.g. delete query) or briefly note that this is schematic so readers don’t copy an incomplete pattern into real fixtures.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The unit test example for `flow_exists` still depends on an `expdb_test` fixture and patches the DB layer, which blurs the line between unit and DB tests; consider adjusting the example to avoid a DB fixture entirely so it better illustrates a pure unit test pattern.
- There’s some potential confusion between `py_api` as a fixture and the `httpx.AsyncClient`/“FastAPI TestClient” terminology used in the text and tables; aligning the naming in examples, the fixtures reference, and the performance section would make it clearer which concrete fixture the ~60ms overhead refers to.
- In the `persisted_flow` fixture example you show manual `commit`/`rollback` with a `# Cleanup...` comment; it might help to either show an explicit cleanup step (e.g. delete query) or briefly note that this is schematic so readers don’t copy an incomplete pattern into real fixtures.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
WalkthroughThe pull request updates 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 Tip CodeRabbit can generate a title for your PR based on the changes with custom instructions.Set the |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/contributing/tests.md (1)
182-188: Clarify the test execution command comment.The comment on line 187 says "Run all tests including migration" but the command
pytest -m "mut"only runs tests marked withmut(migration tests), not all tests.📝 Suggested clarification
# Run only fast tests locally pytest -m "not mut" -# Run all tests including migration +# Run only migration tests pytest -m "mut"Or if you want to document running all tests:
# Run only fast tests locally pytest -m "not mut" -# Run all tests including migration +# Run only migration tests pytest -m "mut" + +# Run all tests (fast + migration) +pytest🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/contributing/tests.md` around lines 182 - 188, Update the misleading comment: clarify that pytest -m "not mut" runs fast/non-migration tests and pytest -m "mut" runs only tests marked with the mut marker (migration tests), and optionally add the explicit command to run all tests (pytest) so readers aren't misled by the current "Run all tests including migration" phrasing.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@docs/contributing/tests.md`:
- Around line 182-188: Update the misleading comment: clarify that pytest -m
"not mut" runs fast/non-migration tests and pytest -m "mut" runs only tests
marked with the mut marker (migration tests), and optionally add the explicit
command to run all tests (pytest) so readers aren't misled by the current "Run
all tests including migration" phrasing.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: c91ec3ec-dc4b-4a0a-886b-4e98fcc91444
📒 Files selected for processing (1)
docs/contributing/tests.md
Summary
Updates
docs/contributing/tests.mdwith a clear, prescriptive testing strategy for the OpenML server API project.Fixes #169
Changes
persist=TrueTesting
Related
This addresses review feedback from a previous PR attempt #256.