Skip to content

Commit

Permalink
docs: add User to the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
hearot committed Jun 23, 2020
1 parent 9e7c1e6 commit 2539f70
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

### Documentation

- Add `User` to the documentation
- Add a features list ([e0155add9888f3efc6b2113701f512265c54b4ac](https://github.com/hearot/pyrubrum/commit/e0155add9888f3efc6b2113701f512265c54b4ac))
- Add docstrings to `User`
- Add docstrings to `User` ([9e7c1e6cb545fafef724eeebb3fc8589aa6eca7c](https://github.com/hearot/pyrubrum/commit/9e7c1e6cb545fafef724eeebb3fc8589aa6eca7c))

### Fixes

Expand Down
3 changes: 2 additions & 1 deletion FEATURES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
### Documentation

- Add `User` to the documentation
- Add a features list ([e0155add9888f3efc6b2113701f512265c54b4ac](https://github.com/hearot/pyrubrum/commit/e0155add9888f3efc6b2113701f512265c54b4ac))
- Add docstrings to `User`
- Add docstrings to `User` ([9e7c1e6cb545fafef724eeebb3fc8589aa6eca7c](https://github.com/hearot/pyrubrum/commit/9e7c1e6cb545fafef724eeebb3fc8589aa6eca7c))

### Fixes

Expand Down
7 changes: 7 additions & 0 deletions docs/source/api/objects/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Objects
=======

.. toctree::
:caption: Defined objects

user
5 changes: 5 additions & 0 deletions docs/source/api/objects/user.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
User
====

.. autoclass:: pyrubrum.User
:members:
5 changes: 4 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@
pass


for example in filter(lambda f: f.endswith(".py"), listdir("../../examples")):
for example in filter(
lambda f: f.endswith(".py") and not f.endswith("_private.py"),
listdir("../../examples"),
):
copyfile("../../examples/" + example, "_static/examples/" + example)

with open(
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Welcome to Pyrubrum
api/handlers/index
api/keyboard/index
api/menus/index
api/objects/index
api/styles/index
api/tree/index
api/types/index
Expand Down
3 changes: 3 additions & 0 deletions docs_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
{tree}
"""
KEYBOARD_ENTITIES = ["Button", "Element", "Keyboard"]
OBJECT_ENTITIES = ["User"]
TEMPLATE = """{title}
{separators}
Expand Down Expand Up @@ -103,6 +104,8 @@ def get_file_name(s: str) -> str:
directory = "keyboard"
elif entity in TREE_ENTITIES:
directory = "tree"
elif entity in OBJECT_ENTITIES:
directory = "objects"
else:
directory = "types"

Expand Down

0 comments on commit 2539f70

Please sign in to comment.