Skip to content

Commit

Permalink
Merge branch 'main' into use-lsp
Browse files Browse the repository at this point in the history
* main: (41 commits)
  chore: Add goose providers list command (#116)
  docs: working ollama for desktop (#125)
  docs: format and clean up warnings/errors (#120)
  docs: update deploy workflow (#124)
  feat: Implement a goose run command (#121)
  feat: saved api_key to keychain for user (#104)
  docs: add callout plugin (#119)
  chore: add a page to docs for Goose application examples (#117)
  fix: exit the goose and show the error message when provider environment variable is not set (#103)
  fix: Update OpenAI pricing per https://openai.com/api/pricing/ (#110)
  fix: update developer tool prompts to use plan task status to match allowable statuses update_plan tool call (#107)
  fix: removed the panel in the output so that the user won't have unnecessary pane borders in the copied content (#109)
  docs: update links to exchange to the new location (#108)
  chore: setup workspace for exchange (#105)
  fix: resolve uvx when using a git client or IDE (#98)
  ci: add include-markdown for mkdocs (#100)
  chore: fix broken badge on readme (#102)
  feat: add global optional user goosehints file (#73)
  docs: update docs (#99)
  chore(release): release 0.9.3 (#97)
  ...
  • Loading branch information
lukealvoeiro committed Oct 9, 2024
2 parents 7e72a84 + 8276e9b commit 61d36c7
Show file tree
Hide file tree
Showing 182 changed files with 9,384 additions and 747 deletions.
79 changes: 76 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [main]

jobs:
build:
exchange:
runs-on: ubuntu-latest

steps:
Expand All @@ -19,9 +19,82 @@ jobs:

- name: Ruff
run: |
uvx ruff check
uvx ruff format --check
uvx ruff check packages/exchange
uvx ruff format packages/exchange --check
- name: Run tests
working-directory: ./packages/exchange
run: |
uv run pytest tests -m 'not integration'
goose:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Source Cargo Environment
run: source $HOME/.cargo/env

- name: Ruff
run: |
uvx ruff check src tests
uvx ruff format src tests --check
- name: Run tests
run: |
uv run pytest tests -m 'not integration'
# This runs integration tests of the OpenAI API, using Ollama to host models.
# This lets us test PRs from forks which can't access secrets like API keys.
ollama:
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
# Only test the lastest python version.
- "3.12"
ollama-model:
# For quicker CI, use a smaller, tool-capable model than the default.
- "qwen2.5:0.5b"

steps:
- uses: actions/checkout@v4

- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh

- name: Source Cargo Environment
run: source $HOME/.cargo/env

- name: Set up Python
run: uv python install ${{ matrix.python-version }}

- name: Install Ollama
run: curl -fsSL https://ollama.com/install.sh | sh

- name: Start Ollama
run: |
# Run the background, in a way that survives to the next step
nohup ollama serve > ollama.log 2>&1 &
# Block using the ready endpoint
time curl --retry 5 --retry-connrefused --retry-delay 1 -sf http://localhost:11434
# Tests use OpenAI which does not have a mechanism to pull models. Run a
# simple prompt to (pull and) test the model first.
- name: Test Ollama model
run: ollama run $OLLAMA_MODEL hello || cat ollama.log
env:
OLLAMA_MODEL: ${{ matrix.ollama-model }}

- name: Run Ollama tests
run: uv run pytest tests -m integration -k ollama
working-directory: ./packages/exchange
env:
OLLAMA_MODEL: ${{ matrix.ollama-model }}
25 changes: 25 additions & 0 deletions .github/workflows/deploy_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Deploy MkDocs

on:
push:
branches:
- main # Trigger deployment on pushes to main

paths:
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/deploy_docs.yaml'

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install UV
uses: astral-sh/setup-uv@v3

- name: Build the documentation
run: uv run mkdocs gh-deploy --force
50 changes: 50 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish

# A release on goose will also publish exchange, if it has updated
# This means in some cases we may need to make a bump in goose without other changes to release exchange
on:
release:
types: [published]

jobs:
publish:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Get current version from pyproject.toml
id: get_version
run: |
echo "VERSION=$(grep -m 1 'version =' "pyproject.toml" | awk -F'"' '{print $2}')" >> $GITHUB_ENV
- name: Extract tag version
id: extract_tag
run: |
TAG_VERSION=$(echo "${{ github.event.release.tag_name }}" | sed -E 's/v(.*)/\1/')
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
- name: Check if tag matches version from pyproject.toml
id: check_tag
run: |
if [ "${{ env.TAG_VERSION }}" != "${{ env.VERSION }}" ]; then
echo "::error::Tag version (${{ env.TAG_VERSION }}) does not match version in pyproject.toml (${{ env.VERSION }})."
exit 1
fi
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v1
with:
version: "latest"

- name: Build Package
run: |
uv build -o dist --package goose-ai
uv build -o dist --package ai-exchange
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
47 changes: 0 additions & 47 deletions .github/workflows/pypi_release.yaml

This file was deleted.

36 changes: 10 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
Expand All @@ -49,7 +47,6 @@ coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
Expand All @@ -58,8 +55,6 @@ coverage.xml
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
Expand All @@ -68,7 +63,11 @@ instance/
# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
Expand All @@ -88,7 +87,8 @@ ipython_config.py
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
Expand All @@ -100,12 +100,8 @@ celerybeat.pid

# Environments
.env
.env.*
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
Expand All @@ -114,30 +110,18 @@ venv.bak/
# Rope project settings
.ropeproject

# Ignore mkdocs site files generated locally for testing/validation, but generated
# at buildtime in production
site/
docs/docs/notebooks*
# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# Hermit
.hermit

# VSCode
.vscode

# Autogenerated docs files
docs/docs/reference

## goose session files
.goose

# ignore lockfile
# uv lock file
uv.lock
2 changes: 1 addition & 1 deletion .goosehints
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
This is a python CLI app that uses UV. Read CONTRIBUTING.md for information on how to build and test it as needed.
Some key concepts are that it is run as a command line interface, dependes on the "ai-exchange" package, and has the concept of toolkits which are ways that its behavior can be extended. Look in src/goose and tests.
Once the user has UV installed it should be able to be used effectively along with uvx to run tasks as needed
Once the user has UV installed it should be able to be used effectively along with uvx to run tasks as needed
Empty file added .nojekyll
Empty file.
2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,4 @@ def example_history(self):
...
```

[exchange]: https://github.com/squareup/exchange
[exchange]: https://github.com/block-open-source/goose/tree/main/packages/exchange
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,32 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.3] - 2024-09-25

- feat: auto save sessions before next user input (#94)
- fix: removed the diff when default profile changes (#92)
- feat: add shell-completions subcommand (#76)
- chore: update readme! (#96)
- chore: update docs again (#77)
- fix: remove overly general match for long running commands (#87)
- fix: default ollama to tested model (#88)
- fix: Resize file in screen toolkit (#81)
- fix: enhance shell() to know when it is interactive (#66)
- docs: document how to run goose fully from source from any dir (#83)
- feat: track cost and token usage in log file (#80)
- chore: add link to docs in read me (#85)
- docs: add in ollama (#82)
- chore: add just command for releasing goose (#55)
- feat: support markdown plans (#79)
- feat: add version options (#74)
- docs: fixing exchange url to public version (#67)
- docs: Update CONTRIBUTING.md (#69)
- chore: create mkdocs for goose (#70)
- docs: fix broken link (#71)
- feat: give commands the ability to execute logic (#63)
- feat: jira toolkit (#59)
- feat: run goose in a docker-style sandbox (#44)

## [0.9.0] - 2024-09-10

This also updates the minimum version of exchange to 0.9.0.
Expand Down
Loading

0 comments on commit 61d36c7

Please sign in to comment.