Skip to content

Commit

Permalink
feat(starting-out): Start some work (#1)
Browse files Browse the repository at this point in the history
* feat(starting-out): Start some work

get to work

  - add precommit rules i like
  - remove sourcery, maybe re-add later

* add semver
  • Loading branch information
ericsomdahl committed May 10, 2023
1 parent 252fa8a commit 4475219
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ end_of_line = lf
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
insert_final_newline = true
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ci
on:
push:
branches:
- master
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
repos:
- repo: https://github.com/sourcery-ai/sourcery
rev: v1.1.0 # Get the latest tag from https://github.com/sourcery-ai/sourcery/tags
hooks:
- id: sourcery

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v0.9.2
rev: v4.4.0
hooks:
- id: check-added-large-files
args: [ '--maxkb=500' ]
Expand All @@ -14,7 +9,12 @@ repos:
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements

- id: end-of-file-fixer
- id: detect-private-key
- id: forbid-submodules
- id: mixed-line-ending
- id: trailing-whitespace

- repo: local
hooks:
- id: isort
Expand All @@ -30,4 +30,4 @@ repos:
language: python
types: [ python ]
exclude: .+/(dist|.venv|venv|build)/.+
pass_filenames: true
pass_filenames: true
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ qa:
style:
$(call helpers,style)

.PHONY: clean qa style
.PHONY: clean qa style
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A starting point for developing your own external plug-in for Auto-GPT

1. **Clone or download the plugin repository:**
Clone the plugin repository, or download the repository as a zip file.

![Download Zip](https://raw.githubusercontent.com/BillSchumacher/Auto-GPT/master/plugin.png)

2. **Install the plugin's dependencies (if any):**
Expand Down
2 changes: 1 addition & 1 deletion helpers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ case "$1" in
esac

printf 'Done!\n\n'
exit 0
exit 0
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ profile = "black"
disable = "C0330, C0326"

[tool.pylint.format]
max-line-length = "88"
max-line-length = "88"
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ abstract-singleton
wheel
setuptools
build
twine
twine
yfinance
12 changes: 4 additions & 8 deletions src/auto_gpt_plugin_template/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This is a template for Auto-GPT plugins."""
import abc
from typing import Any, Dict, List, Optional, Tuple, TypeVar, TypedDict
from typing import Any, Dict, List, Optional, Tuple, TypedDict, TypeVar

from abstract_singleton import AbstractSingleton, Singleton

Expand Down Expand Up @@ -245,21 +245,17 @@ def handle_chat_completion(
pass

@abc.abstractmethod
def can_handle_text_embedding(
self, text: str
) -> bool:
def can_handle_text_embedding(self, text: str) -> bool:
"""This method is called to check that the plugin can
handle the text_embedding method.
Args:
text (str): The text to be convert to embedding.
Returns:
bool: True if the plugin can handle the text_embedding method."""
return False

@abc.abstractmethod
def handle_text_embedding(
self, text: str
) -> list:
def handle_text_embedding(self, text: str) -> list:
"""This method is called when the chat completion is done.
Args:
text (str): The text to be convert to embedding.
Expand Down

0 comments on commit 4475219

Please sign in to comment.