Skip to content

Commit

Permalink
Merge pull request #416 from wenwei-dev/pydoc
Browse files Browse the repository at this point in the history
Python documentation
  • Loading branch information
Necr0x0Der authored Sep 14, 2023
2 parents dce575b + 5694a80 commit bb19975
Show file tree
Hide file tree
Showing 20 changed files with 706 additions and 81 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build docs
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-versoin: 3.x
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- run: pip install mkdocs-material mkdocs-minify-plugin mkdocstrings[python]
- run: mkdocs gh-deploy --force
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ All components which depend on `libhyperonc` are built using
[CMake](https://cmake.org/) build tool in order to manage dependencies
automatically.

Diagram below demonstrates main components and dependencies between them:
![Diagram of the structure](./doc/structure.svg)
[Source code of the diagram](./doc/structure.plantuml)
The diagram below demonstrates main components and dependencies between them:
![Diagram of the structure](./docs/assets/structure.svg)
[Source code of the diagram](./docs/assets/structure.plantuml)

## Language support for IDEs

Expand Down
12 changes: 12 additions & 0 deletions docs/.overrides/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% extends "base.html" %}

{% block announce %}

For updates follow
<a rel="me" href="https://twitter.com/OpenCog">
<span class="twemoji">
{% include ".icons/fontawesome/brands/twitter.svg" %}
</span>
<strong>OpenCog Hyperon</strong>
</a>
{% endblock %}
File renamed without changes.
Binary file added docs/assets/P8T2_ASO_400x400.jpg
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.
File renamed without changes
File renamed without changes.
1 change: 1 addition & 0 deletions docs/reference/atoms.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: hyperon.atoms
1 change: 1 addition & 0 deletions docs/reference/base.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: hyperon.base
1 change: 1 addition & 0 deletions docs/reference/ext.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: hyperon.ext
1 change: 1 addition & 0 deletions docs/reference/runner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: hyperon.runner
1 change: 1 addition & 0 deletions docs/reference/stdlib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
::: hyperon.stdlib
2 changes: 2 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdocs-minify-plugin
mkdocstrings[python]
144 changes: 144 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
site_name: OpenCog Hyperon
repo_name: trueagi-io/hyperon-experimental
repo_url: https://github.com/trueagi-io/hyperon-experimental

copyright: |
&copy; 2023 <a href="https://github.com/trueagi-io/hyperon-experimental" target='_blank' rel="noopener">OpenCog Hyperon</a>
theme:
name: material
custom_dir: docs/.overrides
features:
- announce.dismiss
- content.action.edit
- content.action.view
- content.code.annotate
- content.code.copy
# - content.tabs.link
- content.tooltips
# - header.autohide
- navigation.expand
- navigation.footer
- navigation.indexes
- navigation.instant
# - navigation.prune
- navigation.sections
# - navigation.tabs
# - navigation.tabs.sticky
- navigation.top
- navigation.tracking
- search.highlight
- search.share
- search.suggest
- toc.follow
# - toc.integrate
language: en
palette:
- scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
primary: teal
accent: purple
- scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode
primary: teal
accent: lime
font:
text: Roboto
code: Roboto Mono
favicon: assets/P8T2_ASO_400x400.jpg
icon:
logo: logo

plugins:
- search:
separator: '[\s\-,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
- minify:
minify_html: true
- mkdocstrings:
default_hander: python
handlers:
python:
paths: [python]
import:
- https://docs.python.org/3/objects.inv
options:
docstring_options:
ignore_init_summary: true
docstring_section_style: list
heading_level: 1
inherited_members: true
merge_init_into_class: true
separate_signature: true
show_root_heading: true
show_root_full_path: false
show_signature_annotations: true
show_symbol_type_heading: true
show_symbol_type_toc: true
signature_crossrefs: true
- autorefs

extra:
social:
- icon: fontawesome/brands/github-alt
link: https://github.com/trueagi-io/hyperon-experimental
- icon: fontawesome/brands/twitter
link: https://twitter.com/OpenCog

markdown_extensions:
- pymdownx.snippets
- abbr
- admonition
- 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:materialx.emoji.to_svg
emoji_index: !!python/name:materialx.emoji.twemoji
- pymdownx.highlight:
anchor_linenums: true
line_spans: __span
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.keys
- pymdownx.magiclink:
repo_url_shorthand: true
user: squidfunk
repo: mkdocs-material
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.tabbed:
alternate_style: true
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde

# Page tree
nav:
- Minimal Metta: minimal-metta.md
- Contribution: CONTRIBUTING.md
- Python Reference:
- Atoms: reference/atoms.md
- Base: reference/base.md
- Ext: reference/ext.md
- Runner: reference/runner.md
- Stdlib: reference/stdlib.md
- C Reference: mainpage.md
- Doxygen: html
Loading

0 comments on commit bb19975

Please sign in to comment.