Skip to main content

A simple context builder and converter toolkit

Project description

ContextMaker

License Python

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/ or doc/ directory containing conf.py and index.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/ or doc/ directory with conf.py and index.rst
  • Clone the official repository if using an installed package

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

contextmaker-0.1.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

contextmaker-0.1.2-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file contextmaker-0.1.2.tar.gz.

File metadata

  • Download URL: contextmaker-0.1.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for contextmaker-0.1.2.tar.gz
Algorithm Hash digest
SHA256 389da493afa656dd0db9de32f6e000a76eb6ab0f59d7c5982d24fe5b0fffc048
MD5 01dd439ca6374a6abc58381f49c45432
BLAKE2b-256 fd58830a868c363194c33f753a38939352780888497411fde754b5e848f0e47c

See more details on using hashes here.

File details

Details for the file contextmaker-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: contextmaker-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for contextmaker-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1c043ba060fde831b81d7b21d50a2f345b46edc1f85a6b4ded0da81e388dea86
MD5 9a66d0e87b95a89564b8808c25864b78
BLAKE2b-256 0a3237b11fa58ca79890d629acf6bbfcfe0b02ec8b0b6eee23dc4edbdbb31b89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page