Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/travis_script_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ python_version_tests() {
if [[ "$PYTHON_VERSION" == "3.6" ]]
then
pip install -r doc/requirements.txt
python setup.py build_sphinx
python setup.py build_sphinx -s doc/source
fi
}

Expand Down
5 changes: 3 additions & 2 deletions python/cmake_modules/UseCython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ set( CYTHON_NO_DOCSTRINGS OFF
CACHE BOOL "Strip docstrings from the compiled module." )
set( CYTHON_FLAGS "" CACHE STRING
"Extra flags to the cython compiler." )
mark_as_advanced( CYTHON_ANNOTATE CYTHON_NO_DOCSTRINGS CYTHON_FLAGS )
mark_as_advanced( CYTHON_ANNOTATE CYTHON_NO_DOCSTRINGS CYTHON_FLAGS)

find_package( Cython REQUIRED )
find_package( PythonLibsNew REQUIRED )
Expand Down Expand Up @@ -131,7 +131,8 @@ function( compile_pyx _name pyx_target_name generated_files pyx_file)
# Add the command to run the compiler.
add_custom_target(${pyx_target_name}
COMMAND ${CYTHON_EXECUTABLE} ${cxx_arg} ${include_directory_arg}
${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg} ${CYTHON_FLAGS}
${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg}
${CYTHON_FLAGS}
--output-file "${_name}.${extension}" ${pyx_location}
DEPENDS ${pyx_location}
# do not specify byproducts for now since they don't work with the older
Expand Down
22 changes: 19 additions & 3 deletions python/doc/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# auto-generated module documentation
pyarrow*.rst
modules.rst
# 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.

_build
source/generated
4 changes: 2 additions & 2 deletions python/doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ BUILDDIR = _build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

.PHONY: help
help:
Expand Down
18 changes: 18 additions & 0 deletions python/doc/source/_static/stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* 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.
*/
153 changes: 153 additions & 0 deletions python/doc/source/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
.. 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.

.. currentmodule:: pyarrow
.. _api:

*************
API Reference
*************

.. _api.functions:

Type Metadata and Schemas
-------------------------

.. autosummary::
:toctree: generated/

null
bool_
int8
int16
int32
int64
uint8
uint16
uint32
uint64
float16
float32
float64
timestamp
date32
date64
binary
string
decimal
list_
struct
dictionary
field
DataType
Field
Schema
schema

Scalar Value Types
------------------

.. autosummary::
:toctree: generated/

NA
NAType
Scalar
ArrayValue
Int8Value
Int16Value
Int32Value
Int64Value
UInt8Value
UInt16Value
UInt32Value
UInt64Value
FloatValue
DoubleValue
ListValue
BinaryValue
StringValue
FixedSizeBinaryValue

Array Types
-----------

.. autosummary::
:toctree: generated/

Array
NumericArray
IntegerArray
FloatingPointArray
BooleanArray
Int8Array
Int16Array
Int32Array
Int64Array
UInt8Array
UInt16Array
UInt32Array
UInt64Array
DictionaryArray
StringArray

Tables and Record Batches
-------------------------

.. autosummary::
:toctree: generated/

Column
RecordBatch
Table

Tensor type and Functions
-------------------------

.. autosummary::
:toctree: generated/

Tensor
write_tensor
get_tensor_size
read_tensor

Input / Output and Shared Memory
--------------------------------

.. autosummary::
:toctree: generated/

Buffer
BufferReader
InMemoryOutputStream
NativeFile
MemoryMappedFile
memory_map
create_memory_map
PythonFileInterface

Interprocess Communication and Messaging
----------------------------------------

.. autosummary::
:toctree: generated/

FileReader
FileWriter
StreamReader
StreamWriter
22 changes: 10 additions & 12 deletions python/doc/conf.py → python/doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,21 @@
import os
import sys

from sphinx import apidoc

import sphinx_rtd_theme


__location__ = os.path.join(os.getcwd(), os.path.dirname(
inspect.getfile(inspect.currentframe())))
output_dir = os.path.join(__location__)
module_dir = os.path.join(__location__, "..", "pyarrow")
cmd_line_template = "sphinx-apidoc -f -e -o {outputdir} {moduledir}"
cmd_line = cmd_line_template.format(outputdir=output_dir, moduledir=module_dir)
apidoc.main(cmd_line.split(" "))

on_rtd = os.environ.get('READTHEDOCS') == 'True'

if not on_rtd:
# Hack: On RTD we use the pyarrow package from conda-forge as we cannot
# build pyarrow there.
sys.path.insert(0, os.path.abspath('..'))

sys.path.extend([
os.path.join(os.path.dirname(__file__),
'..', '../..')

])

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand All @@ -64,7 +59,7 @@
'sphinx.ext.doctest',
'sphinx.ext.mathjax',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon'
'sphinx.ext.napoleon',
]

# numpydoc configuration
Expand All @@ -79,6 +74,9 @@
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

import glob
autosummary_generate = glob.glob("*.rst")

# The encoding of source files.
#
# source_encoding = 'utf-8-sig'
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion python/doc/index.rst → python/doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ structures.
pandas
filesystems
parquet
modules
api
getting_involved

.. toctree::
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.