Compare commits

..

2 Commits

Author SHA1 Message Date
4141eeb30c Always require model
All checks were successful
Run Python tests (through Pytest) / Test (push) Successful in 25s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 23s
2025-05-10 19:53:47 +02:00
f72206365d 🤖 Repository layout updated to latest version
This commit was automatically generated by [a script](https://gitfub.space/Jmaa/repo-manager)
2025-05-01 00:02:08 +02:00
9 changed files with 41 additions and 24 deletions

View File

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

View File

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

View File

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

View File

@ -1,3 +1,7 @@
# 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 name: Verify Python project can be installed, loaded and have version checked
on: on:

View File

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

View File

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

View File

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

View File

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

View File

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