-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1169 from swarmauri/mono/dev
Mono/dev
- Loading branch information
Showing
1,000 changed files
with
28,455 additions
and
3,079 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ env | |
/combined | ||
.venv_core* | ||
*.obj | ||
pytest_results.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# SDK Style Guide | ||
|
||
This document outlines the coding and documentation standards for our SDK. Our goal is to ensure a consistent, clear, and maintainable codebase. We adhere to established Python standards (PEP 8 and PEP 257) and specifically utilize spaCy’s docstring style. | ||
|
||
--- | ||
|
||
## Table of Contents | ||
|
||
- [General Coding Standards](#general-coding-standards) | ||
- [Docstring Conventions](#docstring-conventions) | ||
- [Overview](#overview) | ||
- [Structure](#structure) | ||
- [Example](#example) | ||
- [Contributing](#contributing) | ||
- [References](#references) | ||
|
||
--- | ||
|
||
## General Coding Standards | ||
|
||
- **PEP 8 Compliance:** | ||
Follow PEP 8 for overall code style, including naming conventions, line lengths, and whitespace usage. | ||
|
||
- **Readable and Maintainable Code:** | ||
Write clear, self-explanatory code. Refactor and comment where necessary to improve clarity. | ||
|
||
- **Consistent Formatting:** | ||
Use our style guide and formatting tools (e.g., linters, formatters) to maintain consistency across the codebase. | ||
|
||
--- | ||
|
||
## Docstring Conventions | ||
|
||
We follow spaCy’s docstring style to ensure our documentation is clear and consistent. | ||
|
||
### Overview | ||
|
||
- **Triple Double Quotes:** | ||
Use `"""` for all docstrings. | ||
|
||
- **Placement:** | ||
Place the docstring immediately after the function, method, class, or module definition. | ||
|
||
- **Imperative Mood:** | ||
Write summaries in the imperative mood (e.g., "Return", "Process", "Compute"). | ||
|
||
### Structure | ||
|
||
1. **One-Line Summary:** | ||
- A concise description of what the function/class/module does. | ||
|
||
2. **Blank Line:** | ||
- Insert a blank line after the summary if the docstring contains additional detail. | ||
|
||
3. **Extended Description:** | ||
- Provide any extra information necessary to understand the code’s purpose or behavior. | ||
|
||
4. **Parameter Section (Args):** | ||
- List each parameter, its type, and a brief description. | ||
|
||
5. **Returns Section:** | ||
- Describe the return type and the meaning of the returned value. | ||
|
||
6. **Raises Section (if applicable):** | ||
- List any exceptions that might be raised by the function. | ||
|
||
### Example | ||
|
||
Below is an example demonstrating the spaCy docstring style at the method level: | ||
|
||
```python | ||
def process_text(text: str) -> Doc: | ||
""" | ||
Process a text string and return a spaCy Doc object. | ||
This function tokenizes and annotates the input text using spaCy's NLP pipeline. | ||
Args: | ||
text (str): The input text to be processed. | ||
Returns: | ||
Doc: The processed spaCy Doc object. | ||
Raises: | ||
ValueError: If the input text is empty. | ||
""" | ||
if not text: | ||
raise ValueError("Input text must not be empty.") | ||
# Processing code goes here | ||
``` | ||
|
||
Below is an example demonstrating the spaCy docstring style at the module level: | ||
|
||
```python | ||
""" | ||
text_utils.py | ||
This module provides utilities for processing text data. It leverages spaCy's NLP | ||
pipeline to tokenize, annotate, and analyze text, offering helper classes and functions | ||
to simplify common text processing tasks. | ||
""" | ||
|
||
import spacy | ||
``` | ||
|
||
Below is an example demonstrating spaCy docstring style at the class level: | ||
|
||
```python | ||
class TextProcessor: | ||
""" | ||
A class for processing and analyzing text data using spaCy. | ||
This class provides methods to tokenize, lemmatize, and extract named entities from text. | ||
It utilizes spaCy's NLP pipeline to annotate the text and offers helper methods for | ||
common text processing tasks. | ||
Attributes: | ||
nlp (spacy.language.Language): The spaCy NLP model used for processing text. | ||
""" | ||
|
||
def __init__(self, model: str = "en_core_web_sm"): | ||
""" | ||
Initialize the TextProcessor with the specified spaCy model. | ||
Args: | ||
model (str): The name of the spaCy model to load (default is "en_core_web_sm"). | ||
""" | ||
self.nlp = spacy.load(model) | ||
|
||
def process(self, text: str): | ||
""" | ||
Process the input text and return the annotated spaCy Doc object. | ||
Args: | ||
text (str): The input text to process. | ||
Returns: | ||
spacy.tokens.Doc: The processed document with tokens, entities, and annotations. | ||
Raises: | ||
ValueError: If the input text is empty. | ||
""" | ||
if not text: | ||
raise ValueError("Input text must not be empty.") | ||
return self.nlp(text) | ||
``` |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Foundation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: "Home" | ||
hide_posts: true | ||
--- | ||
# Home | ||
|
||
Welcome to the official documentation for our Python monorepo! This site is built with [MkDocs](https://www.mkdocs.org/) and styled with [Material for MkDocs Insiders](https://squidfunk.github.io/mkdocs-material-insiders/). Here you'll find everything you need to get started, understand our guides, and explore our API references. | ||
|
||
## What You'll Find Here | ||
|
||
- **About**: Learn more about the project and its goals. | ||
- **Guide**: Step-by-step instructions on how to install, configure, and use the various tools and modules. | ||
- **API**: Detailed documentation for our Python modules. | ||
|
||
## Getting Started | ||
|
||
If you're new to the project, we recommend starting with the [About](about.md) page for an overview of our objectives. Then, head over to the [Guide](guide/installation.md) to learn how to set up and use our software. | ||
|
||
## Contributing | ||
|
||
We welcome contributions to the documentation! If you'd like to help improve the docs, please review our [Contributing Guidelines](CONTRIBUTING.md) to get started. | ||
|
||
## Feedback | ||
|
||
Have questions or feedback? Feel free to open an issue or reach out on our community channels. | ||
|
||
--- | ||
|
||
Enjoy your exploration, and happy documenting! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
authors: | ||
cobycloud: | ||
name: Jacob Stewart | ||
description: Creator | ||
avatar: https://github.com/cobycloud.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Blog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
date: 2024-01-31 | ||
tags: | ||
- Foo | ||
- Bar | ||
authors: | ||
- cobycloud | ||
--- | ||
|
||
|
||
# Hello World |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Documentation for `swarmauri_base.agents` | ||
|
||
::: swarmauri_base.agents | ||
options.extra: | ||
show_submodules: false | ||
show_inheritance: false | ||
filters: | ||
- '!.*' # exclude everything but the module docstring | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Class `swarmauri_base.agents.AgentBase.AgentBase` | ||
|
||
::: swarmauri_base.agents.AgentBase.AgentBase | ||
options.extra: | ||
show_inheritance: true | ||
|
6 changes: 6 additions & 0 deletions
6
docs/docs/src/swarmauri_base/agents/AgentConversationMixin.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Class `swarmauri_base.agents.AgentConversationMixin.AgentConversationMixin` | ||
|
||
::: swarmauri_base.agents.AgentConversationMixin.AgentConversationMixin | ||
options.extra: | ||
show_inheritance: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Class `swarmauri_base.agents.AgentRetrieveMixin.AgentRetrieveMixin` | ||
|
||
::: swarmauri_base.agents.AgentRetrieveMixin.AgentRetrieveMixin | ||
options.extra: | ||
show_inheritance: true | ||
|
Oops, something went wrong.