diff --git a/docs/api/benchmark.md b/docs/api/benchmark.md new file mode 100644 index 00000000..e2a4d8b9 --- /dev/null +++ b/docs/api/benchmark.md @@ -0,0 +1,4 @@ +# Benchmark Module + +::: prediction_market_agent_tooling.benchmark + handler: python diff --git a/docs/api/config.md b/docs/api/config.md new file mode 100644 index 00000000..610773e0 --- /dev/null +++ b/docs/api/config.md @@ -0,0 +1,4 @@ +# Configuration Module + +::: prediction_market_agent_tooling.config + handler: python diff --git a/docs/api/deploy.md b/docs/api/deploy.md new file mode 100644 index 00000000..61b12a70 --- /dev/null +++ b/docs/api/deploy.md @@ -0,0 +1,4 @@ +# Deploy Module + +::: prediction_market_agent_tooling.deploy + handler: python diff --git a/docs/api/gtypes.md b/docs/api/gtypes.md new file mode 100644 index 00000000..df18bd7c --- /dev/null +++ b/docs/api/gtypes.md @@ -0,0 +1,4 @@ +# Global Types + +::: prediction_market_agent_tooling.gtypes + handler: python diff --git a/docs/api/index.md b/docs/api/index.md new file mode 100644 index 00000000..26328b75 --- /dev/null +++ b/docs/api/index.md @@ -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) diff --git a/docs/api/markets.md b/docs/api/markets.md new file mode 100644 index 00000000..fd10f93d --- /dev/null +++ b/docs/api/markets.md @@ -0,0 +1,4 @@ +# Markets Module + +::: prediction_market_agent_tooling.markets + handler: python diff --git a/docs/api/monitor.md b/docs/api/monitor.md new file mode 100644 index 00000000..8ee12983 --- /dev/null +++ b/docs/api/monitor.md @@ -0,0 +1,4 @@ +# Monitor Module + +::: prediction_market_agent_tooling.monitor + handler: python diff --git a/docs/api/tools.md b/docs/api/tools.md new file mode 100644 index 00000000..1123197d --- /dev/null +++ b/docs/api/tools.md @@ -0,0 +1,4 @@ +# Tools Module + +::: prediction_market_agent_tooling.tools + handler: python diff --git a/docs/requirements.txt b/docs/requirements.txt index 9a8a4ca4..02a4dd94 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,5 @@ mkdocs mkdocs-material +mkdocstrings +mkdocstrings-python +ruff diff --git a/mkdocs.yml b/mkdocs.yml index e3780ea6..815cdac6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,5 @@ site_name: Prediction Market Agent Tooling + nav: - Home: index.md - Prediction Market Agents: @@ -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 diff --git a/prediction_market_agent_tooling/__init__.py b/prediction_market_agent_tooling/__init__.py new file mode 100644 index 00000000..9c399206 --- /dev/null +++ b/prediction_market_agent_tooling/__init__.py @@ -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)) + diff --git a/prediction_market_agent_tooling/abis/__init__.py b/prediction_market_agent_tooling/abis/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/deploy/__init__.py b/prediction_market_agent_tooling/deploy/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/deploy/gcp/__init__.py b/prediction_market_agent_tooling/deploy/gcp/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/jobs/omen/__init__.py b/prediction_market_agent_tooling/jobs/omen/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/markets/__init__.py b/prediction_market_agent_tooling/markets/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/markets/metaculus/__init__.py b/prediction_market_agent_tooling/markets/metaculus/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/markets/polymarket/__init__.py b/prediction_market_agent_tooling/markets/polymarket/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/markets/seer/__init__.py b/prediction_market_agent_tooling/markets/seer/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/monitor/__init__.py b/prediction_market_agent_tooling/monitor/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/monitor/financial_metrics/__init__.py b/prediction_market_agent_tooling/monitor/financial_metrics/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/monitor/markets/__init__.py b/prediction_market_agent_tooling/monitor/markets/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/__init__.py b/prediction_market_agent_tooling/tools/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/betting_strategies/__init__.py b/prediction_market_agent_tooling/tools/betting_strategies/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/caches/__init__.py b/prediction_market_agent_tooling/tools/caches/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/db/__init__.py b/prediction_market_agent_tooling/tools/db/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/image_gen/__init__.py b/prediction_market_agent_tooling/tools/image_gen/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/ipfs/__init__.py b/prediction_market_agent_tooling/tools/ipfs/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/omen/__init__.py b/prediction_market_agent_tooling/tools/omen/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/relevant_news_analysis/__init__.py b/prediction_market_agent_tooling/tools/relevant_news_analysis/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/prediction_market_agent_tooling/tools/tavily/__init__.py b/prediction_market_agent_tooling/tools/tavily/__init__.py new file mode 100644 index 00000000..e69de29b