Skip to content

Commit

Permalink
reference numpydoc
Browse files Browse the repository at this point in the history
  • Loading branch information
wd60622 committed Oct 12, 2023
1 parent f871d3c commit 179aa95
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ Do this once but keep it up to date
#. `Fork the kayak/PyPika repo GitHub <https://github.com/kayak/pypika/fork>`_
#. Clone forked repo and set upstream

.. code-block:: bash
.. code-block:: bash
git clone [email protected]:<your-username>/pypika.git
cd pypika
git remote add upstream [email protected]:kayak/pypika.git
git clone [email protected]:<your-username>/pypika.git
cd pypika
git remote add upstream [email protected]:kayak/pypika.git
Setup local development environment
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -49,6 +49,16 @@ Setup local development environment
make install
#. Run the tests

The unit tests are run with ``unittest`` via ``tox``. To run the tests locally:

.. code-block:: bash
make test
These tests will also run on GitHub Actions when you open a pull request.

#. Build the docs locally

Our docs are built with Sphinx. To build the docs locally:
Expand All @@ -63,16 +73,6 @@ Setup local development environment
open docs/_build/index.html
#. Run the tests

The unit tests are run with ``unittest`` via ``tox``. To run the tests locally:

.. code-block:: bash
make test
These tests will also run on GitHub Actions when you open a pull request.

Pull Request checklist
----------------------

Expand All @@ -82,3 +82,20 @@ Please check that your pull request meets the following criteria:
- pre-commit hooks pass
- Docstring and examples and checking for correct render in the docs

Documentation
-------------

Documentation is built with Sphinx and hosted on `Read the Docs <https://pypika.readthedocs.io/en/latest/>`_. The latest builds are displayed on their site `here <https://readthedocs.org/projects/pypika/builds/>`_.

The code documentation is to be written in the docstrings of the code itself or in the various ``.rst`` files in project root or the ``docs/`` directory.

The docstrings can be in either `Numpy <https://numpydoc.readthedocs.io/en/latest/format.html>`_ or `Sphinx <https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html>`_ format.

Automations
-----------

We use `pre-commit <https://pre-commit.com/>`_ to automate format checks. Install the pre-commit hooks with the ``make install`` command described above.

GitHub Actions runs both format checks and unit tests on every pull request.

**NOTE:** The hosted documentation is built separately from the GitHub Actions workflow. To build the docs locally, use the ``make docs.build`` command described above.

0 comments on commit 179aa95

Please sign in to comment.