Skip to content

Commit 4e0cd6b

Browse files
authored
ARROW-21 Test PyMongoArrow documentation build in CI (#49)
1 parent e32b560 commit 4e0cd6b

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

.readthedocs.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
sphinx:
3+
configuration: ./bindings/python/docs/source/conf.py
4+
conda:
5+
environment: ./bindings/python/docs/environment.yml
6+
python:
7+
install:
8+
# install the package itself
9+
- method: pip
10+
path: ./bindings/python

bindings/python/docs/environment.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: mongo_arrow_documentation
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python=3.9
6+
- sphinx
7+
- libbson
8+
- pkg-config

bindings/python/docs/source/conf.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#
1313
import os
1414
import os.path as p
15-
import sys
16-
sys.path.insert(0, os.path.abspath('../..'))
1715

1816

1917
# -- Project information -----------------------------------------------------
@@ -43,11 +41,6 @@
4341
'sphinx.ext.intersphinx'
4442
]
4543

46-
# https://docs.readthedocs.io/en/stable/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
47-
autodoc_mock_imports = ['pyarrow',
48-
'pymongoarrow.lib',
49-
'bson']
50-
5144
# Add any paths that contain templates here, relative to this directory.
5245
templates_path = ['_templates']
5346

@@ -72,7 +65,7 @@
7265
# Add any paths that contain custom static files (such as style sheets) here,
7366
# relative to this directory. They are copied after the builtin static files,
7467
# so a file named "default.css" will overwrite the builtin "default.css".
75-
html_static_path = ['_static']
68+
html_static_path = []
7669

7770
# These paths are either relative to html_static_path
7871
# or fully qualified paths (eg. https://...)

bindings/python/docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ Indices and tables
8383
installation
8484
quickstart
8585
supported_types
86+
faq
8687
api/index
8788
changelog
8889
developer/index

bindings/python/docs/source/supported_types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ respectively, and '_id' that is an `ObjectId`, your schema can be defined as::
3737
'_id': ObjectId,
3838
'f1': pyarrow.int32(),
3939
'f2': pyarrow.timestamp('ms')
40-
})
40+
})
4141

4242
Unsupported data types in a schema cause a ``ValueError`` identifying the
4343
field and its data type.

bindings/python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def append_arrow_flags(module):
119119

120120
# Handle the arrow library files manually.
121121
# Alternative to using pyarrow.create_library_symlinks().
122-
# You can use MONGO_LIBARROW_DIR to explicitly set the location of the
122+
# You can use MONGO_LIBARROW_DIR to explicitly set the location of the
123123
# arrow libraries (for instance in a conda build).
124124
# We first check for an unmodified path to the library,
125125
# then look for a library file with a version modifier, e.g. libarrow.600.dylib.

0 commit comments

Comments
 (0)