Skip to content

Commit

Permalink
Add documentation via readthedocs, fix CI. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
matz-e authored Jul 10, 2024
1 parent 0efa229 commit 2cd223e
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.18.1
run: python -m pip install cibuildwheel

- name: Build wheels
run: python -m cibuildwheel --output-dir dist
Expand Down
20 changes: 20 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2

build:
os: ubuntu-22.04
apt_packages:
- libopenmpi-dev
tools:
python: "3.12"
jobs:
post_checkout:
- git submodule update --init

sphinx:
configuration: docs/source/conf.py

python:
install:
- requirements: docs/source/requirements.txt
- method: pip
path: .
2 changes: 1 addition & 1 deletion deps/pybind11
Submodule pybind11 updated 163 files
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions doc/source/conf.py → docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Long-standing documentation configuration."""

# -*- coding: utf-8 -*-
from importlib.metadata import version as get_version

Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mock
sphinx
sphinx-bluebrain-theme
File renamed without changes.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dependencies = [
"morphio",
"mpi4py",
"libsonata",
"numpy",
"numpy<2",
"packaging",
"pandas",
"pyarrow<15",
Expand Down
2 changes: 1 addition & 1 deletion src/functionalizer/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def schema_for_dataframe(df):
"""Create a Spark schema from the Pandas DataFrame."""

def _type(col):
if df.dtypes[col] == object:
if df.dtypes[col] is object:
return T.StringType()
return typedef.as_spark_type(df.dtypes[col])

Expand Down
6 changes: 2 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@ commands =
ruff format --check

[testenv:docs]
changedir = doc
deps =
sphinx
sphinx-bluebrain-theme
changedir = docs
dep_file = docs/source/requirements.txt
# set warnings as errors using the -W sphinx option
commands = make html SPHINXOPTS=-W
allowlist_externals = make
Expand Down

0 comments on commit 2cd223e

Please sign in to comment.