-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor everything into a python package
- Loading branch information
1 parent
e9fec98
commit 4f89666
Showing
11 changed files
with
284 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
[build-system] | ||
requires = ["setuptools>=42.0.0", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
|
||
|
||
[tool.black] | ||
line-length = 79 | ||
target-version = ['py39', 'py310', 'py311'] | ||
|
||
|
||
[tool.ruff] | ||
line-length = 79 | ||
select = [ | ||
"E", "F", "W", #flake8 | ||
"UP", # pyupgrade | ||
"I", # isort | ||
"BLE", # flake8-blind-exception | ||
"B", # flake8-bugbear | ||
"A", # flake8-builtins | ||
"C4", # flake8-comprehensions | ||
"ISC", # flake8-implicit-str-concat | ||
"G", # flake8-logging-format | ||
"PIE", # flake8-pie | ||
"SIM", # flake8-simplify | ||
] | ||
ignore = [ | ||
"E501", # line too long. let black handle this | ||
"UP006", "UP007", # type annotation. As using magicgui require runtime type annotation then we disable this. | ||
"SIM117", # flake8-simplify - some of merged with statements are not looking great with black, reanble after drop python 3.9 | ||
] | ||
|
||
exclude = [ | ||
".bzr", | ||
".direnv", | ||
".eggs", | ||
".git", | ||
".mypy_cache", | ||
".pants.d", | ||
".ruff_cache", | ||
".svn", | ||
".tox", | ||
".venv", | ||
"__pypackages__", | ||
"_build", | ||
"buck-out", | ||
"build", | ||
"dist", | ||
"node_modules", | ||
"venv", | ||
"*vendored*", | ||
"*_vendor*", | ||
] | ||
|
||
target-version = "py39" | ||
fix = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,55 @@ | ||
## git-bob | ||
# git-bob | ||
|
||
git-bob is Python package that uses AI to answer github-issues and review pull-requests. | ||
Under the hood it uses [claude](https://claude.ai) to understand the text and | ||
[pygithub](https://github.com/PyGithub/PyGithub) to interact with the issues and pull-requests. | ||
|
||
## Installation as github action | ||
|
||
To use git-bob in your github repository, you need to | ||
* setup github workflows like shown in [this folder](.github/workflows). Make sure to replace `pip install -e .` with a specific git-bob version such as `pip install git-bob==0.1.0`. | ||
* configure a github secret called "ANTHROPIC_API_KEY" with your API key for [claude](https://claude.ai). | ||
* configure github actions to run the workflow on issues and pull-requests. Also give write-access to the action runner. | ||
|
||
To trigger git-bob, you need to comment on an issue or pull-request with the following commands: | ||
|
||
``` | ||
git-bob comment | ||
``` | ||
|
||
## Installation as command-line tool | ||
|
||
You can also install git-bob locally and run it from the terminal. | ||
In this case, create a github token and store it in an environment variable named `GITHUB_API_KEY`. | ||
Then you can run git-bob like this: | ||
|
||
```bash | ||
pip install git-bob | ||
``` | ||
|
||
## Usage as command-line tool | ||
|
||
You can use git-bob from the terminal on repositories you have read/write access to. | ||
|
||
```bash | ||
git_bob <action> <organization>/<repository> <issue-number> | ||
``` | ||
|
||
Available actions: | ||
* `review-pull-request` | ||
* `comment-on-issue` | ||
|
||
## Similar projects | ||
|
||
There are similar projects out there | ||
* [Claude Engineer](https://github.com/Doriandarko/claude-engineer) | ||
* [BioChatter](https://github.com/biocypher/biochatter) | ||
* [aider](https://github.com/paul-gauthier/aider) | ||
* [OpenDevin](https://github.com/OpenDevin/OpenDevin) | ||
* [Devika](https://github.com/stitionai/devika) | ||
* [GPT-Codemaster](https://github.com/dex3r/GPT-Codemaster) | ||
|
||
## Contributing | ||
|
||
Feedback and contributions are welcome! Just open an issue and let's discuss before you send a pull-request. | ||
A [human](https://haesleinhuepf.github.io) will respond and comment on your ideas! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
[metadata] | ||
name = git-bob | ||
version = attr: git_bob.__version__ | ||
description = An AI-based assistant for handling github issues and pull-requests | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/haesleinhuepf/git-bob | ||
author = Robert Haase | ||
author_email = [email protected] | ||
license = BSD-3-Clause | ||
license_files = LICENSE | ||
classifiers = | ||
Development Status :: 2 - Pre-Alpha | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: BSD License | ||
Operating System :: OS Independent | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3 :: Only | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3.11 | ||
Topic :: Scientific/Engineering :: Image Processing | ||
project_urls = | ||
Bug Tracker = https://github.com/haesleinhuepf/git-bob/issues | ||
Documentation = https://github.com/haesleinhuepf/git-bob#README.md | ||
Source Code = https://github.com/haesleinhuepf/git-bob | ||
User Support = https://github.com/haesleinhuepf/git-bob/issues | ||
|
||
[options] | ||
packages = find: | ||
install_requires = | ||
anthropic | ||
pygithub | ||
|
||
python_requires = >=3.9 | ||
include_package_data = True | ||
package_dir = | ||
=src | ||
|
||
# add your package requirements here | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[options.extras_require] | ||
testing = | ||
tox | ||
pytest # https://docs.pytest.org/en/latest/contents.html | ||
pytest-cov # https://pytest-cov.readthedocs.io/en/latest/ | ||
|
||
[options.package_data] | ||
* = *.yaml | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
git-bob = git_bob._terminal:command_line_interface |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
from setuptools import setup | ||
|
||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
__version__ = "0.1.0" | ||
|
||
__all__ = ( | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.