From ab310d95046b1c4384c0b5b0567ff9497b44add7 Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Sun, 17 Sep 2023 14:09:36 +0200 Subject: [PATCH 1/3] docs: Updates CONTRIBUTING --- CONTRIBUTING.md | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 704a027..5a77a5d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -83,45 +83,22 @@ make test #### Code quality -To run all quality checks together +The CI will also run some sanity checks (header format, dependency consistency, etc.), which you can run as follows: ```shell make quality ``` -##### Lint verification +This will read `pyproject.toml` and run: +- lint checking ([ruff](https://docs.astral.sh/ruff/)) +- type annotation checking ([mypy](https://github.com/python/mypy)) +- code formatting ([black](https://github.com/psf/black)) +- security checking ([bandit](https://github.com/PyCQA/bandit)) -To ensure that your incoming PR complies with the lint settings, you need to install [flake8](https://flake8.pycqa.org/en/latest/) and run the following command from the repository's root folder: +You can apply automatic fix to most of those by running: ```shell -flake8 ./ -``` -This will read the `.flake8` setting file and let you know whether your commits need some adjustments. - -##### Import order - -In order to ensure there is a common import order convention, run [isort](https://github.com/PyCQA/isort) as follows: - -```shell -isort **/*.py -``` -This will reorder the imports of your local files. - -##### Annotation typing - -Additionally, to catch type-related issues and have a cleaner codebase, annotation typing are expected. After installing [mypy](https://github.com/python/mypy), you can run the verifications as follows: - -```shell -mypy -``` -The `pyproject.toml` file will be read to check your typing. - -##### Code formatting - -Finally, code formatting is a good practice for shareable projects. After installing [black](https://github.com/psf/black), you can run the verifications as follows: - -```shell -black . +make style ``` ### Submit your modifications From 26484384dfed15d2bc722c390c3377ce681604bb Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Sun, 17 Sep 2023 14:09:50 +0200 Subject: [PATCH 2/3] docs: Updates README --- README.md | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index bc08359..be073b5 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,33 @@ - -# TorchCAM: class activation explorer +

+ TorchCAM: class activation explorer +

CI Status - - Documentation Status - - - Test coverage percentage + + ruff - - black + + black + + Test coverage percentage +

- PyPi Status + PyPi Version + + + Conda Version + + pyversions + + License - - pyversions - license

@@ -32,6 +37,11 @@ Open in Colab

+

+ + Documentation Status + +

Simple way to leverage the class-specific activation of convolutional layers in PyTorch. From 14ac2012adb22cc200a1d117326c0ce252c2c086 Mon Sep 17 00:00:00 2001 From: F-G Fernandez <26927750+frgfm@users.noreply.github.com> Date: Sun, 17 Sep 2023 14:14:27 +0200 Subject: [PATCH 3/3] docs: Fixes README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be073b5..6c1d101 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- TorchCAM: class activation explorer + TorchCAM: class activation explorer