diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml new file mode 100644 index 000000000..e9cfe92c2 --- /dev/null +++ b/.github/workflows/mkdocs.yml @@ -0,0 +1,40 @@ +name: Deploy MkDocs + +on: + push: + branches: + - main + +permissions: + contents: write + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Poetry + uses: snok/install-poetry@v1.3.1 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + cache: 'poetry' + + - name: Install APT packages + run: | + sudo apt-get update && + sudo apt-get install pngquant + + - name: Install via Poetry + run: poetry install --with dev,docs + + env: + GH_TOKEN: ${{ secrets.PAT_FOR_CROSS_REPOS_CICD_TRIGGERING }} + + - name: Build and deploy MkDocs + run: poetry run mkdocs gh-deploy --force \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..545ad2c60 --- /dev/null +++ b/docs/index.md @@ -0,0 +1 @@ +### HELLO WORLD \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..b145ad2f3 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,121 @@ +site_name: cognee +site_author: Vasilije Markovic +site_description: desc +repo_name: cognee +repo_url: https://github.com/topoteretes/cognee +#site_url: https://github.com/topoteretes/cognee +edit_uri: edit/main/docs/ +copyright: Copyright © 2024 cognee +theme: + name: material + icon: + repo: fontawesome/brands/github + edit: material/pencil + view: material/eye + theme: + admonition: + note: octicons/tag-16 + abstract: octicons/checklist-16 + info: octicons/info-16 + tip: octicons/squirrel-16 + success: octicons/check-16 + question: octicons/question-16 + warning: octicons/alert-16 + failure: octicons/x-circle-16 + danger: octicons/zap-16 + bug: octicons/bug-16 + example: octicons/beaker-16 + quote: octicons/quote-16 + features: + - announce.dismiss + - content.action.edit + - content.action.view + - content.code.annotate + - content.code.copy + - content.code.select + - content.tabs.link + - content.tooltips + - header.autohide + - navigation.expand + - navigation.footer + - navigation.indexes + - navigation.instant + - navigation.instant.prefetch + - navigation.instant.progress + - navigation.prune + - navigation.sections + - navigation.tabs + # - navigation.tabs.sticky + - navigation.top + - navigation.tracking + - search.highlight + - search.share + - search.suggest + - toc.follow + # - toc.integrate + palette: + - scheme: default + primary: black + accent: indigo + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - scheme: slate + primary: black + accent: indigo + toggle: + icon: material/brightness-4 + name: Switch to light mode + font: + text: Roboto + code: Roboto Mono + custom_dir: docs/overrides +# Extensions +markdown_extensions: + - abbr + - admonition + - pymdownx.details + - attr_list + - def_list + - footnotes + - md_in_html + - toc: + permalink: true + - pymdownx.arithmatex: + generic: true + - pymdownx.betterem: + smart_enable: all + - pymdownx.caret + - pymdownx.details + - pymdownx.emoji: + emoji_generator: !!python/name:material.extensions.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.keys + - pymdownx.magiclink: + normalize_issue_symbols: true + repo_url_shorthand: true + user: jxnl + repo: instructor + - pymdownx.mark + - pymdownx.smartsymbols + - pymdownx.snippets: + auto_append: + - includes/mkdocs.md + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format + - pymdownx.tabbed: + alternate_style: true + combine_header_slug: true + - pymdownx.tasklist: + custom_checkbox: true +nav: + - Introduction: + - Welcome to cognee: 'index.md' diff --git a/pyproject.toml b/pyproject.toml index 7fd51ba19..ac867d2a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,6 +68,24 @@ pinecone = ["pinecone-client"] neo4j = ["neo4j", "py2neo"] notebook =[ "ipykernel", "ipywidgets", "jupyterlab", "jupyterlab_widgets", "jupyterlab-server", "jupyterlab-git"] +[tool.poetry.group.docs.dependencies] +mkdocs = "^1.4.3" +mkdocs-material = {extras = ["imaging"], version = "^9.5.9"} +mkdocstrings = "^0.22.0" +mkdocstrings-python = "^1.1.2" +pytest-examples = "^0.0.10" +mkdocs-jupyter = "^0.24.6" +mkdocs-rss-plugin = "^1.12.0" +mkdocs-minify-plugin = "^0.8.0" +mkdocs-redirects = "^1.2.1" + +[tool.poetry.group.test-docs.dependencies] +fastapi = "^0.109.2" +redis = "^5.0.1" +diskcache = "^5.6.3" +pandas = "^2.2.0" +tabulate = "^0.9.0" + [tool.ruff] # https://beta.ruff.rs/docs/ line-length = 100