Thank you for your interest in contributing to the MASA Project! This guide will help you understand our documentation best practices and how to contribute effectively.
-
Keep it up to date: Always update the documentation when you make changes to the code.
-
Use clear and concise language: Write in simple, easy-to-understand terms.
-
Provide examples: Include code snippets and usage examples where appropriate.
-
Follow the structure: Maintain the existing documentation structure for consistency.
-
Use proper formatting: Utilize Markdown for README.md and reStructuredText for Sphinx documentation.
-
Document all public APIs: Ensure all public functions, classes, and modules have docstrings.
-
Cross-reference: Link related sections of the documentation where relevant.
-
Test your documentation: Ensure code examples work and instructions are accurate.
- Keep it concise and focused on getting users started quickly.
- Update the quick start guide if installation or basic usage changes.
- Ensure links to full documentation are correct.
-
Updating existing pages:
- Find the relevant
.rst
file indocs/source
. - Make your changes, following the existing style and structure.
- Find the relevant
-
Adding new pages:
- Create a new
.rst
file in thedocs/source
directory. - Add the new page to the table of contents in
index.rst
.
- Create a new
-
Docstrings:
- Use Google-style docstrings for Python code.
- Ensure all parameters, return values, and exceptions are documented.
-
Viewing updated documentation:
- The documentation is automatically rebuilt when viewed using the CLI command:
masa-cli --docs [page_name]
- This command will rebuild the docs and open them in your default web browser.
- The documentation is automatically rebuilt when viewed using the CLI command:
-
Manual rebuilding (if necessary):
- Navigate to the
docs
directory. - Run:
python update_docs.py
- The built HTML will be in
docs/build/html
.
- Navigate to the
Remember, you don't need to manually build the documentation for normal development work, as it's automatically rebuilt when viewed through the CLI.
- Create a new branch for your changes.
- Make your changes and commit them with a clear, descriptive commit message.
- Push your branch and create a pull request.
- In the pull request description, explain the changes you've made to the code and documentation.
- Follow PEP 8 guidelines for Python code.
- Use meaningful variable and function names.
- Keep functions small and focused on a single task.
- Write unit tests for new functionality.
- Use the GitHub issue tracker to report bugs or suggest enhancements.
- Provide a clear description of the issue or enhancement.
- Include steps to reproduce for bugs, and use case scenarios for enhancements.
Thank you for helping improve the MASA Project! Your contributions are valued and appreciated.