From 888be1ab71b1e1c7f858097a18ccfa04bb765afb Mon Sep 17 00:00:00 2001 From: meganung Date: Tue, 2 Mar 2021 08:48:01 +0000 Subject: [PATCH 1/2] added instructions for moving to a fork if people directly cloned and committed changes --- CONTRIBUTING.md | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8711fb33271..5f83f773d08 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,22 +4,46 @@ While we are seeding this project with an initial set of popular tasks and a few models and examples, ongoing contributions from the research community are desired to increase the pool of tasks, models, and baselines. + ## Pull Requests We actively welcome your pull requests. -1. Fork the repo and create your branch from `master`. Set up your environment - and run `pre-commit install` once. -2. Link [CircleCI](https://circleci.com/vcs-authorize/) to your github account - if you haven't done so previously (and make sure the CircleCI tests run - successfully). -3. If you've added code that should be tested, [add tests](http://parl.ai/docs/tutorial_tests.html). -4. If you've changed APIs, update the documentation. -5. Autoformat and lint your code (`bash autoformat.sh`) -6. Ensure the test suite passes. Run `python -m pytest -m unit`. -7. If you've added a new dataset, you should also run +1. Fork the repo and then clone the forked repository. (See this [github guide](https://guides.github.com/activities/forking/) on forking for more info). + > **If you have already cloned the repo directly and committed changes, follow the steps in the [section below](#Moving-changes-you've-committed-to-a-fork)** +2. Create your branch from `master`. Set up your environment + and run `pre-commit install` once. +3. Make your changes +4. If you've added code that should be tested, [add tests](http://parl.ai/docs/tutorial_tests.html). +5. If you've changed APIs, update the documentation. +6. Autoformat and lint your code (`bash autoformat.sh`) +7. Ensure the test suite passes. Run `python -m pytest -m unit`. +8. If you've added a new dataset, you should also run `python -m pytest -m data`. Copy-paste the output into a comment in your PR. -8. If you haven't already, complete the Contributor License Agreement ("CLA"). -9. Once the PR is accepted and CI is passing, we will merge the PR for you. +9. If you haven't already, complete the Contributor License Agreement ("CLA"). +10. Link [CircleCI](https://circleci.com/vcs-authorize/) to your github account + if you haven't done so previously (and make sure the CircleCI tests run + successfully on the PR after you push your changes). +11. Push your changes! +12. Once the PR is accepted and CI is passing, we will merge the PR for you. + +### Moving changes you've committed to a fork +1. Fork the repo +2. In your local repo, rename your origin remote to upstream + ``` + git remote rename origin upstream + ``` +3. Point origin to the forked repo (instead of to the original repo) + ``` + git remote add origin git@github... + ``` +4. Fetch from the new origin + ``` + git fetch origin + ``` +5. Make your local branch track the remote branch (of the forked repo) + ``` + git branch --set-upstream-to origin/master master + ``` ## Contributor License Agreement ("CLA") In order to accept your pull request, we need you to submit a CLA. You only need From 1dc01723b77c7f2dae1d62382b385b6a82f83398 Mon Sep 17 00:00:00 2001 From: meganung Date: Fri, 5 Mar 2021 07:41:14 +0000 Subject: [PATCH 2/2] update the link to section --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f83f773d08..b4c0a47bb88 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,8 +8,8 @@ desired to increase the pool of tasks, models, and baselines. ## Pull Requests We actively welcome your pull requests. -1. Fork the repo and then clone the forked repository. (See this [github guide](https://guides.github.com/activities/forking/) on forking for more info). - > **If you have already cloned the repo directly and committed changes, follow the steps in the [section below](#Moving-changes-you've-committed-to-a-fork)** +1. Fork the repo and then clone the forked repository. (See this [github guide](https://guides.github.com/activities/forking/) on forking for more info). + **If you have already cloned the repo directly and committed changes, follow the steps in the [section below](#moving-changes-youve-committed-to-a-fork)** 2. Create your branch from `master`. Set up your environment and run `pre-commit install` once. 3. Make your changes