diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 5fcbbbf..b9777df 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -5,22 +5,37 @@ on: branches: - main +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages permissions: - contents: write + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: 'pages' + cancel-in-progress: true + jobs: deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: "3.11" - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v3 + - run: pip install pdoc3 + - run: pdoc --html --output-dir docs zep_python + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: pip install -r docs/requirements.txt - - run: mkdocs gh-deploy --force + # Upload docs folder as artifact + path: './docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 diff --git a/Makefile b/Makefile index 16d9410..5efa7b0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all format lint test tests +.PHONY: all format lint test test coverage docs all: help @@ -8,6 +8,9 @@ coverage: --cov-report xml \ --cov-report term-missing:skip-covered +docs: + poetry run pdoc --html --output-dir docs zep_python + format: poetry run black . poetry run ruff --select I --fix . diff --git a/docs/documents.md b/docs/documents.md deleted file mode 100644 index 721d6ae..0000000 --- a/docs/documents.md +++ /dev/null @@ -1 +0,0 @@ -::: zep_python.document \ No newline at end of file diff --git a/docs/exceptions.md b/docs/exceptions.md deleted file mode 100644 index c8da7ce..0000000 --- a/docs/exceptions.md +++ /dev/null @@ -1 +0,0 @@ -::: zep_python.exceptions \ No newline at end of file diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 1ec7ca8..0000000 --- a/docs/index.md +++ /dev/null @@ -1,18 +0,0 @@ -# `zep-python` SDK Documentation - -- [Python Client](zep_client.md) - -Memory - - - [API](memory.md) - - [Models](memory_models.md) - -Documents - - - [API](documents.md) - - [Models](models_document.md) - -Other - -- [Exceptions](exceptions.md) - diff --git a/docs/memory.md b/docs/memory.md deleted file mode 100644 index 5a2db1b..0000000 --- a/docs/memory.md +++ /dev/null @@ -1 +0,0 @@ -::: zep_python.memory \ No newline at end of file diff --git a/docs/models_document.md b/docs/models_document.md deleted file mode 100644 index b1a782a..0000000 --- a/docs/models_document.md +++ /dev/null @@ -1,5 +0,0 @@ -# Models - -## Document Models - -::: zep_python.document.models \ No newline at end of file diff --git a/docs/models_memory.md b/docs/models_memory.md deleted file mode 100644 index 577c319..0000000 --- a/docs/models_memory.md +++ /dev/null @@ -1,5 +0,0 @@ -# Models - -## Chat Message Memory Models - -::: zep_python.memory.models diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index 4b55145..0000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -mkdocs==1.4.3 -mkdocstrings[python]==0.21.2 -mkdocs-material==9.1.13 \ No newline at end of file diff --git a/docs/zep_client.md b/docs/zep_client.md deleted file mode 100644 index d4b8f83..0000000 --- a/docs/zep_client.md +++ /dev/null @@ -1,4 +0,0 @@ -!!! question "Zep supports both `async` and sync interfaces" - The `async` interface is recommended for most use cases, but the sync interface is provided for convenience. Async methdos are prepended with an `a`. - -::: zep_python.zep_client \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml deleted file mode 100644 index 03e9d31..0000000 --- a/mkdocs.yml +++ /dev/null @@ -1,63 +0,0 @@ -site_name: Zep Python SDK -repo_url: https://github.com/getzep/zep-python -theme: - name: material - features: - - navigation.instant - - navigation.tracking - - navigation.tabs - - navigation.sections - - navigation.indexes - - search - - search.suggest - - content.tabs.link - - content.code.copy - - content.code.annotate - palette: - # Palette toggle for light mode - - scheme: default - primary: deep purple - toggle: - icon: material/weather-night - name: Switch to dark mode - - # Palette toggle for dark mode - - scheme: slate - primary: deep purple - toggle: - icon: material/weather-sunny - name: Switch to light mode - icon: - repo: fontawesome/brands/github - logo: fontawesome/solid/robot - -plugins: -- mkdocstrings - -markdown_extensions: - - attr_list - - admonition - - abbr - - def_list - - tables - - pymdownx.highlight: - anchor_linenums: true - line_spans: __span - pygments_lang_class: true - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg - -nav: - - Home: / - - Python Client: zep_client.md - - Memory: - - API: memory.md - - Models: models_memoru.md - - Documents: - - API: documents.md - - Models: models_document.md - - Exceptions: exceptions.md diff --git a/poetry.lock b/poetry.lock index e273d19..bae77ab 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "annotated-types" -version = "0.5.0" +version = "0.6.0" description = "Reusable constraint types to use with typing.Annotated" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, - {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, ] [package.dependencies] @@ -271,13 +271,13 @@ test = ["pytest (>=6)"] [[package]] name = "faker" -version = "19.6.2" +version = "19.8.0" description = "Faker is a Python package that generates fake data for you." optional = false python-versions = ">=3.8" files = [ - {file = "Faker-19.6.2-py3-none-any.whl", hash = "sha256:8fba91068dc26e3159c1ac9f22444a2338704b0991d86605322e454bda420092"}, - {file = "Faker-19.6.2.tar.gz", hash = "sha256:d5d5953556b0fb428a46019e03fc2d40eab2980135ddef5a9eb3d054947fdf83"}, + {file = "Faker-19.8.0-py3-none-any.whl", hash = "sha256:d86cb3150626bd642c6abd8a64107ddb0b154500252f46a56efe527a50594866"}, + {file = "Faker-19.8.0.tar.gz", hash = "sha256:5b234b89a9c536a37420f612169b6e58627b823ba1bba2504c0450db3b136620"}, ] [package.dependencies] @@ -319,13 +319,13 @@ dev = ["flake8", "markdown", "twine", "wheel"] [[package]] name = "griffe" -version = "0.36.4" +version = "0.36.5" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." optional = false python-versions = ">=3.8" files = [ - {file = "griffe-0.36.4-py3-none-any.whl", hash = "sha256:4e37a723891fa774fafdd67240571801a1d90d0236562c178707e5c37fb3ebe2"}, - {file = "griffe-0.36.4.tar.gz", hash = "sha256:7b5968f5cc6446637ed0d3ded9de07d6a928f10ccb24116b1dd843635bf1994a"}, + {file = "griffe-0.36.5-py3-none-any.whl", hash = "sha256:62af1ca94a5ac73259278b7692d300bf1c6bd8f9beeabaeaa229009bb82d09c6"}, + {file = "griffe-0.36.5.tar.gz", hash = "sha256:b8a672c54b99e958b985b3cfbf1de09e25d686dd8a667aa5ec2d0b1601a542fc"}, ] [package.dependencies] @@ -458,22 +458,41 @@ MarkupSafe = ">=2.0" [package.extras] i18n = ["Babel (>=2.7)"] +[[package]] +name = "mako" +version = "1.2.4" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +optional = false +python-versions = ">=3.7" +files = [ + {file = "Mako-1.2.4-py3-none-any.whl", hash = "sha256:c97c79c018b9165ac9922ae4f32da095ffd3c4e6872b45eded42926deea46818"}, + {file = "Mako-1.2.4.tar.gz", hash = "sha256:d60a3903dc3bb01a18ad6a89cdbe2e4eadc69c0bc8ef1e3773ba53d44c3f7a34"}, +] + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[package.extras] +babel = ["Babel"] +lingua = ["lingua"] +testing = ["pytest"] + [[package]] name = "markdown" -version = "3.4.4" +version = "3.5" description = "Python implementation of John Gruber's Markdown." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Markdown-3.4.4-py3-none-any.whl", hash = "sha256:a4c1b65c0957b4bd9e7d86ddc7b3c9868fb9670660f6f99f6d1bca8954d5a941"}, - {file = "Markdown-3.4.4.tar.gz", hash = "sha256:225c6123522495d4119a90b3a3ba31a1e87a70369e03f14799ea9c0d7183a3d6"}, + {file = "Markdown-3.5-py3-none-any.whl", hash = "sha256:4afb124395ce5fc34e6d9886dab977fd9ae987fc6e85689f08278cf0c69d4bf3"}, + {file = "Markdown-3.5.tar.gz", hash = "sha256:a807eb2e4778d9156c8f07876c6e4d50b5494c5665c4834f67b06459dfd877b3"}, ] [package.dependencies] importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] -docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.0)", "mkdocs-nature (>=0.4)"] +docs = ["mdx-gh-links (>=0.2)", "mkdocs (>=1.5)", "mkdocs-gen-files", "mkdocs-literate-nav", "mkdocs-nature (>=0.6)", "mkdocs-section-index", "mkdocstrings[python]"] testing = ["coverage", "pyyaml"] [[package]] @@ -660,13 +679,13 @@ python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] [[package]] name = "mkdocstrings-python" -version = "1.7.2" +version = "1.7.3" description = "A Python handler for mkdocstrings." optional = false python-versions = ">=3.8" files = [ - {file = "mkdocstrings_python-1.7.2-py3-none-any.whl", hash = "sha256:2d005729a90f1b86d6d71fad4953d787140996adec5b00a25fafc6ee48e1b79a"}, - {file = "mkdocstrings_python-1.7.2.tar.gz", hash = "sha256:75b6af86f9dcdc2d864072d8fed5b1d45ad94dd2ce97843ef52ca87ad53d9b26"}, + {file = "mkdocstrings_python-1.7.3-py3-none-any.whl", hash = "sha256:2439d6ad3e34f0bb4c643b845fb3c06ae9233499a1736f9fa273424b75cc5894"}, + {file = "mkdocstrings_python-1.7.3.tar.gz", hash = "sha256:c20128fa96c24dbc6437b10dfedaf33b0415d4503e51ce9ce5e84b271278268e"}, ] [package.dependencies] @@ -776,6 +795,21 @@ files = [ {file = "pathspec-0.11.2.tar.gz", hash = "sha256:e0d8d0ac2f12da61956eb2306b69f9469b42f4deb0f3cb6ed47b9cce9996ced3"}, ] +[[package]] +name = "pdoc3" +version = "0.10.0" +description = "Auto-generate API documentation for Python projects." +optional = false +python-versions = ">= 3.6" +files = [ + {file = "pdoc3-0.10.0-py3-none-any.whl", hash = "sha256:ba45d1ada1bd987427d2bf5cdec30b2631a3ff5fb01f6d0e77648a572ce6028b"}, + {file = "pdoc3-0.10.0.tar.gz", hash = "sha256:5f22e7bcb969006738e1aa4219c75a32f34c2d62d46dc9d2fb2d3e0b0287e4b7"}, +] + +[package.dependencies] +mako = "*" +markdown = ">=3.0" + [[package]] name = "platformdirs" version = "3.11.0" @@ -1478,4 +1512,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = ">=3.8.1,<4" -content-hash = "d2f4b7d3b8e195ccf4493b79cf2dfa9813f67ae37a724215861a956a925ef9b9" +content-hash = "5a68162bfcd29a8210699d956b8effe435f0d51f96adc035ba58886fb8c1a834" diff --git a/pyproject.toml b/pyproject.toml index 2469bc5..ac9e760 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,12 +24,10 @@ black = "^23.3.0" ruff = "^0.0.265" mypy = "^1.2.0" pre-commit = "^3.3.1" -mkdocs = "^1.4.3" -mkdocstrings = {version = "0.21.2", extras = ["python"]} -mkdocs-material = "^9.1.13" pytest-httpx = "^0.22.0" faker = "^19.2.0" python-dotenv = "^1.0.0" +pdoc3 = "^0.10.0" [build-system] requires = ["poetry-core"]