Contributing

Project Setup

Foreshadow has one main master branch and feature branches if an when collaborative development is required. Each pypi version and their associated commit will be tagged in GitHub. Before each release a new branch will be created freezing that specific version. Pull requests are merged directly into master. This project follows the semantic versioning standard.

Issues

Please feel free to submit issues to github with any bugs you encounter, ideas you may have, or questions about useage. We only ask that you tag them appropriately as bug fix, feature request, usage. Please also follow the following format

#### Description
<!-- 
Example: DropFeatures fails on categorical features when assessing a string column
-->

#### Steps/Code to Reproduce
<!--
Please add the minimum code required to reproduce the issue if possible.
Example:
```python
import uuid
import numpy as np
import pandas as pd
from foreshadow.preprocessor import Preprocessor

cat1 = [str(uuid.uuid4()) for _ in range(40)]
cat2 = [str(uuid.uuid4()) for _ in range(40)]

input = pd.DataFrame({
    'col1': np.random.choice(cat1, 1000),
    'col2': np.random.choice(cat2, 1000)
})

processor = Preprocessor()
output = processor.fit_transform(input)
```
If the code is too long, feel free to put it in a public gist and link it in the issue: https://gist.github.com
-->

#### Expected Results
<!--
Please add the results that you would expect here.
Example: Error should not be thrown
-->

#### Actual Results
<!--
Please place the full traceback here, again use a gist if you feel that it is too long.
-->

#### Versions
<!--
Please run the following snippet in your environment and paste the results here.

```python
import platform; print(platform.platform())
import sys; print("Python", sys.version)
import numpy; print("NumPy", numpy.__version__)
import sklearn; print("Scikit-Learn", sklearn.__version__)
import pandas; print("Pandas", pandas.__version__)
import foreshadow; print("Foreshadow", foreshadow.__version__)
from foreshadow.utils import check_transformer_imports; check_transformer_imports()
```
-->


<!--Thank you for contributing!-->

How to Contribute: Pull Requests

We accept pull requests! Thank you for taking the time to read this. There are only a few guidelines before you get started. Make sure you have read the Developers Guide and have appropriately setup your project. Please make sure to do the following to appropriately create a pull request for this project.

  1. Fork the project on GitHub

  2. Setup the project following the instructions in the Developers Guide using your fork

  3. Create a branch to hold your change

    $ git checkout development
    $ git checkout -b contribution_branch_name
    
  4. Start making changes to this branch and remember to never work on the master branch.

  5. Make sure to add tests for your changes to foreshadow/tests/ and make sure to run those changes. You need to run these commands from the root of the project repository.

    $ black foreshadow # required formatter
    $ pytest
    $ coverage html
    $ open htmlcov/index.html
    $ tox -r
    
  6. If everything is green and looks good, you’re ready to commit

    $ git add changed_files
    $ git commit # make sure use descriptive commit messages
    $ git push -u origin contribution_branch_name
    
  7. Go to the github fork page and submit your pull request against the development branch. Please use the following template for pull requests

<!--
Thanks you for taking the time to submit a pull request! Please take a look at some guidelines before submitting a pull request: https://github.com/georgianpartners/foreshadow/blob/development/doc/contrib.rst
-->

### Related Issue
<!--
Example: Fixes #7. See also #35.
Please use keywords (e.g., Fixes) to create link to the issues or pull requests
you resolved, so that they will automatically be closed when your pull request
is merged. See https://github.com/blog/1506-closing-issues-via-pull-requests
-->

### Description
<!--
Please add a narrative description of your the changes made and the rationale behind them. If making an enhancement include the motivation and use cases addressed.
-->