-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make EhrData subclass AnnData * Some init fixes * some type fixes * no useless privates * repr fixes * Fix tests * fix docs * improve typing * Fix docs * docs * newer docs runner * try uv for docs * Fix docs
- Loading branch information
1 parent
d8449f8
commit a2b8215
Showing
5 changed files
with
183 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
# https://docs.readthedocs.io/en/stable/config-file/v2.html | ||
version: 2 | ||
build: | ||
os: ubuntu-20.04 | ||
os: ubuntu-24.04 | ||
tools: | ||
python: "3.10" | ||
python: "3.12" | ||
jobs: | ||
post_install: | ||
- pip install uv | ||
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[doc] | ||
sphinx: | ||
configuration: docs/conf.py | ||
# disable this for more lenient docs builds | ||
fail_on_warning: true | ||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from __future__ import annotations | ||
|
||
from contextlib import suppress | ||
from typing import TYPE_CHECKING, Literal | ||
|
||
if TYPE_CHECKING: | ||
from sphinx.application import Sphinx | ||
|
||
|
||
def skip_member_handler( | ||
app: Sphinx, | ||
what: Literal["module", "class", "exception", "function", "method", "attribute", "property"], | ||
name: str, | ||
obj: object, | ||
skip: bool, | ||
options, | ||
) -> bool | None: | ||
"""Skip inherited members.""" | ||
if what not in {"method", "attribute", "property"}: | ||
return None | ||
if isinstance(obj, property): | ||
obj = obj.fget | ||
if name == "__getitem__": | ||
return False | ||
if name.startswith("_"): | ||
return True | ||
if not hasattr(obj, "__module__"): | ||
return None | ||
if not obj.__module__.startswith("ehrdata"): | ||
return True | ||
return None | ||
|
||
|
||
def setup(app: Sphinx) -> None: | ||
"""Setup lamindb for CI.""" | ||
import lamindb as ln | ||
|
||
with suppress(RuntimeError): | ||
ln.setup.init(storage="/tmp/lamindb") | ||
|
||
app.connect("autodoc-skip-member", skip_member_handler) |
Oops, something went wrong.