Skip to content
Merged
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
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
matrix:
python-version: [3.7]
# test-path: ${{fromJson(needs.prep-testbed.outputs.matrix)}}
test-path: [tests/integrations, tests/units]
test-path: [tests/integrations, tests/units, tests/documentation]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
fail-fast: false
matrix:
python-version: [3.7]
test-path: [tests/integrations, tests/units]
test-path: [tests/integrations, tests/units, tests/documentation]
steps:
- uses: actions/[email protected]
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -275,7 +275,6 @@ jobs:
poetry run pytest -m 'benchmark' tests
timeout-minutes: 30


# just for blocking the merge until all parallel core-test are successful
success-all-test:
needs: [docarray-test, docarray-test-proto3, docarray-doc-index, docarray-test-tensorflow, docarray-test-benchmarks, import-test, check-black, check-mypy, lint-ruff]
Expand Down
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.243
hooks:
- id: ruff
- id: ruff

- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
hooks:
- id: blacken-docs
args:
- -S
additional_dependencies:
- black==22.3.0
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ This allows:
If you need to monitor and debug your code, you can enable docarray logging:
```python
import logging

logging.getLogger('docarray').setLevel(logging.DEBUG)
```

Expand Down
4 changes: 4 additions & 0 deletions docs/api_references/.pages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nav:
- ...

sort_type: natural
18 changes: 13 additions & 5 deletions docs/assets/logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 5 additions & 13 deletions docs/assets/logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
1 change: 1 addition & 0 deletions docs/user_guide/first_step.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# First Step : BaseDoc
1 change: 1 addition & 0 deletions docs/user_guide/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# User Guide - Intro
43 changes: 38 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
site_name: "DocArray"
site_name: DocArray Documentation
site_description: DocArray, DocArray is a library for representing, sending and storing multi-modal data, with a focus on applications in ML and Neural Search.
site_url: https://docs.docarray.org/
repo_name: docarray/docarray
repo_url: https://github.com/docarray/docarray
edit_uri: ''
theme:
# logo: assets/favicon.png
logo: assets/logo-light.svg

favicon: assets/favicon.png
name: material
features:
# - navigation.sections
Expand All @@ -11,16 +18,17 @@ theme:
primary: teal
toggle:
icon: material/brightness-7


name: Switch to dark mode


# Palette toggle for dark mode
- scheme: slate
primary: teal
toggle:
icon: material/brightness-4
name: Switch to light mode
# logo: assets/docarray-light.svg

#primary: teal
markdown_extensions:
- pymdownx.highlight:
Expand All @@ -40,12 +48,37 @@ markdown_extensions:
- attr_list
- md_in_html

extra:
# analytics:
# provider: google
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/docarray/docarray
- icon: fontawesome/brands/discord
link: https://discord.com/invite/WaMp6PVPgR
- icon: fontawesome/brands/twitter
link: https://twitter.com/docarray


plugins:
- search
- awesome-pages
- mkdocstrings:
handlers:
python:
options:
docstring_style: sphinx
inherited_members: true
inherited_members: true

nav:
- Home: README.md
- Tutorial - User Guide:
- user_guide/intro.md
- user_guide/first_step.md

- How-to:
- how_to/add_doc_index.md
- how_to/multimodal_training_and_serving.md
- how_to/optimize_performance_with_id_generation.md
- ...
- Contributing: CONTRIBUTING.md
97 changes: 94 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ pandas = ["pandas"]
jac = ["jina-hubble-sdk"]
aws = ["smart-open"]

# all
full = ["protobuf", "lz4", "pillow", "types-pillow", "av", "pydub", "trimesh"]

[tool.poetry.dev-dependencies]
pytest = ">=7.0"
pre-commit = ">=2.20.0"
Expand All @@ -49,6 +52,7 @@ types-protobuf = ">=3.20.4"
black = ">=22.10.0"
isort = ">=5.10.1"
ruff = ">=0.0.243"
blacken-docs = ">=1.13.0"

[tool.poetry.group.dev.dependencies]
uvicorn = ">=0.19.0"
Expand All @@ -59,7 +63,8 @@ pytest-asyncio = ">=0.20.2"
[tool.poetry.group.docs.dependencies]
mkdocstrings = {extras = ["python"], version = ">=0.20.0"}
mkdocs-material= ">=9.1.2"

mkdocs-awesome-pages-plugin = ">=2.8.0"
mktestdocs= ">=0.2.0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
Expand Down
13 changes: 13 additions & 0 deletions tests/documentation/test_docs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import pathlib

import pytest
from mktestdocs import check_md_file


# @pytest.mark.parametrize('fpath', pathlib.Path("docs").glob("**/*.md"), ids=str)
# to use later
@pytest.mark.parametrize(
'fpath', pathlib.Path('docs/user_guide').glob('**/*.md'), ids=str
)
def test_files_good(fpath):
check_md_file(fpath=fpath, memory=True)