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
docs: added code review guide #1397
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1397 +/- ##
==========================================
+ Coverage 83.33% 83.47% +0.13%
==========================================
Files 104 104
Lines 6860 6939 +79
==========================================
+ Hits 5717 5792 +75
- Misses 1143 1147 +4
Continue to review full report at Codecov.
|
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.
Some tiny feedback to improve legibility
.github/CODE_REVIEW_GUIDELINES.md
Outdated
- Add new unit & integration test if you add a new feature | ||
- Use pytest tmpdir fixture for temporary directories | ||
- Check test locally before pushing | ||
- If a `Flow()` needs to be built in the test and is not a test in the Flow module -> It belongs to integration test |
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.
- If a `Flow()` needs to be built in the test and is not a test in the Flow module -> It belongs to integration test | |
- If a `Flow()` needs to be built in the test and it's not a test in the Flow module, the test belongs under `/tests/integration`. |
.github/CODE_REVIEW_GUIDELINES.md
Outdated
|
||
**Interface segregation** | ||
|
||
Do not create lengthy interfaces, instead split them into smaller interfaces based on the functionality. The interface should not contain any dependencies (parameters), which are not required for the expected functionality. |
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.
Do not create lengthy interfaces, instead split them into smaller interfaces based on the functionality. The interface should not contain any dependencies (parameters), which are not required for the expected functionality. | |
Do not create lengthy interfaces. Instead split them into smaller interfaces based on the functionality. The interface should not contain any dependencies (parameters), which are not required for the expected functionality. |
.github/CODE_REVIEW_GUIDELINES.md
Outdated
|
||
**Dependency Injection** | ||
|
||
Do not hardcode the dependencies, instead inject them. |
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.
Do not hardcode the dependencies, instead inject them. | |
Do not hardcode the dependencies; instead inject them. |
CONTRIBUTING.md
Outdated
1. Fork the Jina repo and clone onto your computer. By default, `git` won't clone `jina/hub` as it is a submodule maintained at [`jina-ai/jina-hub`](https://github.com/jina-ai/jina-hub). Please follow [the steps](#check-out-jina-hub-submodule) for details. | ||
2. Create a [new branch](#naming-your-branch), for example `fix-jina-typo-1`. | ||
3. Work on this branch to do the fix/improvement. | ||
4. Commit the changes with the [correct commit style](#writing-your-commit-message). | ||
5. Make a pull request. | ||
6. Submit your pull request and wait for all checks to pass. | ||
7. Request reviews from one of [the code owners](.github/CODEOWNERS). | ||
8. Get a LGTM 👍 and PR gets merged. | ||
4. Check if your code changes follow the [code review guidelines](.github/CODE_REVIEW_GUIDELINES.md). | ||
5. Commit the changes with the [correct commit style](#writing-your-commit-message). | ||
6. Make a pull request. | ||
7. Submit your pull request and wait for all checks to pass. | ||
8. Request reviews from one of [the code owners](.github/CODEOWNERS). | ||
9. Get a LGTM 👍 and PR gets merged. |
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.
You can just write
1. First item
1. Second item
and you get automatic listing.
- First item
- Second item
So we avoid having changes to the numbering of the items after the one you add.
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.
Minor things
@@ -64,14 +64,14 @@ Right now we're working on a list of things we want help with and easy-to-fix bu | |||
|
|||
0. Associate your local git config with your github account. If this is your first time using git you can follow [the steps](#associate-with-github-account). |
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.
0. Associate your local git config with your github account. If this is your first time using git you can follow [the steps](#associate-with-github-account). | |
1. Associate your local git config with your github account. If this is your first time using git you can follow [the steps](#associate-with-github-account). |
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.
It was originally kept 0 and so I let it be to give special importance. The rest of the numbering is working fine.
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.
great work, only this line Do not merge PR without approval
. we can't do it without approval because the PR is blocked lol
.github/CODE_REVIEW_GUIDELINES.md
Outdated
@@ -13,13 +13,12 @@ | |||
- The scope of PR should be simple, unique and well-defined. PR should not contain unrelated changes | |||
- Approve PR only if you are sure about the scope | |||
- Be respectful and reply asap | |||
- Do not merge PR without approval | |||
- Avoid spending too much time on trivial changes | |||
- Avoid spending time on trivial changes |
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.
Too much was right; I think some minor style changes quickly add up to ugly code
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.
Didn't get you
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.
edited
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.
LGTM 👍
@hanxiao any feedback? Looks like GitHub waiting on you since you're code owner |
* docs: added code review guide
No description provided.