Skip to content

Commit

Permalink
Add LICENSE and CONTRIBUTING.md (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
adedaran authored Jul 6, 2022
1 parent 33c218c commit 89405cb
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 7 deletions.
64 changes: 64 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Contribution guidelines

## What to work on?

You're welcome to propose and contribute new ideas.
We encourage you to [open a discussion](https://github.com/DataDome/sliceline/discussions/new) so that we can align on the work to be done.
It's generally a good idea to have a quick discussion before opening a pull request that is potentially out-of-scope.

## Fork/clone/pull

The typical workflow for contributing to `sliceline` is:

1. Fork the `main` branch from the [GitHub repository](https://github.com/DataDome/sliceline/).
2. Clone your fork locally.
3. Commit changes.
4. Push the changes to your fork.
5. Send a pull request from your fork back to the original `main` branch.

## Local setup

We encourage you to use a virtual environment. You'll want to activate it every time you want to work on `sliceline`.

Create a virtual environment via Poetry:

```sh
$ make init
```

Install the [pre-commit](https://pre-commit.com/) push hooks. This will run some code quality checks every time you push to GitHub.

```sh
$ pre-commit install --hook-type pre-push
```

You can optionally run `pre-commit` at any time as so:

```sh
$ pre-commit run --all-files
```

## Documenting your change

If you're adding a class or a function, then you'll need to add a docstring. We follow the [numpydoc docstring convention](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_numpy.html), so please do too.

In order to build the documentation locally, run:

```sh
$ make doc
```

## Adding a release note

All classes and function are automatically picked up and added to the documentation.
The only thing you have to do is to add an entry to the relevant file in the [`docs/releases` directory](docs/releases).

## Testing

**Unit tests**

These tests absolutely have to pass.

```sh
$ make test
```
29 changes: 29 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
BSD 3-Clause License

Copyright (c) 2022, the Sliceline developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
18 changes: 11 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can use sliceline as follows:
X_trans = slice_finder.transform(X)
We invite you to check the `demo
notebooks <https://github.com/datadome/sliceline/blob/main/notebooks>`__
notebooks <https://github.com/DataDome/sliceline/blob/main/notebooks>`__
for a more thorough tutorial:

1. Implementing Sliceline on Titanic dataset
Expand All @@ -57,7 +57,7 @@ You can install the latest development version from GitHub as so:

.. code:: sh
pip install git+https://github.com/datadome/sliceline --upgrade
pip install git+https://github.com/DataDome/sliceline --upgrade
Or, through SSH:

Expand All @@ -70,8 +70,7 @@ Or, through SSH:

- `Documentation <https://sliceline.com>`__
- `Package releases <https://pypi.org/project/sliceline/#history>`__
- `SliceLine
paper <https://mboehm7.github.io/resources/sigmod2021b_sliceline.pdf>`__
- `SliceLine paper <https://mboehm7.github.io/resources/sigmod2021b_sliceline.pdf>`__

👐 Contributing
---------------
Expand All @@ -80,15 +79,20 @@ Feel free to contribute in any way you like, we’re always open to new
ideas and approaches.

- `Open a
discussion <https://github.com/datadome/sliceline/discussions/new>`__
discussion <https://github.com/DataDome/sliceline/discussions/new>`__
if you have any question or enquiry whatsoever. It’s more useful to
ask your question in public rather than sending us a private email.
It’s also encouraged to open a discussion before contributing, so
that everyone is aligned and unnecessary work is avoided.
- Feel welcome to `open an
issue <https://github.com/datadome/sliceline/issues/new/choose>`__ if
issue <https://github.com/DataDome/sliceline/issues/new/choose>`__ if
you think you’ve spotted a bug or a performance issue.

Please check out the `contribution
guidelines <https://github.com/datadome/sliceline/blob/main/CONTRIBUTING.md>`__
guidelines <https://github.com/DataDome/sliceline/blob/main/CONTRIBUTING.md>`__
if you want to bring modifications to the code base.

📝 License
---------

Sliceline is free and open-source software licensed under the `3-clause BSD license <https://github.com/DataDome/sliceline/blob/main/LICENSE>`__.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ version = "0.0.0" # This version is a generic placeholder. It should not be chan
description = "✂️ Fast slice finding for Machine Learning model debugging."
authors = ["Antoine de Daran"]
readme = "README.rst"
license = "BSD-3-Clause"
repository = "https://github.com/DataDome/sliceline"
documentation = "https://sliceline.readthedocs.io/en/stable/"

Expand Down

0 comments on commit 89405cb

Please sign in to comment.