Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-GPT-Plugins into pr/7
  • Loading branch information
BillSchumacher committed Apr 21, 2023
1 parent 7029d47 commit 155877a
Show file tree
Hide file tree
Showing 14 changed files with 951 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Top-most EditorConfig file
root = true

# Set default charset
[*]
charset = utf-8

# Use black formatter for python files
[*.py]
profile = black

# Set defaults for windows and batch filess
[*.bat]
end_of_line = crlf
indent_style = space
indent_size = 2

# Set defaults for shell scripts
[*.sh]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = false

# Set defaults for Makefiles
[Makefile]
end_of_line = lf
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
max-line-length = 88
extend-ignore = E203
exclude =
.tox,
__pycache__,
*.pyc,
.env
venv/*
.venv/*
reports/*
dist/*
33 changes: 33 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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: git://github.com/pre-commit/pre-commit-hooks
rev: v0.9.2
hooks:
- id: check-added-large-files
args: ["--maxkb=500"]
- id: check-byte-order-marker
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: debug-statements

- repo: local
hooks:
- id: isort
name: isort-local
entry: isort
language: python
types: [python]
exclude: .+/(dist|.venv|venv|build)/.+
pass_filenames: true
- id: black
name: black-local
entry: black
language: python
types: [python]
exclude: .+/(dist|.venv|venv|build)/.+
pass_filenames: true
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ifeq ($(OS),Windows_NT)
os := win
SCRIPT_EXT := .bat
SHELL_CMD := cmd /C
else
os := nix
SCRIPT_EXT := .sh
SHELL_CMD := bash
endif

helpers = @$(SHELL_CMD) helpers$(SCRIPT_EXT) $1

clean: helpers$(SCRIPT_EXT)
$(call helpers,clean)

qa: helpers$(SCRIPT_EXT)
$(call helpers,qa)

style: helpers$(SCRIPT_EXT)
$(call helpers,style)

.PHONY: clean qa style
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
# Auto-GPT-Plugins (Coming soon)
# Auto-GPT-Plugins

Plugins for Auto-GPT

Clone this repo into the plugins direcory of [Auto-GPT](https://github.dev/Significant-Gravitas/Auto-GPT)

For interactionless use, set `ALLOWLISTED_PLUGINS=example-plugin1,example-plugin2,example-plugin3` in your `.env`

| Plugin | Description |
|--------------|-----------|
| Twitter | It does twitter things|

43 changes: 43 additions & 0 deletions helpers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env bash

clean() {
# Remove build artifacts and temporary files
rm -rf build 2>/dev/null || true
rm -rf dist 2>/dev/null || true
rm -rf __pycache__ 2>/dev/null || true
rm -rf *.egg-info 2>/dev/null || true
rm -rf **/*.egg-info 2>/dev/null || true
rm -rf *.pyc 2>/dev/null || true
rm -rf **/*.pyc 2>/dev/null || true
rm -rf reports 2>/dev/null || true
}

qa() {
# Run static analysis tools
flake8 .
python run_pylint.py
}

style() {
# Format code
isort .
black --exclude=".*\/*(dist|venv|.venv|test-results)\/*.*" .
}

if [ "$1" = "clean" ]; then
echo Removing build artifacts and temporary files...
clean
elif [ "$1" = "qa" ]; then
echo Running static analysis tools...
qa
elif [ "$1" = "style" ]; then
echo Running code formatters...
style
else
echo "Usage: $0 [clean|qa|style]"
exit 1
fi

echo Done!
echo
exit 0
Loading

0 comments on commit 155877a

Please sign in to comment.