Skip to content

Commit 0af1d17

Browse files
html files of the previous documents
1 parent 2326d5d commit 0af1d17

File tree

11 files changed

+514
-2
lines changed

11 files changed

+514
-2
lines changed

pandas/guide/_sources/contents.rst.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ pandas documentation sprint.
2929

3030
pandas_setup
3131
pandas_docstring
32+
pandas_pr
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
=======================
2+
Submitting your changes
3+
=======================
4+
5+
Once you finished the changes to your assigned docstring, you can follow the
6+
instructions in this document in order to get your changes merged into pandas,
7+
and released in the next version.
8+
9+
1. Validate that your docstring does not have technical errors
10+
--------------------------------------------------------------
11+
12+
There is a script in pandas that validates whether a docstring follows the
13+
technical parts of the pandas docstring convention. To run the script,
14+
execute in your terminal:
15+
16+
| ``cd <pandas-dir>``
17+
| ``scripts/validate_docstring.py <your-function-or-method>``
18+
19+
where `<your-function-or-method>` is for example `pandas.DataFrame.head`,
20+
`pandas.Series.tail` or `pandas.to_datetime`.
21+
22+
2. Visual validation of the docstring
23+
-------------------------------------
24+
25+
The previous sprint validates things like the names of the sections, or
26+
that there are dots, spaces, or blank lines in the right side. But does
27+
not validate for typos, unclear sentences, or other mistakes. To validate
28+
them, as well as the visualization of your docstring in the pandas website
29+
you need to generate the html version of the page you worked on.
30+
31+
To build the documentation run:
32+
33+
| ``cd <pandas-dir>/doc``
34+
| ``python make.py html --single <your-function-or-method>``
35+
36+
where `<your-function-or-method>` follows the format described in the previous
37+
section.
38+
39+
This will generate a file `<pandas-dir>/doc/build/html/generated/<your-function-or-method>.html`
40+
that can be opened with your web browser.
41+
42+
3. Validate code in the examples
43+
--------------------------------
44+
45+
Code in the `Examples` section of the docstring must be valid Python code, and
46+
return the exact output as presented. Besides illustrating the functionality
47+
in the documentation, this code is also part of the unit tests.
48+
49+
To run the examples as unit tests, and validate that the code is correct and
50+
returns the expected output, execute the next in your terminal:
51+
52+
| ``cd <pandas-dir>``
53+
| ``pytest --doctest-modules <file-of-your-docstring> -k <function-or-method-name>``
54+
55+
where `<file-of-your-docstring>` is the path to the file where you edited your docstring
56+
(e.g. `pandas/core/frame.py`) and `<function-or-method-name>` is the name of the function
57+
or method you edited (e.g. `head`).
58+
59+
4. Validate that the docstring is clear to others
60+
-------------------------------------------------
61+
62+
As the last validation, please show the html version of your docstring to a
63+
person in the sprint not involved in the changes to the docstring, and make
64+
sure they are able to fully understand it.
65+
66+
5. Commit your changes
67+
----------------------
68+
69+
Once all the validations are successful, you can proceed to commit the changes
70+
into git.
71+
72+
Before committing your changes, make sure you are in the branch of the feature
73+
you are going to commit with:
74+
75+
| ``git branch``
76+
77+
Then, follow the next steps:
78+
79+
| ``git fetch upstream``
80+
| ``git merge upstram/master``
81+
| ``git add <modified-file(s)>``
82+
| ``git commit -m "<commit-message>"``
83+
84+
where `<modified-file(s)>` is the file where you made your changes (in rare
85+
cases it could be more than one file). And `<commit-message>` is a short
86+
description of your changes, starting by "DOC:" (e.g. "DOC: Improved the
87+
docsting of DataFrame.head()").
88+
89+
6. Push your changes to the sprint repository
90+
---------------------------------------------
91+
92+
Before sending the pull request to the pandas core developers, you will send
93+
it to the sprint repository. Where more experienced contributors will review
94+
it, and suggest changes if needed.
95+
96+
First, push your changes to your GitHub fork:
97+
98+
| ``git push -u origin <your-branch-name>``
99+
100+
Then, visit https://github.com/python-sprints/pandas in your browser, and click
101+
on the "Compare & pull request" button in the yellow box above the repository
102+
files.
103+
104+
Once your changes are reviewed and approved, you will receive an email on how
105+
to send the final pull request to pandas.

pandas/guide/_sources/pandas_setup.rst.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ This will create a directory named `pandas`, containing the latest version of
4646
the source code. We will name this directory `<pandas-dir>` in the rest of
4747
this document.
4848

49+
Then, set the upstream remote, so you can fetch the updates from the pandas
50+
repository:
51+
52+
| ``git remote add upstream https://github.com/pandas-dev/pandas``
53+
4954
3. Set up a Python environment
5055
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5156

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
============================
2+
How to create a pull request
3+
============================
4+
5+
(a beginner's guide to use Github)
6+
---------------------------------
7+
8+
So you want to join the Python Sprint, this quide will help you get started and know what you need to do to create a pull request (so you can contribute to cool open sourse project)
9+
10+
=====================================================
11+
First you need a Github account if you don't have one
12+
=====================================================
13+
14+
First you need to sign up for `Link Github <https://github.com>`. Github is a popular site for open source project to share the code and allow people to contribute to it. So it has a machanism to let people **frok** the repositries (which is "folder" containing all the files for the project), **clone** it to their local computer, **commit** to the online repositries then send a *pull request* to combine your contribution to the main one. Sounds complicated? Dont worry, we will walk you through it. So now go to `Link Github <https://github.com>` to get a **free account**.
15+
16+
.. image:: LondonPython Sprints_internal_1.png
17+
18+
=========================================
19+
Frok a repository (like a piece of cake!)
20+
=========================================
21+
22+
Now you have a Github account, after logging in, go to the repository (or repo for short) that you are trying to contribute to (like, pandas). First thing you need to so it to **fork** it so you can have a copy for yourself, kinda like forking a piece of food to your own plate. (Just kidding)
23+
24+
After you **fork** a repository, your copy will appear under your account haveing the same repo name (thus a **frok** is created). Reason for doing that is, since so many people is going to contribute to the open source repo, it make sense not giving permission for anyone to change the content of the original repo, so rather we will work on our own copy and ask for a **merge** by **pull request** whcih we will explain later.
25+
26+
To **fork** a repository, just click the **fork** button on the top right
27+
28+
.. image:: LondonPython Sprints_internal_2.png
29+
30+
==============================================
31+
Now you can clone yourself... I mean your repo
32+
==============================================
33+
34+
Okay, we have our lovely version of the repo at Github, but how can we work on it? Although Github provide certain way you can make changes to the content of your repo via the web interface, most of the project we need to do it on a local machine (like, your laptop).The way to go is to **clone** your online repor on Github to your computer. You may do it using Git whcih you can get it here: `<https://git-scm.com/downloads>` or Github now have Github Desktop whcih is also a local version of Git:`< https://desktop.github.com/>`
35+
36+
Git is a version control software that will *record* different version of a project folder so it allows you to:
37+
1. you changed your mind and want to roll back to an earlier *save* or
38+
2. you want to try something out and make an other *save copy* so you keep the original version.
39+
It's like when you play video games and make some safty save just in case you make some stupid mistake or make multiple save files so you can see different endings :-)
40+
41+
Once you have install Git (or Github desktop) you can go to your repo (that's right, the repo that is under your account) and press the green **clone or download** button and copy the link there. With the link, you can use the GUI to clone the repo from Github to your machine or another way to do it is to use Git Bash ( or any other command line enviroment) following the steps below:
42+
43+
(To be continued)

pandas/guide/contents.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ <h1>Pandas documentation sprint<a class="headerlink" href="#pandas-documentation
6161
<ul>
6262
<li class="toctree-l1"><a class="reference internal" href="pandas_setup.html">Before the sprint: Set up instructions</a></li>
6363
<li class="toctree-l1"><a class="reference internal" href="pandas_docstring.html">How to write a good pandas docstring</a></li>
64+
<li class="toctree-l1"><a class="reference internal" href="pandas_pr.html">Submitting your changes</a></li>
6465
</ul>
6566
</div>
6667
</div>

pandas/guide/objects.inv

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
# Project: Python
33
# Version:
44
# The remainder of this file is compressed using zlib.
5-
x�m�A� E�=�\�&n�t� �&=�A) e ��^Z�Q����?3Hr��#DV�" �d�#Ozᔈ��4eU�!����S�\i+�h~S Y��Dj'�_�f��T�X�N��ɑ�8���W�3��s0� @���Or�����T�z�;��X�`@���˒\�"6E���eE+5C�{��y ��
5+
x�mP͎! ��S��īGO�a� T���XJԷ_�͎�|�m5� ���!�=�}�2y8�`T��婠JH�]��bp��kv{uC_� ����&2���-D����'���Ҝ����3~r��MO�';AP`�LWŸr�����]�mr"��M�A�*XL�7��a��p�;1��؏u�
6+
� e���K _�W�+f��fT�1{���I�����>p��N�?+��/i췟

pandas/guide/pandas_docstring.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<script type="text/javascript" src="_static/doctools.js"></script>
2424
<link rel="index" title="Index" href="genindex.html" />
2525
<link rel="search" title="Search" href="search.html" />
26+
<link rel="next" title="Submitting your changes" href="pandas_pr.html" />
2627
<link rel="prev" title="Before the sprint: Set up instructions" href="pandas_setup.html" />
2728

2829
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
@@ -405,6 +406,7 @@ <h3>Related Topics</h3>
405406
<ul>
406407
<li><a href="contents.html">Documentation overview</a><ul>
407408
<li>Previous: <a href="pandas_setup.html" title="previous chapter">Before the sprint: Set up instructions</a></li>
409+
<li>Next: <a href="pandas_pr.html" title="next chapter">Submitting your changes</a></li>
408410
</ul></li>
409411
</ul>
410412
</div>

0 commit comments

Comments
 (0)