Skip to content

Commit 81619fa

Browse files
Lattayshyuep
andauthored
doc: explicit the testing procedure (#4124)
Co-authored-by: Shyue Ping Ong <[email protected]>
1 parent ed8542d commit 81619fa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ For developers interested in expanding `pymatgen` for their own purposes, we rec
6969
Given that `pymatgen` is intended to be a long-term code base, we adopt very strict quality control and coding guidelines for all contributions to `pymatgen`. The following must be satisfied for your contributions to be accepted into `pymatgen`.
7070

7171
1. **Unit tests** are required for all new modules and methods. The only way to minimize code regression is to ensure that all code is well-tested. Untested contributions will not be accepted.
72+
To run the testsuite in you repository follow these steps
73+
74+
```sh
75+
cd path/to/repo
76+
pip install -e . # install the package in your environment as "editable" == dev package
77+
PMG_TEST_FILES_DIR=$(pwd)/tests/files pytest tests # run the test suite providing the path for the datafiles
78+
```
79+
7280
1. **Python PEP 8** [code style](https://python.org/dev/peps/pep-0008). We allow a few exceptions when they are well-justified (e.g., Element's atomic number is given a variable name of capital Z, in line with accepted scientific convention), but generally, PEP 8 must be observed. Code style will be automatically checked for all PRs and must pass before any PR is merged. To aid you, you can install and run the same set of formatters and linters that will run in CI using
7381
7482
```sh

0 commit comments

Comments
 (0)