interpretml / interpret-community

Interpret Community extends Interpret repository with additional interpretability techniques and utility functions to handle real-world datasets and workflows.

Home Page:https://interpret-community.readthedocs.io/en/latest/index.html

Repository from Github https://github.cominterpretml/interpret-communityRepository from Github https://github.cominterpretml/interpret-community

Code Formatting Standards

vin-nag opened this issue · comments

Hi,

I was looking to contribute to this repo. I understand that we need to agree to the DCO as a requirement. I was wondering if there were any particular code formatting styles recommended/enforced for this project?

hi @vin-nag contributions are welcome!
"I was wondering if there were any particular code formatting styles recommended/enforced for this project?"
Yes, you will need to run flake8 and isort, see:

https://github.com/interpretml/interpret-community/blob/813be7ae1705ab6c13434ad6a22152785a783153/.github/workflows/python-linting.yml

I usually run flake8 at the root level:

flake8 --max-line-length=119

It will tell you what style change will need to be made.

For isort, it will actually auto-correct the code. To see the issues, you just need to run:

isort . -c

To autocorrect the issues, you can remove the -c parameter:

isort .

It will auto-correct the imports for you.

If you have any other style suggestions please let us know.

Note these are run in the build gates, so if you send the PR they will automatically output all of the issues for you in the build output.

closed with PR #522 where I added a contributing guide to the website

@vin-nag did you have any other questions about making contributions to this repository? Did you encounter any issues when trying to make a contribution?