Browse Source

Added tests section to CONTRIBUTING.md

Matthias Reso 1 year ago
parent
commit
d5dc98c153
1 changed files with 13 additions and 1 deletions
  1. 13 1
      CONTRIBUTING.md

+ 13 - 1
CONTRIBUTING.md

@@ -28,4 +28,16 @@ outlined on that page and do not file a public issue.
 
 
 ## License
 ## License
 By contributing to llama-recipes, you agree that your contributions will be licensed
 By contributing to llama-recipes, you agree that your contributions will be licensed
-under the LICENSE file in the root directory of this source tree.
+under the LICENSE file in the root directory of this source tree.
+
+## Tests
+Llama-recipes currently comes with a basic set of unit tests but we strive to increase our test coverage in the future in order to mitigate silent errors.
+When submitting a new feature PR please make sure to cover the newly added code with a unit test.
+We use **pytest** for our unit tests and to run them locally you need to install llama-recipes with optional [tests] dependencies enabled:
+```
+pip install --extra-index-url https://download.pytorch.org/whl/test/cu118 llama-recipes[tests]
+```
+The unit tests can be found in the [tests](./tests/) folder and you can run them from the main directory using:
+```
+python -m pytest tests/
+```