diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 151d35796..b626b1227 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,7 @@ **Motivation and context** (Tag any relevant issues or discussions with #, or write a brief explanation of why you are making this PR) - + **Screenshots** (Paste or upload any relevant screenshots) @@ -13,6 +13,4 @@ **Checklist** - [ ] I have read and followed the [CONTRIBUTING](https://github.com/ElixirTeSS/TeSS/blob/master/CONTRIBUTING.md) guide. -- [ ] I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree - to license it to the TeSS codebase under the - [BSD license](https://github.com/ElixirTeSS/TeSS/blob/master/LICENSE). +- [ ] I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the [BSD license](https://github.com/ElixirTeSS/TeSS/blob/master/LICENSE). diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index df26ae872..7c4acc61c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,9 @@ + # Contributing to TeSS While TeSS was originally developed to serve as the training portal for [ELIXIR](https://www.elixir-europe.org/), it endeavours to be a generic training platform that can be easily customized and re-used in other communities. To that end we welcome and encourage new contributors to get involved and help to shape and improve TeSS. This document discusses and explains different ways you can contribute to TeSS. +You can find a code checklist at the end of this document to summarize the important points. ### TeSS Club @@ -116,8 +118,15 @@ or if using docker: docker compose run test ``` +or for a specific test +``` +docker compose run --remove-orphans test rails test test/ +``` + You can also see the test coverage % after the tests finish - make sure it has not decreased from before adding your code. +Please setup your local IDE to see the test coverage of your code (e.g., Coverage Gutters in VSCode) – as said before, a pushed code should be close to 100% test coverage. + ### Commit Meaningfully Make sure your commits contain meaningful and related changes, and a commit message describing the change. @@ -135,6 +144,13 @@ Make sure that your feature branch is pushed to your fork of TeSS on GitHub and - Why the changes were made, with links to any relevant issues or discussions. - If appropriate, screenshots of the changes, or instructions on how the changes can be tried out. +Other points to be aware of to ease the reviewer's work: + +- Review your own code +- Add context to smaller changes +- Highlight important parts +- Ask specific questions if needed + Also be sure to select the branch of TeSS where you want the changes to be merged back into, and if your contribution is a work-in-progress, flag the pull request as being a "Draft" (Click the arrow next to the "Create Pull Request" button). Your pull request should trigger a build that can be monitored on our [actions](https://github.com/ElixirTeSS/TeSS/actions) page. The core TeSS development team will also be notified, and a member of the team will review your Pull Request in a timely manner. @@ -154,6 +170,18 @@ TeSS has various levels of documentation that can also be contributed to: Small changes can be made directly in GitHub. Simply open the relevant file, click the pencil icon to edit, make your change, and click the "Proprose changes" button - GitHub will automatically create a fork, a feature branch and a pull request for you. +# Code contribution checklist + +- [ ] I agree to redistribute my work under [our BSD 3-Clause licence](LICENSE) +- [ ] I followed the [Code of Conduct](CODE_OF_CONDUCT.md) +- [ ] Issue is opened or I commented on an existing one +- [ ] I followed [Ruby Style Guide](https://github.com/rubocop/ruby-style-guide) +- [ ] Commits are meaningful +- [ ] Changes are covered by tests +- [ ] There is clear logging and error handling +- [ ] Documentation is updated +- [ ] I advertised my contribution in the [TeSS Club meetings](https://elixirtess.github.io/about/) + # Thank You Thank you for considering contributing to TeSS.