diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f043dfdf03..7c3989dd71 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,14 +17,13 @@ Contributions are welcomed! Here's a few things to know: Here are the basic steps to get started with your first contribution. Please reach out with any questions. 1. Use [open issues](https://github.com/Microsoft/Recommenders/issues) to discuss the proposed changes. Create an issue describing changes if necessary to collect feedback. Also, please use provided labels to tag issues so everyone can easily sort issues of interest. -2. [Fork the repo](https://help.github.com/articles/fork-a-repo/) so you can make and test local changes. -3. Create a new branch **from staging branch** for the issue (please do not create a branch from main). We suggest prefixing the branch with your username and then a descriptive title: (e.g. gramhagen/update_contributing_docs) -4. Install reco-utils package locally using the right optional dependency for your test. (e.g. gpu test: `pip install -e .[gpu]` -5. Install development requirements. `pip install -r dev-requirements.txt` -6. Create a test that replicates the issue. -7. Make code changes. -8. Ensure that unit tests pass and code style / formatting is consistent (see the [coding guidelines](https://github.com/Microsoft/Recommenders/wiki/Coding-Guidelines#python-and-docstrings-style) for more details). In particular, make sure that there is a docstring for every function and class you add and that it conforms to the [Google style](http://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). -9. Create a pull request against **staging** branch. +1. [Fork the repo](https://help.github.com/articles/fork-a-repo/) so you can make and test local changes. +1. Create a new branch **from staging branch** for the issue (please do not create a branch from main). We suggest prefixing the branch with your username and then a descriptive title: (e.g. gramhagen/update_contributing_docs) +1. Install reco-utils package locally using the right optional dependency for your test and the dev option. (e.g. gpu test: `pip install -e .[gpu,dev]`) +1. Create a test that replicates the issue. +1. Make code changes. +1. Ensure unit tests pass and code style / formatting is consistent (see [wiki](https://github.com/Microsoft/Recommenders/wiki/Coding-Guidelines#python-and-docstrings-style) for more details). +1. Create a pull request against **staging** branch. Once the features included in a [milestone](https://github.com/microsoft/recommenders/milestones) are completed, we will merge staging into main. See the wiki for more detail about our [merge strategy](https://github.com/microsoft/recommenders/wiki/Strategy-to-merge-the-code-to-main-branch). diff --git a/SETUP.md b/SETUP.md index ef3f4bff7a..45b44c9aa0 100644 --- a/SETUP.md +++ b/SETUP.md @@ -23,6 +23,7 @@ This document describes how to setup all the dependencies to run the notebooks i - [Troubleshooting Installation on Azure Databricks](#troubleshooting-installation-on-azure-databricks) - [Prepare Azure Databricks for Operationalization](#prepare-azure-databricks-for-operationalization) - [Setup guide for Docker](#setup-guide-for-docker) + - [Setup guide for making a release](#setup-guide-for-making-a-release) ## Compute environments @@ -336,3 +337,18 @@ docker run -p 8888:8888 -d recommenders:cpu ``` You can then open the Jupyter notebook server at http://localhost:8888 + +## Setup guide for making a release + +The process of making a new release and publishing it to pypi is as follows: + +First make sure that the tag that you want to add, e.g. `0.6.0`, is added in [reco_utils.py/__init__.py](reco_utils.py/__init__.py). Follow the [contribution guideline](CONTRIBUTING.md) to add the change. + +1. Make sure that the code in main passes all the tests (unit and nightly tests). +1. Create a tag with the version number: e.g. `git tag -a 0.6.0 -m "Recommenders 0.6.0"`. +1. Push the tag to the remote server: `git push origin 0.6.0`. +1. When the new tag is pushed, a release pipeline is executed. This pipeline runs all the tests again (unit, smoke and integration), +generates a wheel and a tar.gz which are uploaded to a [GitHub draft release](https://github.com/microsoft/recommenders/releases). +1. Fill up the draft release with all the recent changes in the code. +1. Download the wheel and tar.gz locally, these files shouldn't have any bug, since they passed all the tests. +1. Publish the wheel and tar.gz to pypi: `twine upload ms-recommenders*` diff --git a/setup.py b/setup.py index 2956a14a7b..f4fff9a297 100644 --- a/setup.py +++ b/setup.py @@ -75,6 +75,7 @@ "cmake>=3.18.4.post1", "xlearn==0.40a1", ], + "dev": ["black>=18.6b4,<21", "pytest>=3.6.4"], } # for the brave of heart extras_require["all"] = list(set(sum([*extras_require.values()], [])))