|
1 | | -# sections |
| 1 | +Go to bottom for pull request template to complete |
2 | 2 |
|
3 | | -## Contribute to code quality and the future |
4 | | -- tests |
5 | | -- refactor |
6 | | -- reuseable code |
7 | | -- seperated |
8 | | -Links |
| 3 | +# Peer Review Guidance |
9 | 4 |
|
10 | | -## Contrribute to tooling |
11 | | -- AI |
| 5 | +## Who |
| 6 | +- everyone should get to be reviewed |
| 7 | +- everyone should get to review others |
| 8 | +- hierachyless |
12 | 9 |
|
13 | | -## Contribute to knowledge |
| 10 | +## What it should be |
| 11 | +- Collaborative :) :) |
| 12 | +- Opportunity to discuss interesting approaches |
| 13 | +- Share knowledge generally |
| 14 | +- Share knowledge specifically |
| 15 | + - this is the opportunity to see new functions that may be used in future tasks to save work |
| 16 | + - there may be an easier way of solving a specific problem |
| 17 | +- Celebrate work |
| 18 | +- Be supportive |
| 19 | +- Be seen |
| 20 | +- An excuse for a call and a cup of tea |
| 21 | +- If there is nothing to suggest you havent failed at doing a review, you dont have to find something, its just good work, so share that, or a picture of your cat |
| 22 | +- A gate, work needs to be interacted with, by a few ppl before going out, we are looking for done not perfect, suggestions and discussion will often result in things useful for next time and learning rather than a change. Sometimes work is needed but it is an additional task, or at this point it maybe even a refactor task for example bring two bits of work in line where they can now share logic. However, sometimes too you will agree to do an extra commit because a change is low effort high value, or required. (Be careful of tasks growing from being atomic at this point in the process.) |
| 23 | +- It can be nice practice for reviewers to tell the person who did the work they can now merge, its their work afterall. Some prefer people to just merge it for them. |
| 24 | + |
| 25 | +## What it shoudnt be |
| 26 | +- Unless requested linting is better done by AI or linters, no one likes their spelling, grammar etc picked up unless its requested |
| 27 | +- Aiming for perfection |
| 28 | +- an assessment |
| 29 | + |
| 30 | +Ofter PR becomes a waving-through excerise in teams because |
| 31 | +- its uncomfortable to make comments |
| 32 | +- the context isnt enough to understand the work |
| 33 | +- the task was too big to review easily |
| 34 | +- or peer reviewers see it as not their work but an extra |
| 35 | +And if this happens teams dont get the benefit of others practice, knowledge of areas theyve not written themselves, appreciation from someone who understands the work, and a natural slow unification/standardisation of approaches. So its important to make it an enjoyable priority. |
| 36 | + |
| 37 | +## refs |
| 38 | +[first google but its ok its tips on good peer reviews](https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/) |
| 39 | + |
| 40 | + |
| 41 | +# Pull Request Guidance |
| 42 | +- You can open pull requests as drafts if you like |
| 43 | + |
| 44 | +## Good things to do before a pull request |
| 45 | +These are not expectations, as the process become more practiced we will learn what should happen most times and what shouldnt. It is a way of having a joint concept of "good". And as a joint concept this doc should be changed overtime. (If it isnt then it will be because it failed). |
| 46 | + |
| 47 | +### Sanity Checks |
| 48 | +These ar not show stoppers just good to check |
| 49 | +- checked commit names (some ppl like to squash commits to tidy them up but most dont) |
| 50 | + - commit per thing done |
| 51 | + - commit naming convention followed |
| 52 | +- branch correctly named |
| 53 | +- searched for any personal codes you use to leave notes for yourself when developing e.g. "zzzz" to help you tidy up |
| 54 | + |
| 55 | +### Contribute to code quality and the future |
| 56 | +- lint (Run_lint targeted files and make improvements) |
| 57 | +- tests (Run tests in dbx, write test) |
| 58 | +- refactor (Can code be made more reuseable, testable) |
| 59 | +- reuseable (Could you reuse existing code or refactor it to be reuseable) |
| 60 | + |
| 61 | +### Contribute to tooling |
| 62 | +- AI (add to dbx global, your dbx user name area, or github, context instruction md e.g preference in responses, recommendation it should or shouldnt make or providing context for files it doesnt understand) |
| 63 | +- Turned exploratory code you have ran into labeled notebooks to share so others can easily run the same explorations |
| 64 | +- Turned exploratory code you have ran into manual tests other developers can run |
| 65 | + |
| 66 | +### Contribute to knowledge |
14 | 67 | - comments in code |
15 | 68 | - comments in jira task |
16 | 69 | - documentation in project |
17 | | -- documentation in confluence |
18 | 70 | - discussion in pr |
19 | 71 |
|
20 | | -## Next steps |
21 | | -- any tasks need creating from discussion |
| 72 | +### Contribute to planning |
| 73 | +- if this task highlighted a need for any task to be created please make these recommendations or open discussions |
| 74 | + |
| 75 | + |
| 76 | +# Pull Request Form (Please Complete) |
| 77 | +*based on https://github.com/TechnologyEnhancedLearning/LearningHub.Nhs.WebUI/blob/master/.github/pull_request_template.md?plain=1* |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | +## JIRA link |
| 82 | +Change this to the jira link to help your reviewers |
| 83 | +[TD-####](https://hee-tis.atlassian.net/browse/TD-####) |
| 84 | + |
| 85 | +## Description |
| 86 | +_Describe what has changed and how that will affect the app. If relevant, add links to any sources/documentation you used. Highlight anything unusual and give people context around particular decisions._ |
| 87 | + |
| 88 | +## Screenshots |
| 89 | +_Paste Screen Shots Here (This can be useful sometimes but is more useful for WebUI its totally optional.)_ |
| 90 | + |
| 91 | +## Checklists |
| 92 | + |
| 93 | +### Checklist for the Author |
| 94 | + |
| 95 | +This check list is to help you and your peer reviewers have a shared context. |
| 96 | + |
| 97 | +It is not an expectation that everything will be ticked or even most, but a useful prompt if for example a review thinks unit-tests would of been useful, which is a comment that would be in the main comments rather than a comment on the file changes tab. |
| 98 | + |
| 99 | +Peer reviewers should not fail based on this list, it is agile, we are looking for done. |
| 100 | +Recommendation may be for future practice, for future refactor tasks, or just good to know. Some may be to refactor somework as part of this ticket. For example maybe a function already existed that does what your doing and there is low effort high benefit to using it instead. Then you would discus, agree to do another commit, make the changes and push. |
| 101 | + |
| 102 | +*Put xs in them so they appear ticked in preview [x]* |
| 103 | +- [ ] Checked files changed are the right ones, and they are changing the right things |
| 104 | +- [ ] Checked the code by running tests or exploratory code |
| 105 | +- [ ] Created Unit Tests |
| 106 | +- [ ] Created Integration Tests |
| 107 | +- [ ] Created Data Quality Tests |
| 108 | +- [ ] Run tests in databricks in my user area |
| 109 | +- [ ] Used Spark Expect |
| 110 | +- [ ] Update my Jira ticket with useful context notes for testers |
| 111 | +- [ ] Documented Work |
| 112 | +- [ ] Recommended Jira tickets to the relevant person from needs emerging from this work |
| 113 | +- [ ] Thanked testers and reviewers :) |
| 114 | + |
22 | 115 |
|
23 | | -# TODO QQQQ |
| 116 | +### Checklist for Peer Reviewer(s) |
| 117 | +*there may be many peer reviewers but this is to ensure at least one person has ticked the boxes* |
| 118 | +- [ ] Considered if additional tests needed |
| 119 | +- [ ] Commented on individual files |
| 120 | +- [ ] Commented in general PR |
| 121 | +- [ ] Asked curious questions/offered alternative approaches |
| 122 | +- [ ] Given praise (if its going to merge its worth praise) |
| 123 | +- [ ] Offered to document or request tasks for any areas identified in discussions from the work |
| 124 | +- [ ] Agreed additional commits/Approved and let author know |
| 125 | +- [ ] Added any additional insight to the jira ticket for the testers |
24 | 126 |
|
25 | | -[example from lh](https://github.com/TechnologyEnhancedLearning/LearningHub.Nhs.WebUI/blob/master/.github/pull_request_template.md) |
26 | | -- updating ai files |
27 | | -- look at changed files click the ai star icon top right, ask it to code review locally |
28 | | - - (can i point it at the global instructions?) |
|
0 commit comments