-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,41 @@ | ||
# Developer Contribution Guide | ||
Contribute to the repository by opening a pull request. | ||
|
||
## Local | ||
Develop code locally by cloning the source code and installing it. | ||
|
||
```sh | ||
# Clone (download) source code | ||
git clone [email protected]:TomographicImaging/eqt | ||
cd eqt | ||
# Install git hooks for automatic sanity checking when trying to commit | ||
pip install pre-commit | ||
pre-commit install | ||
# Install test dependencies | ||
pip install .[dev] | ||
# Run tests | ||
``` | ||
|
||
### Run tests | ||
Before merging a pull request, all tests must pass. These can be run locally from the repository folder | ||
```sh | ||
pytest | ||
``` | ||
### Pre-commit guide | ||
Adhere to our styling guide by installing [pre-commit](https://pre-commit.com) in your local eqt environment. | ||
```sh | ||
pip install pre-commit | ||
pre-commit install | ||
``` | ||
From your local repository folder, run pre-commit on all the files before committing | ||
```sh | ||
pre-commit run -a | ||
``` | ||
or run pre-commit on a single file by specifying its file path | ||
```sh | ||
pre-commit run --files [path] | ||
``` | ||
The [.pre-commit-config.yaml](./.pre-commit-config.yaml) config file indicates the repositories and the hooks which will automatically applied. | ||
|
||
## CI | ||
## Continuous integration | ||
|
||
GitHub Actions runs automatically on every commit via [test.yml](.github/workflows/test.yml). | ||
GitHub Actions runs automatically a subset of the unit tests on every commit via [test.yml](.github/workflows/test.yml). | ||
|
||
### Testing | ||
|
||
|