Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python documentation #416

Merged
merged 40 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d706321
Add docstrings
wenwei-dev Jun 9, 2023
95851dd
Add documentation files
wenwei-dev Jun 12, 2023
4b34598
Update docs
wenwei-dev Jun 13, 2023
f45acfd
Generate docstring docs
wenwei-dev Jun 13, 2023
28729a8
Update docs workflow
wenwei-dev Jun 13, 2023
3f438c3
Install deps
wenwei-dev Jun 13, 2023
20b11e9
Update docs workflow
wenwei-dev Jul 14, 2023
a8e5d9b
Create home page
wenwei-dev Jul 24, 2023
8eff29f
Build docs on main
wenwei-dev Aug 10, 2023
2e66af5
Merge docs and doc folders
Aug 13, 2023
dc933ec
Merge branch 'trueagi-io:main' into pydoc
wenwei-dev Aug 18, 2023
51aacb0
Merge remote-tracking branch 'upstream/main' into pydoc
wenwei-dev Aug 23, 2023
09b987d
Add docstrings for atom module
wenwei-dev Aug 23, 2023
8498029
Update docs
wenwei-dev Aug 24, 2023
95aea60
Merge remote-tracking branch 'upstream/main' into pydoc
wenwei-dev Aug 26, 2023
7297551
Update docs
wenwei-dev Aug 27, 2023
2f13b17
Update docs
wenwei-dev Aug 28, 2023
9a1d458
Merge branch 'trueagi-io:main' into pydoc
wenwei-dev Sep 1, 2023
df8a7c9
First batch of docstring revision
glicerico Sep 8, 2023
f82b8ad
Docstring for OperationObject
glicerico Sep 8, 2023
0530c90
More docstrings
glicerico Sep 8, 2023
6886097
More docstrings
glicerico Sep 8, 2023
2af780a
Document register_results
glicerico Sep 8, 2023
e81c585
Fix typos
glicerico Sep 8, 2023
81682fc
Comment base.py
glicerico Sep 8, 2023
08c302e
Address comments
glicerico Sep 14, 2023
b06c5b9
Merge pull request #4 from glicerico/pydoc
wenwei-dev Sep 14, 2023
33bcceb
Merge remote-tracking branch 'upstream/main' into pydoc
wenwei-dev Sep 14, 2023
797715b
Update python/hyperon/atoms.py
Necr0x0Der Sep 14, 2023
8a60a07
Update python/hyperon/atoms.py
Necr0x0Der Sep 14, 2023
bad2fd7
Update python/hyperon/atoms.py
Necr0x0Der Sep 14, 2023
1a854eb
Update python/hyperon/atoms.py
Necr0x0Der Sep 14, 2023
ecabfa7
Update python/hyperon/atoms.py
Necr0x0Der Sep 14, 2023
06e238e
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
329a1a9
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
955fd83
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
fd7088c
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
8d5ff9b
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
b2aaacf
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
5694a80
Update python/hyperon/base.py
Necr0x0Der Sep 14, 2023
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
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,8 @@ All components which depend on `libhyperonc` are built using
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)
![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