Thank you for considering contributing to AskDocs! This document provides guidelines and instructions for contributing.
Please be respectful and considerate of others when contributing to this project.
If you find a bug, please create an issue with:
- A clear title and description
- Steps to reproduce the bug
- Expected behavior
- Actual behavior
- Any relevant error messages or screenshots
Enhancement suggestions are welcome. Please include:
- A clear description of the enhancement
- The motivation for the enhancement
- How it would benefit users
- Fork the repository
- Create a new branch for your feature
- Add your changes
- Run tests to ensure everything works
- Submit a pull request
-
Clone the repository:
git clone https://github.com/yourusername/ask-docs.git cd ask-docs -
Install development dependencies:
pip install -e ".[dev]" -
Run tests:
pytest
-
Format code:
ruff format . -
Lint code:
ruff check . -
Clean up build artifacts after building/publishing:
# Remove build artifacts python cleanup.py # Remove everything including knowledge base and config files python cleanup.py --all
ask_docs/
├── core/ # Core functionality
├── llm/ # LLM integrations
├── cli/ # CLI interface
├── web/ # Web interface
└── tui/ # Text User Interface
- Create a new file in the
llm/directory (e.g.,llm/new_provider_llm.py) - Implement the
BaseLLMinterface - Update
llm/__init__.pyto include your new provider - Add any necessary configuration to
config.py - Add tests for your new provider
The web interface uses FastHTML. To add new features:
- Add new handlers in
web/handlers.py - Register routes in
web/app.py - Add any necessary templates or static files
The Text User Interface uses Textual. To add new features:
- Modify the app in
tui/app.py - Add new screens or widgets as needed
- Update CSS styles in
tui/style.css
Please document your code with docstrings following the Google Python Style Guide.
- Write tests for new features
- Ensure all tests pass before submitting a pull request
- Add both unit tests and integration tests as appropriate
Thank you for contributing to AskDocs!