-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add LICENSE and CONTRIBUTING.md (#15)
- Loading branch information
Showing
4 changed files
with
105 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters