A simple context builder and converter toolkit
Project description
ContextMaker
Feature to enrich the CMBAgents: Multi-Agent System for Science, Made by Cosmologists, Powered by AG2.
Acknowledgments
This project uses the CAMB code developed by Antony Lewis and collaborators. Please see the CAMB website and documentation for more information.
Installation
Install ContextMaker from PyPI:
pip install contextmaker
Usage
From the Command Line
ContextMaker automatically finds libraries on your system and generates complete documentation with function signatures and docstrings.
# Convert a library's documentation (automatic search)
contextmaker library_name
# Example: convert pixell documentation
contextmaker pixell
# Example: convert numpy documentation
contextmaker numpy
Advanced Usage
# Specify custom output path
contextmaker pixell --output ~/Documents/my_docs
# Specify manual input path (overrides automatic search)
contextmaker pixell --input_path /path/to/library/source
Output
- Default location:
~/your_context_library/library_name.txt - Content: Complete documentation with function signatures, docstrings, examples, and API references
- Format: Clean text optimized for AI agent ingestion
From a Python Script
You can also use ContextMaker programmatically in your Python scripts:
import contextmaker
# Minimal usage (automatic search, default output path)
contextmaker.convert("pixell")
# With custom output path
contextmaker.convert("pixell", output_path="/tmp")
# With manual input path
contextmaker.convert("pixell", input_path="/path/to/pixell/source")
This will generate a text file with the complete documentation, just like the CLI.
Supported Inputs
- Sphinx documentation (conf.py +
.rst) - Complete documentation with signatures - Markdown README files (
README.md) - Jupyter notebooks (
.ipynb) - Python source files with docstrings (auto-generated docs if no user docs)
Library Requirements
For complete documentation extraction, the library should have:
- A
docs/ordoc/directory containingconf.pyandindex.rst - Source code accessible for docstring extraction
If only the installed package is found (without Sphinx docs), ContextMaker will extract available docstrings from the source code.
Troubleshooting
Library not found
# Use manual path
contextmaker pixell --input_path /path/to/pixell/repo
No documentation detected
- Ensure the library has a
docs/ordoc/directory withconf.pyandindex.rst - Clone the official repository if using an installed package
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file contextmaker-0.0.2.tar.gz.
File metadata
- Download URL: contextmaker-0.0.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5034ed97258d2964747c5e532e0c9cb26b40eb4cf7b2301924780bbc75a30bb5
|
|
| MD5 |
17699ef3f0b0b31e9d019551079d459f
|
|
| BLAKE2b-256 |
8f3113122ac4899d1c1de06a146cf1ecc6e20c9c63cffff20d231682e1b5dfc7
|
File details
Details for the file contextmaker-0.0.2-py3-none-any.whl.
File metadata
- Download URL: contextmaker-0.0.2-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66715557b49f0975e8485b7fdef9681d5be171729b546948fb93da3f8f430599
|
|
| MD5 |
64e35a6f2434435b1ec2aee87620812f
|
|
| BLAKE2b-256 |
1da1211dd4a36be5bfafc8c18558f711ae8a7d89ddbc036777f27e6c4ac9f99e
|