Skip to content

Commit

Permalink
enhancement(docs): Add user guide (#432) (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
mesejo committed Aug 10, 2023
1 parent 1fde8e4 commit e34d203
Show file tree
Hide file tree
Showing 21 changed files with 1,075 additions and 226 deletions.
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ sphinx==5.3.0
pydata-sphinx-theme==0.8.0
myst-parser
maturin
jinja2
jinja2
ipython
pandas
1 change: 0 additions & 1 deletion docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ API Reference
.. toctree::
:maxdepth: 2

api/config
api/dataframe
api/execution_context
api/expression
Expand Down
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"myst_parser",
"IPython.sphinxext.ipython_directive",
]

source_suffix = {
Expand Down
85 changes: 85 additions & 0 deletions docs/source/contributor-guide/introduction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. Licensed to the Apache Software Foundation (ASF) under one
.. or more contributor license agreements. See the NOTICE file
.. distributed with this work for additional information
.. regarding copyright ownership. The ASF licenses this file
.. to you under the Apache License, Version 2.0 (the
.. "License"); you may not use this file except in compliance
.. with the License. You may obtain a copy of the License at
.. http://www.apache.org/licenses/LICENSE-2.0
.. Unless required by applicable law or agreed to in writing,
.. software distributed under the License is distributed on an
.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
.. KIND, either express or implied. See the License for the
.. specific language governing permissions and limitations
.. under the License.
Introduction
============
We welcome and encourage contributions of all kinds, such as:

1. Tickets with issue reports of feature requests
2. Documentation improvements
3. Code, both PR and (especially) PR Review.

In addition to submitting new PRs, we have a healthy tradition of community members reviewing each other’s PRs.
Doing so is a great way to help the community as well as get more familiar with Rust and the relevant codebases.

How to develop
--------------

This assumes that you have rust and cargo installed. We use the workflow recommended by `pyo3 <https://github.com/PyO3/pyo3>`_ and `maturin <https://github.com/PyO3/maturin>`_.

Bootstrap:

.. code-block:: shell
# fetch this repo
git clone [email protected]:apache/arrow-datafusion-python.git
# prepare development environment (used to build wheel / install in development)
python3 -m venv venv
# activate the venv
source venv/bin/activate
# update pip itself if necessary
python -m pip install -U pip
# install dependencies (for Python 3.8+)
python -m pip install -r requirements-310.txt
The tests rely on test data in git submodules.

.. code-block:: shell
git submodule init
git submodule update
Whenever rust code changes (your changes or via `git pull`):

.. code-block:: shell
# make sure you activate the venv using "source venv/bin/activate" first
maturin develop
python -m pytest
Update Dependencies
-------------------

To change test dependencies, change the `requirements.in` and run

.. code-block:: shell
# install pip-tools (this can be done only once), also consider running in venv
python -m pip install pip-tools
python -m piptools compile --generate-hashes -o requirements-310.txt
To update dependencies, run with `-U`

.. code-block:: shell
python -m piptools compile -U --generate-hashes -o requirements-310.txt
More details about pip-tools `here <https://github.com/jazzband/pip-tools>`_
Loading

0 comments on commit e34d203

Please sign in to comment.