Skip to content

Commit e34d203

Browse files
authored
enhancement(docs): Add user guide (#432) (#445)
1 parent 1fde8e4 commit e34d203

21 files changed

+1075
-226
lines changed

docs/requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ sphinx==5.3.0
1919
pydata-sphinx-theme==0.8.0
2020
myst-parser
2121
maturin
22-
jinja2
22+
jinja2
23+
ipython
24+
pandas

docs/source/api.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ API Reference
2424
.. toctree::
2525
:maxdepth: 2
2626

27-
api/config
2827
api/dataframe
2928
api/execution_context
3029
api/expression

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"sphinx.ext.viewcode",
5353
"sphinx.ext.napoleon",
5454
"myst_parser",
55+
"IPython.sphinxext.ipython_directive",
5556
]
5657

5758
source_suffix = {
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
.. Licensed to the Apache Software Foundation (ASF) under one
2+
.. or more contributor license agreements. See the NOTICE file
3+
.. distributed with this work for additional information
4+
.. regarding copyright ownership. The ASF licenses this file
5+
.. to you under the Apache License, Version 2.0 (the
6+
.. "License"); you may not use this file except in compliance
7+
.. with the License. You may obtain a copy of the License at
8+
9+
.. http://www.apache.org/licenses/LICENSE-2.0
10+
11+
.. Unless required by applicable law or agreed to in writing,
12+
.. software distributed under the License is distributed on an
13+
.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
.. KIND, either express or implied. See the License for the
15+
.. specific language governing permissions and limitations
16+
.. under the License.
17+
18+
Introduction
19+
============
20+
We welcome and encourage contributions of all kinds, such as:
21+
22+
1. Tickets with issue reports of feature requests
23+
2. Documentation improvements
24+
3. Code, both PR and (especially) PR Review.
25+
26+
In addition to submitting new PRs, we have a healthy tradition of community members reviewing each other’s PRs.
27+
Doing so is a great way to help the community as well as get more familiar with Rust and the relevant codebases.
28+
29+
How to develop
30+
--------------
31+
32+
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>`_.
33+
34+
Bootstrap:
35+
36+
.. code-block:: shell
37+
38+
# fetch this repo
39+
git clone [email protected]:apache/arrow-datafusion-python.git
40+
# prepare development environment (used to build wheel / install in development)
41+
python3 -m venv venv
42+
# activate the venv
43+
source venv/bin/activate
44+
# update pip itself if necessary
45+
python -m pip install -U pip
46+
# install dependencies (for Python 3.8+)
47+
python -m pip install -r requirements-310.txt
48+
49+
The tests rely on test data in git submodules.
50+
51+
.. code-block:: shell
52+
53+
git submodule init
54+
git submodule update
55+
56+
57+
Whenever rust code changes (your changes or via `git pull`):
58+
59+
.. code-block:: shell
60+
61+
# make sure you activate the venv using "source venv/bin/activate" first
62+
maturin develop
63+
python -m pytest
64+
65+
66+
Update Dependencies
67+
-------------------
68+
69+
To change test dependencies, change the `requirements.in` and run
70+
71+
.. code-block:: shell
72+
73+
# install pip-tools (this can be done only once), also consider running in venv
74+
python -m pip install pip-tools
75+
python -m piptools compile --generate-hashes -o requirements-310.txt
76+
77+
78+
To update dependencies, run with `-U`
79+
80+
.. code-block:: shell
81+
82+
python -m piptools compile -U --generate-hashes -o requirements-310.txt
83+
84+
85+
More details about pip-tools `here <https://github.com/jazzband/pip-tools>`_

0 commit comments

Comments
 (0)