Compare commits

..

No commits in common. "4141eeb30cb52b75cca6e75ffe6ecb97081fe9d0" and "bd5788ecae19ab635c34c475904b610c1f63d8cf" have entirely different histories.

9 changed files with 24 additions and 41 deletions

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Build Python Container
on:
push:

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Package Python
on:
push:

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Run Python tests (through Pytest)
on:

View File

@ -1,7 +1,3 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
name: Verify Python project can be installed, loaded and have version checked
on:

View File

@ -1,7 +1,3 @@
<!-- WARNING! -->
<!-- THIS IS AN AUTOGENERATED FILE! -->
<!-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! -->
# Conventions
When contributing code to this project, you MUST follow the requirements

View File

@ -1,6 +1,8 @@
<!-- WARNING! -->
<!-- THIS IS AN AUTOGENERATED FILE! -->
<!-- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN! -->
<!--- WARNING --->
<!--- THIS IS AN AUTO-GENERATED FILE --->
<!--- MANUAL CHANGES CAN AND WILL BE OVERWRITTEN --->
# Aider Gitea
@ -16,9 +18,6 @@ When such an issue is found, it:
3. Runs tests and code quality checks.
4. Creates a pull request with the solution.
Inspired by [the AI workflows](https://github.com/oscoreio/ai-workflows/)
project.
## Usage
An application token must be supplied for the `gitea_token` secret. This must
@ -88,10 +87,12 @@ pip install -r requirements.txt
Full list of requirements:
- [secret_loader](https://gitfub.space/Jmaa/secret_loader)
## Contributing
Feel free to submit pull requests. Please follow the [Code Conventions](CONVENTIONS.md) when doing so.
### Testing
Testing requires the [pytest](https://docs.pytest.org/en/stable/) library.
@ -108,6 +109,7 @@ Test coverage can be run using the [`pytest-cov`](https://pypi.org/project/pytes
pytest --cov=aider_gitea test
```
## License
```

View File

@ -158,7 +158,8 @@ LLM_MESSAGE_FORMAT = (
"""{issue}\nDo not wait for explicit approval before working on code changes."""
)
CODE_MODEL = None
# CODE_MODEL = 'ollama/gemma3:4b'
CODE_MODEL = 'o4-mini'
EVALUATOR_MODEL = 'ollama/gemma3:27b'
@ -177,13 +178,8 @@ def create_aider_command(issue: str) -> list[str]:
'--auto-test',
'--no-auto-lint',
'--yes',
'--timeout', str(10_000)
]
if CODE_MODEL in {'ollama/qwen3:32b'}:
l.append('--edit-format')
l.append('diff')
for key in secrets.llm_api_keys():
l += ['--api-key', key]

View File

@ -48,7 +48,7 @@ def parse_args():
parser.add_argument(
'--aider-model',
help='Model to use for generating code (overrides default)',
required=True,
default=None,
)
parser.add_argument(
'--evaluator-model',
@ -65,8 +65,10 @@ def main():
# Override default models if provided
import aider_gitea as core
core.CODE_MODEL = args.aider_model
core.EVALUATOR_MODEL = args.evaluator_model
if args.aider_model:
core.CODE_MODEL = args.aider_model
if args.evaluator_model:
core.EVALUATOR_MODEL = args.evaluator_model
seen_issues_db = SeenIssuesDB()
client = GiteaClient(args.gitea_url, secrets.gitea_token())

View File

@ -1,6 +1,8 @@
# WARNING!
# THIS IS AN AUTOGENERATED FILE!
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN!
# WARNING
#
# THIS IS AN AUTOGENERATED FILE.
#
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
import re
@ -21,9 +23,6 @@ When such an issue is found, it:
3. Runs tests and code quality checks.
4. Creates a pull request with the solution.
Inspired by [the AI workflows](https://github.com/oscoreio/ai-workflows/)
project.
## Usage
An application token must be supplied for the `gitea_token` secret. This must
@ -84,6 +83,7 @@ The tool uses environment variables for sensitive information:
PACKAGE_DESCRIPTION_SHORT = """
A code automation tool that integrates Gitea with Aider to automatically solve issues.""".strip()
def parse_version_file(text: str) -> str:
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
if match is None:
@ -91,14 +91,17 @@ def parse_version_file(text: str) -> str:
raise Exception(msg)
return match.group(2)
with open(PACKAGE_NAME + '/_version.py') as f:
version = parse_version_file(f.read())
REQUIREMENTS_MAIN = [
'secret_loader @ git+https://gitfub.space/Jmaa/secret_loader.git',
]
REQUIREMENTS_TEST = []
setup(
name=PACKAGE_NAME,
version=version,