Skip to content

Latest commit

 

History

History
86 lines (62 loc) · 2.07 KB

CONTRIBUTING.md

File metadata and controls

86 lines (62 loc) · 2.07 KB

NLPretext

How to contribute

Dependencies

We use poetry to manage the dependencies. If you dont have poetry installed, you should run the command below.

make download-poetry; export PATH="$HOME/.local/bin:$PATH"

To install dependencies and prepare pre-commit hooks you would need to run install command:

make install

To activate your virtualenv run poetry shell.

Codestyle

After you run make install you can execute the automatic code formatting.

make format-code

Checks

Many checks are configured for this project. Command make check-style will run black diffs, darglint docstring style and mypy. The make check-safety command will look at the security of your code.

You can also use STRICT=1 flag to make the check be strict.

Before submitting

Before submitting your code please do the following steps:

  1. Add any changes you want
  2. Add tests for the new changes
  3. Edit documentation if you have changed something significant
  4. Run make format-code to format your changes.
  5. Run STRICT=1 make check-style to ensure that types and docs are correct
  6. Run STRICT=1 make check-safety to ensure that security of your code is correct

Other help

You can contribute by spreading a word about this library. It would also be a huge contribution to write a short article on how you are using this project. You can also share your best practices with us.

Docstring format

We chose to use Numpydoc over the several standards

"""
My numpydoc description of a kind
of very exhautive numpydoc format docstring.

Parameters
----------
first : array_like
    the 1st param name `first`
second :
    the 2nd param
third : {'value', 'other'}, optional
    the 3rd param, by default 'value'

Returns
-------
string
    a value in a string

Raises
------
KeyError
    when a key error
OtherError
    when an other error
"""