8000 Merge pull request #963 from apjanke/github-section · angellmethod/python-guide@62ad492 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 62ad492

Browse files
authored
Merge pull request realpython#963 from apjanke/github-section
Add a Publishing Your Code section about GitHub
2 parents 1d5905d + 9633848 commit 62ad492

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

docs/contents.rst.inc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,12 @@ different scenarios.
9797
Shipping Great Python Code
9898
--------------------------
9999
100-
This part of the guide focuses on deploying your Python code.
100+
This part of the guide focuses on sharing and deploying your Python code.
101101
102102
.. toctree::
103103
:maxdepth: 2
104104
105+
shipping/publishing
105106
shipping/packaging
106107
shipping/freezing
107108

docs/shipping/publishing.rst

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _publishing-your-code-ref:
2+
3+
4+
####################
5+
Publishing Your Code
6+
####################
7+
8+
.. todo:: Replace this kitten with the photo we want.
9+
10+
.. image:: http://placekitten.com/800/600
11+
12+
A healthy open source project needs a place to publish its code and project
13+
management stuff so other developers can collaborate with you. This lets your
14+
users gain a better understanding of your code, keep up with new developments,
15+
report bugs, and contribute code.
16+
17+
This development web site should include the source code history itself, a bug
18+
tracker, a patch submission (aka "Pull Request") queue, and possibly additional
19+
developer-oriented documentation.
20+
21+
There are several free open source project hosting sites (aka "forges"). These
22+
include GitHub, SourceForge, Bitbucket, and GitLab. GitHub is currently the best.
23+
Use GitHub.
24+
25+
26+
*********************************
27+
Creating a Project Repo on GitHub
28+
*********************************
29+
30+
To publish your Python project on GitHub:
31+
32+
1. Create a GitHub account if you don't already have one.
33+
34+
2. Create a new repo for your project.
35+
36+
1. Click on the "+" menu next to your avatar in the upper right of the page and choose "New repository".
37+
38+
2. Name it after your project and give it an SEO-friendly description.
39+
40+
3. If you don't have an existing project repo, choose the settings to add a
41+
README, `.gitignore`, and license. Use the Python `.gitignore` option.
42+
43+
3. On the newly created repo page, click "Manage topics" and add the tags "python" and "python3" and/or "python2" as appropriate.
44+
45+
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.
46+
47+
If this is a brand new repo, clone it to your local machine and start working:
48+
49+
.. code-block:: console
50+
51+
$ git clone https://github.com/<username>/<projectname>
52+
53+
Or, if you already have a project Git repo, add your new GitHub repo as a remote:
54+
55+
.. code-block:: console
56+
57+
$ cd <projectname>
58+
$ git remote add origin https://github.com/<username>/<projectname>
59+
$ git push --tags
60+
61+
***********************
62+
When Your Project Grows
63+
***********************
64+
65+
For more information about managing an open source software project, see the book
66+
`Producing Open Source Software <https://producingoss.com/>`_.

0 commit comments

Comments
 (0)
0