Skip to content

Commit

Permalink
add pre-commit and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczmarj committed Feb 22, 2024
1 parent 1f35a28 commit c26783b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: 'https://github.com/astral-sh/ruff-pre-commit'
rev: v0.2.2
hooks:
- id: ruff
args:
- '--fix'
- id: ruff-format
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ Clone this GitHub repository and install the package (in editable mode with the
git clone https://github.com/SBU-BMI/wsinfer.git
cd wsinfer
python -m pip install --editable .[dev]
pre-commit install
```

We use `pre-commit` to automatically run various checks during `git commit`.

# Citation

If you find our work useful, please cite [our paper](https://doi.org/10.1038/s41698-024-00499-9)!
Expand Down
3 changes: 3 additions & 0 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ Clone the GitHub repository and install the package in editable mode with the :c
git clone https://github.com/SBU-BMI/wsinfer.git
cd wsinfer
python -m pip install --editable .[dev]
pre-commit install

We use :code:`pre-commit` to automatically run various checks during :code:`git commit`.


Supported slide backends
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ dev = [
"geojson",
"mypy",
"pandas-stubs",
"pre-commit",
"pytest",
"ruff",
"tiffslide",
Expand Down

0 comments on commit c26783b

Please sign in to comment.