Skip to content

Commit

Permalink
Docs (#607)
Browse files Browse the repository at this point in the history
* added mkdocstrings

* divided content into larger categories
  • Loading branch information
skundu42 committed Feb 6, 2025
1 parent 4a43c6d commit 8433961
Show file tree
Hide file tree
Showing 31 changed files with 126 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api/benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Benchmark Module

::: prediction_market_agent_tooling.benchmark
handler: python
4 changes: 4 additions & 0 deletions docs/api/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Configuration Module

::: prediction_market_agent_tooling.config
handler: python
4 changes: 4 additions & 0 deletions docs/api/deploy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Deploy Module

::: prediction_market_agent_tooling.deploy
handler: python
4 changes: 4 additions & 0 deletions docs/api/gtypes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Global Types

::: prediction_market_agent_tooling.gtypes
handler: python
15 changes: 15 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Reference

Welcome to the API Reference for **Prediction Market Agent Tooling**.

This section provides detailed documentation of all modules. It is recommended to use the search function to quickly navigate to the function/module you want to learn about.

## Core Modules

- [Benchmark](benchmark.md)
- [Deploy](deploy.md)
- [Markets](markets.md)
- [Monitor](monitor.md)
- [Tools](tools.md)
- [Configuration](config.md)
- [Global Types](gtypes.md)
4 changes: 4 additions & 0 deletions docs/api/markets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Markets Module

::: prediction_market_agent_tooling.markets
handler: python
4 changes: 4 additions & 0 deletions docs/api/monitor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Monitor Module

::: prediction_market_agent_tooling.monitor
handler: python
4 changes: 4 additions & 0 deletions docs/api/tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Tools Module

::: prediction_market_agent_tooling.tools
handler: python
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
mkdocs
mkdocs-material
mkdocstrings
mkdocstrings-python
ruff
41 changes: 41 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
site_name: Prediction Market Agent Tooling

nav:
- Home: index.md
- Prediction Market Agents:
Expand All @@ -10,9 +11,49 @@ nav:
- Benchmarker: benchmarker.md
- Example Agent: exampleagent.md
- Deploy with Safe: deploywithsafe.md
- Reference:
- Overview: api/index.md
- Core Modules:
- Benchmark: api/benchmark.md
- Deploy: api/deploy.md
- Markets: api/markets.md
- Monitor: api/monitor.md
- Tools: api/tools.md
- Configuration: api/config.md
- Global Types: api/gtypes.md
- Contributing: contributing.md

theme:
name: material
features:
- navigation.expand

plugins:
- search
- mkdocstrings:
default_handler: python
handlers:
python:
options:
show_source: true
show_root_heading: true
show_root_toc_entry: true
show_if_no_docstring: true
separate_signature: true
members_order: source
docstring_section_style: table
show_signature_annotations: true
show_bases: true
show_inheritance: true
show_submodules: true
merge_init_into_class: true
show_if_no_docstring: true
inherited_members: true
members: true
filters: ["!^_"]

markdown_extensions:
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.details
- pymdownx.emoji
39 changes: 39 additions & 0 deletions prediction_market_agent_tooling/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
"""
Prediction Market Agent Tooling
This package provides tools and utilities for interacting with prediction markets.
"""

import pkgutil
import importlib
import sys

# Define all modules that should be available
__all__ = []

# Ensure package is importable from subdirectories
package_name = __name__

for loader, module_name, is_pkg in pkgutil.walk_packages(__path__, prefix=package_name + "."):
try:
imported_module = importlib.import_module(module_name)
globals()[module_name.split(".")[-1]] = imported_module
__all__.append(module_name.split(".")[-1])
except ImportError as e:
print(f"Warning: Could not import {module_name}: {e}")

# Recursively ensure all submodules are imported
def recursive_import(package):
for loader, module_name, is_pkg in pkgutil.walk_packages(package.__path__, prefix=package.__name__ + "."):
try:
imported_module = importlib.import_module(module_name)
globals()[module_name.split(".")[-1]] = imported_module
__all__.append(module_name.split(".")[-1])
if is_pkg:
recursive_import(imported_module) # Recursively import nested submodules
except ImportError as e:
print(f"Warning: Could not import {module_name}: {e}")

# Import all submodules recursively
recursive_import(importlib.import_module(package_name))

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit 8433961

Please sign in to comment.