diff --git a/README.md b/README.md index c08c0328..f782361e 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,8 @@ In today's data-driven world, where data analytics is used by the Researchers or This is where PyDP comes in. PyDP is a Python wrapper for Google's [Differential Privacy](https://github.com/google/differential-privacy) project. The library provides a set of ε-differentially private algorithms, which can be used to produce aggregate statistics over numeric data sets containing private or sensitive information. Thus, helping us achieve better privacy. **Things to remember about PyDP :** -- :rocket: Features Differentially Private Algorithmic functions to support carrots demo including: BoundedMean, BoundedSum, Max, Count Above, Percentile, Min, Median, etc. + +- :rocket: Features Differentially Private Algorithmic functions as part of the 0.1.1 dev release, added to carrots demo such as BoundedMean, BoundedSum, Max, Count Above, Percentile, Min, Median , etc. - All the computation methods mentioned above, use Laplace noise only. (Other noise mechanisms will be added soon... :smiley:) - :fire: Currently supports Linux and OSX. (Windows coming real soon... :smiley:) - :star: Supports all the Python 3+ versions. @@ -54,10 +55,10 @@ x.result(input_data: list) ## Learning Resources Some of the good learning resources to get started with Python differential privacy (PyDP) project and understand the concepts behind it can be found [here](https://github.com/OpenMined/PyDP/blob/dev/resources.md). -## Join Us -PyDP is part of the OpenMined community, come join the rapidly growing community of 7300+ on [Slack](http://slack.openmined.org/). The slack community is very friendly and great about quickly answering questions and getting your doubts cleared plus, it is a great place to interact with the fellow community member with similar interests such as yours. +## Support +For support in using this library, please join the **#lib_pydp** Slack channel. If you’d like to follow along with any code changes to the library, please join the **#code_dp_python** Slack channel. [Click here to join our Slack community!](https://slack.openmined.org) -## Start Contributing +## Contributing If you'd like to contribute to this project please read these [guidelines](https://github.com/OpenMined/PyDP/blob/dev/contributing.md). diff --git a/contributing.md b/contributing.md index 0e76f788..e5cde8fd 100644 --- a/contributing.md +++ b/contributing.md @@ -1,6 +1,23 @@ # Contributors Guidelines to PyDP -## About PyDP +## Getting Started + +### Learn Git and Github + +All our development is done using Git and Github. If you're not too familiar with Git and Github, start by reviewing this guide. + +### Slack + +A great first place to join the Community is the Slack workspace . +- For support in using this library, please join the **#lib_pydp** Slack channel. +- If you’d like to follow along with any code changes to the library, please join the **#code_dp_python** Slack channel. + +### Issues + +On you can find all open Issues. Find a detailed explanation on how to work with issues below, under [Issue Allocation](#issue-allocation). + + +# About PyDP The project uses [Pybind11](http://pybind11.readthedocs.io) to wrap Google's [Differential Privacy](https://github.com/google/differential-privacy) library. @@ -10,22 +27,45 @@ You can check out [here](https://www.learncpp.com/) to get your started about C+ Regarding Pybind, Here is a good [introduction](https://www.youtube.com/watch?v=jQedHfF1Jfw) about it. -## Setting up your Environment -### Install Script +## Setup + +### Forking a Repository + +To contribute to PyDP you will need to fork the OpenMind/PyDP repository. +Then you can work risk-free on your fork. + +Fork the repository and run `git fetch upstream` followed by `git pull 'branch-name'` before you begin your work, to get the remote changes on your local machine. + +**Note:** All of PyDP work is done on :dev branch. + +### Syncing a Forked Repository + +To sync your fork with the OpenMined/PyDP repository please see this [Guide](https://help.github.com/articles/syncing-a-fork/) on how to sync your fork. + +### Installing Script This script automates the installation of the prerequisite packages to get you started, you can optionally install these manually referring to the list in the said file. If you are on Linux + ``` $ ./prereqs_linux.sh + ``` If you are on OSX + ``` $ ./prereqs_mac.sh ``` -### Build Script +### Building Script + +To achieve clean builds of different python versions we are using a virtualenv to isolate +the build process from system python and system libraries. Since python2 is deprecated +pipenv should be looking for a python3 binary to create the virtualenv from by default. +If you want to use a specific version of python3 please refer to the +[pipenv documentation](https://pipenv-fork.readthedocs.io/en/latest/). To achieve clean builds of different python versions we are using a virtualenv to isolate the build process from system python and system libraries. Since python2 is deprecated @@ -98,7 +138,21 @@ Note: After each change in your code, you have to run: $ docker build -t pydp:test . ``` -## Coding Standards +# Contributing + +### Beginner Issues + +If you are new to the project and want to get into the code, we recommend picking an issue with the label "good first issue". These issues should only require general programming knowledge and little to none insights into the project. + +### Issue Allocation + +Each issue someone is currently working on should have an assignee. If you want to contribute to an issue someone else is already working on please make sure to get in touch with that person via slack or GitHub and organize the workflow collaboratively. + +If you want to work on an open issue, please post a comment telling that you will work on that issue, we will assign you as the assignee then. + +**Caution**: We try our best to keep the assignees up-to-date, but we are a group of people collaborating, delays could occur, so make sure to check the comments, before you start working on an unassigned issue. + +### Coding Standards For Naming of modules, classes and methods in Python, make sure you follow naming conventions found @@ -110,3 +164,35 @@ For C++ Styling, we follow Google's coding standard. Read more about it For Python Formatting, we use [Black](https://black.readthedocs.io/en/stable/the_black_code_style.html), a stricter subset of PEP8. + +### Keep it DRY (Don't repeat yourself) + +As with any software project, it's important to keep the amount of code to a minimum, so keep code duplication to a minimum! + +### Creating a Pull Request + +At any point in time you can create a pull request, so others can see your changes and give you feedback. +Please create all pull requests to the `dev` branch. + +If your PR is still work in progress and not ready to be merged please add a `[WIP]` at the start of the title. +Example:`[WIP] BoundedMean error check` + +***Always fill the PR template before sending a PR for better review and understanding :*** +- Description - summary of the change, the motivation, and any additionl context that will help others understand your PR +- Affected Dependencies - List any dependencies that are required for this change. +- **How has this been tested? (Important)** + - Describe the tests that you ran to verify your changes. + - Provide instructions so we can reproduce. + - List any relevant details for your test configuration. +- Checklist - Following the code of conduct and basic guidelines. + + +### Check CI and Wait for Reviews + +After each commit GitHub Actions will check your new code against the formatting guidelines and execute the tests to check if the test coverage is high enough. + +***We will only merge PRs that pass ALL the GitHub Actions checks.*** + +If your check fails, don't worry, you will still be able to make changes and make your code pass the checks. Feel free to ask around in the Slack channel **#lib_pydp**. + +Note: It is always suggested to run black or clang format test or pytest on the code before sending a PR.