From 9633848acf2d172be6984e35205a13e04195dfaf Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 18 Dec 2018 13:42:36 -0500 Subject: [PATCH] Add a Publishing Your Code section about GitHub --- docs/contents.rst.inc | 8 ++--- docs/shipping/publishing.rst | 66 ++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 6 deletions(-) create mode 100644 docs/shipping/publishing.rst diff --git a/docs/contents.rst.inc b/docs/contents.rst.inc index 76049aa..014f736 100644 --- a/docs/contents.rst.inc +++ b/docs/contents.rst.inc @@ -97,11 +97,12 @@ different scenarios. Shipping Great Python Code -------------------------- -This part of the guide focuses on deploying your Python code. +This part of the guide focuses on sharing and deploying your Python code. .. toctree:: :maxdepth: 2 + shipping/publishing shipping/packaging shipping/freezing @@ -137,8 +138,3 @@ Contribution notes and legal information (for those interested). notes/contribute notes/license notes/styleguide - - - - - diff --git a/docs/shipping/publishing.rst b/docs/shipping/publishing.rst new file mode 100644 index 0000000..90df2a7 --- /dev/null +++ b/docs/shipping/publishing.rst @@ -0,0 +1,66 @@ +.. _publishing-your-code-ref: + + +#################### +Publishing Your Code +#################### + +.. todo:: Replace this kitten with the photo we want. + +.. image:: http://placekitten.com/800/600 + +A healthy open source project needs a place to publish its code and project +management stuff so other developers can collaborate with you. This lets your +users gain a better understanding of your code, keep up with new developments, +report bugs, and contribute code. + +This development web site should include the source code history itself, a bug +tracker, a patch submission (aka "Pull Request") queue, and possibly additional +developer-oriented documentation. + +There are several free open source project hosting sites (aka "forges"). These +include GitHub, SourceForge, Bitbucket, and GitLab. GitHub is currently the best. +Use GitHub. + + +********************************* +Creating a Project Repo on GitHub +********************************* + +To publish your Python project on GitHub: + +1. Create a GitHub account if you don't already have one. + +2. Create a new repo for your project. + + 1. Click on the "+" menu next to your avatar in the upper right of the page and choose "New repository". + + 2. Name it after your project and give it an SEO-friendly description. + + 3. If you don't have an existing project repo, choose the settings to add a + README, `.gitignore`, and license. Use the Python `.gitignore` option. + +3. On the newly created repo page, click "Manage topics" and add the tags "python" and "python3" and/or "python2" as appropriate. + +4. Include a link to your new GitHub repo in your project's README file so people who just have the project distribution know where to find it. + +If this is a brand new repo, clone it to your local machine and start working: + +.. code-block:: console + + $ git clone https://github.com// + +Or, if you already have a project Git repo, add your new GitHub repo as a remote: + +.. code-block:: console + + $ cd + $ git remote add origin https://github.com// + $ git push --tags + +*********************** +When Your Project Grows +*********************** + +For more information about managing an open source software project, see the book +`Producing Open Source Software `_.