Skip to content

Commit

Permalink
docs: format and clean up warnings/errors (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
lamchau authored Oct 8, 2024
1 parent 5029b19 commit c3c5a4d
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 59 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ We welcome Pull Requests for general contributions. If you have a larger new fea

Goose uses [uv][uv] for dependency management, and formats with [ruff][ruff].
Clone goose and make sure you have installed `uv` to get started. When you use
`uv` below in your local goose directly, it will automatically setup the virtualenv
and install dependencies.
`uv` below in your local goose directly, it will automatically setup the virtualenv
and install dependencies.

We provide a shortcut to standard commands using [just][just] in our `justfile`.

Expand Down Expand Up @@ -42,7 +42,7 @@ To run the test suite against your edges, use `pytest`:
uv run pytest tests -m "not integration"
```

or, as a shortcut,
or, as a shortcut,

```sh
just test
Expand Down Expand Up @@ -76,7 +76,7 @@ This project follows the [Conventional Commits](https://www.conventionalcommits.
[issues]: https://github.com/block-open-source/goose/issues
[goose-plugins]: https://github.com/block-open-source/goose-plugins
[ai-exchange]: https://github.com/block-open-source/goose/tree/main/packages/exchange
[developer]: src/goose/toolkit/developer.py
[developer]: https://github.com/block-open-source/goose/blob/dfecf829a83021b697bf2ecc1dbdd57d31727ddd/src/goose/toolkit/developer.py
[uv]: https://docs.astral.sh/uv/
[ruff]: https://docs.astral.sh/ruff/
[just]: https://github.com/casey/just
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Goose is your on-machine developer agent, automating engineering tasks seamlessl
<img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg">
</a>
<a href="https://discord.gg/7GaTvbDwga">
<img src="https://img.shields.io/discord/1287729918100246654?logo=discord&logoColor=white&label=Join+Us&color=blueviolet" alt="Discord">
<img src="https://img.shields.io/discord/1287729918100246654?logo=discord&logoColor=white&label=Join+Us&color=blueviolet" alt="Discord">
</a>
</p>

<p align="center">
<a href="#unique-features-of-goose-compared-to-other-ai-assistants">Unique features</a> 🤖 •
<a href="#what-block-employees-have-to-say-about-goose"> Block Employees on Goose</a> <img src=docs/assets/logo.png height="15", width="15" alt="Block Emoji"/> •
<a href="#what-block-employees-have-to-say-about-goose"> Block Employees on Goose</a> <img src="docs/assets/logo.png" height="15" width="15" alt="Block Emoji"/> •
<a href="#quick-start-guide">Quick start guide</a> 🚀 •
<a href="#getting-involved">Getting involved!</a> 👋
</p>
Expand Down Expand Up @@ -71,7 +71,7 @@ Goose is your on-machine developer agent, automating engineering tasks seamlessl
-- M, Software Engineer
> If anyone was looking for another reason to check it out: I just asked Goose to break a string-array into individual string resources across eleven localizations, and it performed amazingly well and saved me a bunch of time doing it manually or figuring out some way to semi-automate it.
> If anyone was looking for another reason to check it out: I just asked Goose to break a string-array into individual string resources across eleven localizations, and it performed amazingly well and saved me a bunch of time doing it manually or figuring out some way to semi-automate it.
-- A, Android Engineer
Expand Down Expand Up @@ -107,7 +107,7 @@ To install Goose, use `pipx`. First ensure [pipx][pipx] is installed:
brew install pipx
pipx ensurepath
```
You can also place `.goosehints` in `~/.config/goose/.goosehints` if you like for always loaded hints personal to you.
You can also place `.goosehints` in `~/.config/goose/.goosehints` if you like for always loaded hints personal to you.

Then install Goose:

Expand All @@ -117,7 +117,7 @@ pipx install goose-ai

### Running Goose

#### Start a session
#### Start a session

From your terminal, navigate to the directory you'd like to start from and run:

Expand All @@ -133,11 +133,11 @@ G❯ type your instructions here exactly as you would tell a developer.

Now you are interacting with Goose in conversational sessions - something like a natural language driven code interpreter. The default toolkit allows Goose to take actions through shell commands and file edits. You can interrupt Goose with `CTRL+D` or `ESC+Enter` at any time to help redirect its efforts.

#### Exit the session
#### Exit the session

If you are looking to exit, use `CTRL+D`, although Goose should help you figure that out if you forget.
If you are looking to exit, use `CTRL+D`, although Goose should help you figure that out if you forget.

#### Resume a session
#### Resume a session

When you exit a session, it will save the history in `~/.config/goose/sessions` directory and you can resume it later on:

Expand All @@ -151,10 +151,10 @@ To see more documentation on the CLI commands currently available to Goose check

Learn how to modify your Goose profiles.yaml file to add and remove functionality (toolkits) and providing context to get the most out of Goose in our [Getting Started Guide][getting-started].

**Want to move out of the terminal and into an IDE?**
**Want to move out of the terminal and into an IDE?**

We have some experimental IDE integrations for VSCode and JetBrains IDEs:
* https://github.com/square/goose-vscode
We have some experimental IDE integrations for VSCode and JetBrains IDEs:
* https://github.com/square/goose-vscode
* https://github.com/Kvadratni/goose-intellij

## Getting involved!
Expand Down
15 changes: 8 additions & 7 deletions docs/guidance/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This page contains two sections that will help you get started with Goose:
2. [Working with Goose](#working-with-goose): how to guide Goose through a task, and how to provide context for Goose to work with.

## Configuring Goose with the `profiles.yaml` file
On the first run, Goose will detect what LLMs are available from your environment, and generate a configuration file at `~/.config/goose/profiles.yaml`. You can edit those profiles to further configure goose.
On the first run, Goose will detect what LLMs are available from your environment, and generate a configuration file at `~/.config/goose/profiles.yaml`. You can edit those profiles to further configure goose.

Here’s what the default `profiles.yaml` could look like if Goose detects an OpenAI API key:

Expand Down Expand Up @@ -61,7 +61,7 @@ Write all code comments in French

### Toolkits

Toolkits expand Goose’s capabilities and tailor its functionality to specific development tasks. Toolkits provide Goose with additional contextual information and interactive abilities, allowing for a more comprehensive and efficient workflow.
Toolkits expand Goose’s capabilities and tailor its functionality to specific development tasks. Toolkits provide Goose with additional contextual information and interactive abilities, allowing for a more comprehensive and efficient workflow.

Here are some out-of-the-box examples:

Expand All @@ -84,23 +84,23 @@ Here are some examples:
#### Basic example plan

```md
Your goal is to refactor this fastapi application to use a sqlite database. Use `pytest -s -v -x` to run the tests when needed.
Your goal is to refactor this fastapi application to use a sqlite database. Use `pytest -s -v -x` to run the tests when needed.

- Use ripgrep to find the fastapi app and its tests in this directory
- read the files you found
- Add sqlalchemy and alembic as dependencies with poetry
- Run alembic init to set up the basic configuration
- Add sqlite dependency with Poetry
- Create new module for database code and include sqlalchemy and alembic setup
- Create new module for database code and include sqlalchemy and alembic setup
- Define an accounts table with SQLAlchemy
- Implement CRUD operations for accounts table
- Implement CRUD operations for accounts table
- Update main.py to integrate with SQLite database and use CRUD operation
- Use alembic to create the table
- Use conftest to set up a test database with a new DB URL
- Run existing test suite and ensure all tests pass. Do not edit the test case behavior, instead use tests to find issues.
```
The starting plan is specified with the tasks. Each list entry is a different step in the plan. This is a pretty detailed set of tasks, but is really just a break-down of the conversation we had in the previous section.
The starting plan is specified with the tasks. Each list entry is a different step in the plan. This is a pretty detailed set of tasks, but is really just a break-down of the conversation we had in the previous section.
The kickoff message is what gets set as the first user message when goose starts running (with the plan). This message should contain the overall goal of the tasks and could also contain extra context you want to include for this problem. In our case, we are just mentioning the test command we want to use to run the tests.
Expand Down Expand Up @@ -137,4 +137,5 @@ goose session start --plan plan.md --args dep=pytest,repo=github

[configuration]: ../configuration.md
[available-toolkits]: ../plugins/available-toolkits.md
[providers]: ../plugins/providers.md
[providers]: ../plugins/providers.md
[goose-plugins]:https://github.com/block-open-source/goose-plugins
60 changes: 28 additions & 32 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ site_description: Documentation for Goose
repo_url: https://github.com/block-open-source/goose
repo_name: "block-open-source/goose"
edit_uri: "https://github.com/block-open-source/goose/blob/main/docs/"
site_url: 'https://block-open-source.github.io/goose/'
site_url: "https://block-open-source.github.io/goose/"
use_directory_urls: false

# theme
theme:
name: material
Expand Down Expand Up @@ -39,38 +38,36 @@ theme:
favicon: assets/logo.ico
icon:
logo: assets/logo.ico

# plugins
plugins:
- include-markdown
- callouts
- glightbox
- mkdocstrings:
handlers:
python:
setup_commands:
- "import sys; sys.path.append('src')" # Add src folder to Python path
handlers:
python:
paths: [src]
setup_commands:
- "import sys; sys.path.append('src')" # Add src folder to Python path
- search:
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
- redirects:
redirect_maps:
- git-committers: # Show git committers
- git-committers: # Show git committers
branch: main
enabled: !ENV [ ENV_PROD, false ]
enabled: !ENV [ENV_PROD, false]
repository: block-open-source/goose
- git-revision-date-localized: # Show git revision date
- git-revision-date-localized: # Show git revision date
enable_creation_date: true
enabled: !ENV [ ENV_PROD, false ]

enabled: !ENV [ENV_PROD, false]
extra:
annotate:
json:
- .s2
social: [ ]
social: []
analytics:
provider: google
property: !ENV GOOGLE_ANALYTICS_KEY

markdown_extensions:
- abbr
- admonition
Expand Down Expand Up @@ -111,27 +108,26 @@ markdown_extensions:
- pymdownx.tilde
- toc:
permalink: true

nav:
- Home: index.md
- 'Installation': installation.md
- 'Contributing': contributing.md
- "Installation": installation.md
- "Contributing": contributing.md
- Guidance:
- 'Getting Started': guidance/getting-started.md
- 'Quick Tips': guidance/tips.md
- 'Applications of Goose': guidance/applications.md
- 'Goose in Action': guidance/goose-in-action.md
- "Getting Started": guidance/getting-started.md
- "Quick Tips": guidance/tips.md
- "Applications of Goose": guidance/applications.md
- "Goose in Action": guidance/goose-in-action.md
- Plugins:
- 'Overview': plugins/plugins.md
- Toolkits:
- 'Using Toolkits': plugins/using-toolkits.md
- 'Creating a New Toolkit': plugins/creating-a-new-toolkit.md
- 'Available Toolkits': plugins/available-toolkits.md
- CLI Commands:
- 'Available CLI Commands': plugins/cli.md
- Providers:
- 'Available Providers': plugins/providers.md
- "Overview": plugins/plugins.md
- Toolkits:
- "Using Toolkits": plugins/using-toolkits.md
- "Creating a New Toolkit": plugins/creating-a-new-toolkit.md
- "Available Toolkits": plugins/available-toolkits.md
- CLI Commands:
- "Available CLI Commands": plugins/cli.md
- Providers:
- "Available Providers": plugins/providers.md
- Advanced:
- Configuration: configuration.md
- 'Reference':
- 'API Docs': reference/index.md
- "Reference":
- "API Docs": reference/index.md
6 changes: 1 addition & 5 deletions src/goose/cli/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,7 @@ def run(self) -> None:
self._log_cost()

def reply(self) -> None:
"""Reply to the last user message, calling tools as needed
Args:
text (str): The text input from the user.
"""
"""Reply to the last user message, calling tools as needed"""
self.status_indicator.update("responding")
response = self.exchange.generate()

Expand Down

0 comments on commit c3c5a4d

Please sign in to comment.