You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTING.rst
+16-8
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,6 @@ Ready to contribute? Here's how to setup ``pyjanitor`` for local development.
27
27
28
28
This also installs your new conda environment as a Jupyter-accessible kernel. To run correctly inside the environment, make sure you select the correct kernel from the top right corner of JupyterLab!
29
29
30
-
31
30
.. note :: If you are on Windows, you may need to install ``make`` before you can run the install. You can get it from ``conda-forge``::
32
31
33
32
$ conda install -c defaults -c conda-forge make
@@ -36,7 +35,17 @@ This also installs your new conda environment as a Jupyter-accessible kernel. To
36
35
37
36
.. note:: For PyCharm users, here are some `instructions <PYCHARM_USERS.html>`__ to get your Conda environment set up.
38
37
39
-
4. You should also be able to build the docs locally. To do this, from the main ``pyjanitor`` directory::
38
+
4. (Optional) Install the pre-commit hooks.
39
+
40
+
As of 29 October 2019, pre-commit hooks are available to run code formatting checks automagically
41
+
before git commits happen. If you did not have these installed before, run the following commands:
42
+
43
+
# Update your environment to install pre-commit
44
+
$ conda env update -f environment-dev.yml
45
+
# Install pre-commit hooks
46
+
$ pre-commit install-hooks
47
+
48
+
5. You should also be able to build the docs locally. To do this, from the main ``pyjanitor`` directory::
40
49
41
50
$ make docs
42
51
@@ -53,11 +62,11 @@ The command above allows you to view the documentation locally in your browser.
53
62
54
63
Sphinx uses `rst files (restructured text) <http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html>`_ as its markdown language. To edit documentation, go to the rst file that corresponds to the html file you would like to edit. Make the changes directly in the rst file with the correct markup. Save the file, and rebuild the html pages using the same commands as above to see what your changes look like in html.
55
64
56
-
5. Submit an issue to the ``pyjanitor`` GitHub issue tracker describing your planned changes: https://github.com/ericmjl/pyjanitor/issues
65
+
6. Submit an issue to the ``pyjanitor`` GitHub issue tracker describing your planned changes: https://github.com/ericmjl/pyjanitor/issues
57
66
58
67
This helps us keep track of who is working on what.
59
68
60
-
6. Create a branch for local development:
69
+
7. Create a branch for local development:
61
70
62
71
New features added to ``pyjanitor`` should be done in a new branch you have based off of the latest version of the ``dev`` branch. The protocol for ``pyjanitor`` branches for new development is that the ``master`` branch mirrors the current version of ``pyjanitor`` on PyPI, whereas the ``dev`` branch is for additional features for an eventual new official version of the package which might be deemed slightly less stable. Once more confident in the reliability/suitability for introducing a batch of changes into the official version, the ``dev`` branch is then merged into ``master`` and the PyPI package is subsequently updated.
63
72
@@ -67,7 +76,7 @@ To base a branch directly off of ``dev`` instead of ``master``, create a new one
67
76
68
77
Now you can make your changes locally.
69
78
70
-
7. When you're done making changes, check that your changes are properly formatted and that all tests still pass::
79
+
8. When you're done making changes, check that your changes are properly formatted and that all tests still pass::
71
80
72
81
$ make check
73
82
@@ -85,13 +94,13 @@ All of these commands are available when you create the development environment.
85
94
86
95
When you run the test locally, the tests in ``chemistry.py``, ``biology.py``, ``spark.py`` are automatically skipped if you don't have the optional dependencies (e.g. ``rdkit``) installed.
87
96
88
-
8. Commit your changes and push your branch to GitHub::
97
+
9. Commit your changes and push your branch to GitHub::
89
98
90
99
$ git add .
91
100
$ git commit -m "Your detailed description of your changes."
92
101
$ git push origin name-of-your-bugfix-or-feature
93
102
94
-
9. Submit a pull request through the GitHub website. When you are picking out which branch to merge into, be sure to select ``dev`` (not ``master``).
103
+
10. Submit a pull request through the GitHub website. When you are picking out which branch to merge into, be sure to select ``dev`` (not ``master``).
95
104
96
105
97
106
@@ -118,4 +127,3 @@ Before you submit a pull request, check that it meets these guidelines:
118
127
2. If the pull request adds functionality, the docs should be updated. Put
119
128
your new functionality into a function with a docstring, and add the
0 commit comments