Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Gogs and Other Git Platforms #760

Open
x66ccff opened this issue Sep 10, 2024 · 1 comment
Open

Add Support for Gogs and Other Git Platforms #760

x66ccff opened this issue Sep 10, 2024 · 1 comment
Labels
✨ enhancement New feature or request

Comments

@x66ccff
Copy link

x66ccff commented Sep 10, 2024

Describe the feature

Hey there! 👋

Love what you've done with this repo, it's super helpful! But I hit a snag when trying to use it with my Gogs setup.

Here's what happened:

I tried running:

python run.py --model_name ollama:kistral-16384   --host_url http://localhost:11434   --data_path http://192.168.1.109:3000/kent/test-coolpaper/issues/1   --config_file config/default_from_url.yaml  --per_instance_cost_limit 5.00

But got this error:

ValueError: Could not load instances from http://192.168.1.109:3000/kent/test-coolpaper/issues/1. Please ensure --data_path is a GitHub URL, a SWE-bench HuggingFace dataset, or a JSON/JSONL file.

It looks like the tool only works with GitHub right now. Any chance we could add support for Gogs (and maybe other git platforms)? It'd be awesome for those of us using different setups for local coding.

Just a thought - it could make the tool even more useful for a bunch of us! Let me know if you need any more info or if you want to bounce around ideas on how to implement this.

Thanks for considering it! 🙌

Potential Solutions

  1. We could create a new module for handling different git platforms. Something like git_platform_handler.py that detects the platform from the URL and uses the appropriate API.

  2. For Gogs specifically, we could use their API (similar to GitHub's). Here's a link to Gogs API docs: https://github.com/gogs/docs-api

  3. We might want to look at how other projects handle multiple git platforms. For example, GitLab's CI/CD system supports multiple git providers: https://docs.gitlab.com/ee/ci/ci_cd_for_external_repos/

  4. Another approach could be to use a library like PyGithub (https://github.com/PyGithub/PyGithub) as a reference to create a "PyGogs" library that we can integrate.

Here's a quick diagram of how it might work:

[User Input URL] -> [URL Parser] -> [Platform Detector]
                                          |
                    .--------------------.--------------------.
                    |                    |                    |
              [GitHub Handler]    [Gogs Handler]    [GitLab Handler]
                    |                    |                    |
                    '--------------------.--------------------.
                                          |
                                   [Data Processor]

Just a thought - it could make the tool even more useful for a bunch of us! Let me know if you need any more info or if you want to bounce around ideas on how to implement this.

Thanks for considering it! 🙌

@klieret
Copy link
Member

klieret commented Sep 10, 2024

Hi @x66ccff. Thank you for this suggestion and the work you put into possible solutions. There is also #756, which goes in this direction. GitHub is currently the only supported option because it is the most widespread and because this is what the SWE-bench benchmark uses that the efficacy of SWE-agent was evaluated on.

SWE-agent is, at its core, a research project that aims to be simple and easy to hack, as well as easy to maintain, because we only have limited personpower available. Even in the most perfect implementation, supporting additional platforms will come with additional maintenance work, shifting away the focus from the actual core of the project (which is to understand agents and learn about the capabilities of LMs).

So here's what I think we should do instead: If you want to have support for certain platforms, can we have support for simple plugins (i.e.,. separately hosted python packages that enable support) or make it easier to wrap around SWE-agent and make it easier to call it as a python library? I think this is the direction to go into, because it will also address other instances of technical debt that SWE-agent has (like the fact that it's still not properly packaged, sigh).

In any case: Let's discuss the solution here first.

@klieret klieret added the ✨ enhancement New feature or request label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants