-
Notifications
You must be signed in to change notification settings - Fork 11
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
add TESTING.md #281
add TESTING.md #281
Conversation
Notes from discussion about TESTING.md:
|
WalkthroughThe changes made to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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: 0
🧹 Outside diff range and nitpick comments (4)
TESTING.md (4)
3-19
: LGTM! Minor suggestion for improvement.The background section effectively establishes the importance of testing in the context of scientific and clinical research. It provides a comprehensive list of benefits derived from software testing, which is valuable for setting the tone of the document.
Consider adding a comma after "in general" on line 7 for improved readability:
-While there is in general no silver +While there is, in general, no silver🧰 Tools
🪛 LanguageTool
[typographical] ~7-~7: Consider isolating this adverbial phrase with commas.
Context: ...nces of its correctness. While there is in general no silver bullet for assuring the corre...(IN_FACT_COMMA_2)
[uncategorized] ~9-~9: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...complex programs, software testing is a widely-adopted strategy for increasing software reliab...(HYPHENATED_LY_ADVERB_ADJECTIVE)
20-63
: Excellent section on psychological aspects. Minor wording suggestion.This section effectively addresses the psychological barriers to testing and illustrates the contrasting states of codebases with low and high test coverage. It provides valuable insights into the benefits of maintaining a well-tested codebase.
Consider removing the duplication of "Testing" on line 20:
-## Psychological Barriers to Effective Testing -Testing is often perceived to be a laborious chore, a consideration +## Psychological Barriers to Effective Testing +Testing is often perceived as a laborious chore, a consideration🧰 Tools
🪛 LanguageTool
[duplication] ~20-~20: Possible typo: you repeated a word
Context: ... ## Psychological Barriers to Effective Testing Testing is often perceived to be a laborious ch...(ENGLISH_WORD_REPEAT_RULE)
[style] ~34-~34: This phrase is redundant. Consider using “outside”.
Context: ...er module within Bystro, or a library outside of Bystro entirely. - Software, like any c...(OUTSIDE_OF)
86-103
: Balanced perspective on code coverage. Minor grammatical suggestion.This section provides a nuanced view of code coverage, effectively communicating its benefits while warning against over-reliance on coverage metrics. The discussion on the limitations of code coverage as a measure of test quality is particularly valuable.
Consider adding a comma after "however" on line 93 for improved readability:
-That, however is no +That, however, is no🧰 Tools
🪛 LanguageTool
[style] ~88-~88: Consider a shorter alternative to avoid wordiness.
Context: ...code in a module executed during tests, in order to set standards for testing. There is a ...(IN_ORDER_TO_PREMIUM)
[uncategorized] ~93-~93: Possible missing comma found.
Context: ...better than no assurance at all. That, however is no guarantee that the tests effectiv...(AI_HYDRA_LEO_MISSING_COMMA)
1-148
: Excellent introduction to testing practices. Consider addressing additional points.This TESTING.md document provides a comprehensive and well-structured guide to testing practices for the Bystro project. It effectively covers the psychological aspects of testing, practical considerations for writing tests, and specific advice for unit testing in Python.
The document successfully addresses the main PR objective of introducing a general testing philosophy and providing tactical considerations for writing effective unit tests. However, to fully address the comments from the PR discussion, consider the following additions:
- Include a section on the importance and role of manual testing alongside automated unit tests.
- Expand the document to cover testing considerations for programming languages other than Python, making it more broadly applicable to the entire project.
- Add examples of good and bad unit tests to illustrate best practices and common pitfalls.
These additions would further enhance the document's value as a comprehensive testing resource for the project.
Would you like assistance in drafting sections to address these additional points?
🧰 Tools
🪛 LanguageTool
[typographical] ~7-~7: Consider isolating this adverbial phrase with commas.
Context: ...nces of its correctness. While there is in general no silver bullet for assuring the corre...(IN_FACT_COMMA_2)
[uncategorized] ~9-~9: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...complex programs, software testing is a widely-adopted strategy for increasing software reliab...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[duplication] ~20-~20: Possible typo: you repeated a word
Context: ... ## Psychological Barriers to Effective Testing Testing is often perceived to be a laborious ch...(ENGLISH_WORD_REPEAT_RULE)
[style] ~34-~34: This phrase is redundant. Consider using “outside”.
Context: ...er module within Bystro, or a library outside of Bystro entirely. - Software, like any c...(OUTSIDE_OF)
[style] ~88-~88: Consider a shorter alternative to avoid wordiness.
Context: ...code in a module executed during tests, in order to set standards for testing. There is a ...(IN_ORDER_TO_PREMIUM)
[uncategorized] ~93-~93: Possible missing comma found.
Context: ...better than no assurance at all. That, however is no guarantee that the tests effectiv...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~125-~125: Consider a shorter alternative to avoid wordiness.
Context: ...world or doing more work than necessary in order to verify the property under test. If a t...(IN_ORDER_TO_PREMIUM)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- TESTING.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
TESTING.md
[typographical] ~7-~7: Consider isolating this adverbial phrase with commas.
Context: ...nces of its correctness. While there is in general no silver bullet for assuring the corre...(IN_FACT_COMMA_2)
[uncategorized] ~9-~9: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...complex programs, software testing is a widely-adopted strategy for increasing software reliab...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[duplication] ~20-~20: Possible typo: you repeated a word
Context: ... ## Psychological Barriers to Effective Testing Testing is often perceived to be a laborious ch...(ENGLISH_WORD_REPEAT_RULE)
[style] ~34-~34: This phrase is redundant. Consider using “outside”.
Context: ...er module within Bystro, or a library outside of Bystro entirely. - Software, like any c...(OUTSIDE_OF)
[style] ~88-~88: Consider a shorter alternative to avoid wordiness.
Context: ...code in a module executed during tests, in order to set standards for testing. There is a ...(IN_ORDER_TO_PREMIUM)
[uncategorized] ~93-~93: Possible missing comma found.
Context: ...better than no assurance at all. That, however is no guarantee that the tests effectiv...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~125-~125: Consider a shorter alternative to avoid wordiness.
Context: ...world or doing more work than necessary in order to verify the property under test. If a t...(IN_ORDER_TO_PREMIUM)
🔇 Additional comments (3)
TESTING.md (3)
66-85
: Well-structured guidelines for writing tests.This section provides clear and practical guidance on how to approach writing tests. The introduction of the "Beyonce Rule" offers a memorable principle for deciding what to test. The general considerations for unit tests are concise and highly relevant, emphasizing the importance of self-contained, deterministic, and fast tests.
106-141
: Practical guidance for unit testing in Python.This section provides valuable, project-specific advice on unit testing using pytest. The discussion on handling slow tests is particularly useful, offering both strategies for optimization and practical solutions like test marking. The inclusion of a code example for marking slow tests enhances the clarity of the guidance.
🧰 Tools
🪛 LanguageTool
[style] ~125-~125: Consider a shorter alternative to avoid wordiness.
Context: ...world or doing more work than necessary in order to verify the property under test. If a t...(IN_ORDER_TO_PREMIUM)
143-148
: Properly formatted footnote.The footnote is correctly formatted and provides a relevant reference to "Software Engineering at Google: Testing". This adds credibility to the document and offers readers a valuable resource for further reading.
Add document describing general testing philosophy and tactical considerations for writing effective unit tests.
Summary by CodeRabbit
TESTING.md
file, highlighting the importance of software testing for reliability in scientific and clinical research.pytest
.