Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 1.85 KB

CONTRIBUTING.md

File metadata and controls

55 lines (36 loc) · 1.85 KB

Contributing to dlkp

We will be extremely happy to integrate your contributions to dlkp. Please follow the below process:

  1. Check if there is already an issue for your concern.
  2. If there is not, open a new one to start a discussion.
  3. If we decide your concern needs code changes, we would be happy to accept a pull request. Please consider the commit guidelines below.

Git Commit Guidelines

If there is already a ticket, use this number at the start of your commit message. Use meaningful commit messages that described what you did.

Example: GH-42': Added new keyphrase extraction algorithm as proposed in <paper name>

Developing locally

For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods.

setup

You can either use Pipenv for this:

pipenv install --dev && pipenv shell

or create a python environment of your preference and run

pip install -r requirements.txt
pip install -r requirements-dev.txt

tests

To run all basic tests execute:

pytest

code formatting

To ensure a standardized code style we use the formatter black and for standardizing imports we use isort. If your code is not formatted properly, the tests will fail.

You can automatically format the code via black --config pyproject.toml src/ && isort src/ in the src root folder.

pre-commit hook

If you want to automatically format your code on every commit, you can use pre-commit. Just install it via pip install pre-commit and execute pre-commit install in the root folder. This will add a hook to the repository, which reformats files on every commit.