Skip to content

Commit

Permalink
Merge branch 'main' into fix_async_streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
Anmol6 committed Dec 8, 2023
2 parents 4de3fcd + 9b7fbbb commit ed54dee
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 3 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Ruff
on: [push, pull_request]
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: chartboost/ruff-action@v1
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.7
hooks:
# Run the linter.
- id: ruff
args: [ --fix ]
# Run the formatter.
- id: ruff-format
15 changes: 15 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,18 @@ If you need ideas, you can check out the [help wanted](https://github.com/jxnl/i
<a href="https://github.com/jxnl/instructor/graphs/contributors">
<img src="https://contrib.rocks/image?repo=jxnl/instructor" />
</a>


## Additional Resources

To enhance your understanding of the documentation, here are some useful references:

- **mkdocs serve:** The `mkdocs serve` command is used to preview your documentation locally during the development phase. When you run this command in your terminal, MkDocs starts a development server, allowing you to view and interact with your documentation in a web browser. This is helpful for checking how your changes look before publishing the documentation. Learn more in the [mkdocs serve documentation](https://www.mkdocs.org/commands/serve/).

- **hl_lines in Code Blocks:** The `hl_lines` feature in code blocks allows you to highlight specific lines within the code block. This is useful for drawing attention to particular lines of code when explaining examples or providing instructions. You can specify the lines to highlight using the `hl_lines` option in your code block configuration. For more details and examples, you can refer to the [hl_lines documentation](https://www.mkdocs.org/user-guide/writing-your-docs/#syntax-highlighting).

- **Admonitions:** Admonitions are a way to visually emphasize or call attention to certain pieces of information in your documentation. They come in various styles, such as notes, warnings, tips, etc. Admonitions provide a structured and consistent way to present important content. For usage examples and details on incorporating admonitions into your documentation, you can refer to the [admonitions documentation](https://www.mkdocs.org/user-guide/writing-your-docs/#admonitions).

For more details about the documentation structure and features, refer to the [MkDocs Material documentation](https://squidfunk.github.io/mkdocs-material/).

Thank you for your contributions, and happy coding!
2 changes: 1 addition & 1 deletion examples/task_planner/task_planner_topological_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _get_execution_order(self) -> List[int]:
tmp_dep_graph = {item.id: set(item.subtasks) for item in self.task_graph}

def topological_sort(
dep_graph: dict[int, set[int]]
dep_graph: dict[int, set[int]],
) -> Generator[set[int], None, None]:
while True:
ordered = set(item for item, dep in dep_graph.items() if len(dep) == 0)
Expand Down
2 changes: 1 addition & 1 deletion instructor/cli/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def delete(file_id: str = typer.Argument(..., help="ID of the file to delete")):
help="Monitor the status of a file on OpenAI's servers",
)
def status(
file_id: str = typer.Argument(..., help="ID of the file to check the status of")
file_id: str = typer.Argument(..., help="ID of the file to check the status of"),
):
with console.status(f"Monitoring status of file {file_id}...") as status:
while True:
Expand Down
4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ openai>=1.1.0
pydantic
docstring-parser
rich
aiohttp
aiohttp
ruff==0.1.7
pre-commit==3.5.0

0 comments on commit ed54dee

Please sign in to comment.