diff --git a/docs/Contribute.ipynb b/docs/Contribute.ipynb index 038c435dd..f5f7e3c2a 100644 --- a/docs/Contribute.ipynb +++ b/docs/Contribute.ipynb @@ -170,6 +170,43 @@ "![Fetch Upstream Fork](images/fetch_upstream_fork.png) " ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + ":::{admonition} Instructions for Pulling Main into a Development Branch\n", + ":class: toggle\n", + "1. Open a terminal\n", + "2. Change the current working directory to your local development repository (e.g., cd Git/stumpy_dev.git)\n", + "3. Check out your local development branch (e.g., git switch some_new_feature)\n", + "4. Commit all changes in your local development branch (e.g., git add some_file.py and git commit)\n", + "5. Fetch the branches and their respective commits from the upstream repository (e.g., git fetch upstream)\n", + "6. Check out your fork's local default branch (e.g., git checkout main)\n", + "7. Merge the changes from the upstream default branch - in this case, upstream/main - into your local default branch (e.g., git merge upstream/main). This brings your fork's default branch into sync with the upstream repository, without losing your local changes.\n", + "8. If your local main branch didn't have any unique commits, Git will perform a fast-forward. Otherwise, if your local main branch had unique commits, you may need to resolve conflicts. Note that this does not affect your development branch!\n", + "9. Next, switch over to your development branch (e.g., git switch some_new_feature)\n", + "10. Finally, merge the main branch into your development branch (e.g., git merge main)\n", + " - You may see something like the following, if you do, you will need to open up the files tagged with CONFLICT and resolve the merge conflicts. Once that's done, you will need to commit the changes and push the commit (e.g., git push) back to Github.\n", + "\n", + "```\n", + "git merge main\n", + "Auto-merging stumpy/aamp_stimp.py\n", + "Auto-merging stumpy/core.py\n", + "Auto-merging stumpy/mpdist.py\n", + "CONFLICT (content): Merge conflict in stumpy/mpdist.py\n", + "Auto-merging stumpy/mstumped.py\n", + "CONFLICT (content): Merge conflict in stumpy/mstumped.py\n", + "Auto-merging stumpy/ostinato.py\n", + "Auto-merging stumpy/stimp.py\n", + "CONFLICT (content): Merge conflict in stumpy/stimp.py\n", + "Auto-merging stumpy/stumped.py\n", + "CONFLICT (content): Merge conflict in stumpy/stumped.py\n", + "Automatic merge failed; fix conflicts and then commit the result.\n", + "You will need to open up the files tagged with CONFLICT and resolve the merge conflicts. Once that's done, you will need to commit the changes and push the commit (e.g., git push) back to Github.\n", + "```\n", + ":::" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/docs/conf.py b/docs/conf.py index 88b69bdae..dcd2da20a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,6 +51,7 @@ "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.viewcode", + "sphinx_togglebutton", "numpydoc", "myst_nb", ] diff --git a/docs/requirements.txt b/docs/requirements.txt index 67d3d3727..b1242ff4b 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,3 +7,4 @@ scikit-learn numpydoc myst-nb jupyterlab-myst +sphinx-togglebutton