Skip to content

Commit 682e47e

Browse files
authored
Refactor and Fix ECS Agent Deployment (#152)
* Agent Implementation Using Pydantic AI (#149) * Move old stuff to a legacy folder and setup pre-commit for rewrite * Agent rewrite * Update cloud watch config * Update prompt and use remote github mcp server * Add cloud watch tool log * Use remote github mcp for now * Update agent * Update dev doc * Make service name a required parameter * Update cloud watch tool to search directly from log event * Cli * Readme * Update agents.md * ECS deployment * Simplify by removing server for now * Add logo * Update text colour * Update * Refactoring * Refactoring
1 parent 798d405 commit 682e47e

File tree

261 files changed

+10274
-1948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

261 files changed

+10274
-1948
lines changed

.gitignore

Lines changed: 74 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Byte-compiled / optimized / DLL files
22
__pycache__/
3-
*.py[cod]
3+
*.py[codz]
44
*$py.class
55

66
# C extensions
@@ -27,8 +27,8 @@ share/python-wheels/
2727
MANIFEST
2828

2929
# PyInstaller
30-
# Usually these files are written by a python script from a template
31-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3232
*.manifest
3333
*.spec
3434

@@ -46,7 +46,7 @@ htmlcov/
4646
nosetests.xml
4747
coverage.xml
4848
*.cover
49-
*.py,cover
49+
*.py.cover
5050
.hypothesis/
5151
.pytest_cache/
5252
cover/
@@ -92,22 +92,37 @@ ipython_config.py
9292
# However, in case of collaboration, if having platform-specific dependencies or dependencies
9393
# having no cross-platform support, pipenv may install dependencies that don't work, or not
9494
# install all needed dependencies.
95-
#Pipfile.lock
95+
# Pipfile.lock
96+
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# uv.lock
96102

97103
# poetry
98104
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99105
# This is especially recommended for binary packages to ensure reproducibility, and is more
100106
# commonly ignored for libraries.
101107
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102-
#poetry.lock
108+
# poetry.lock
109+
# poetry.toml
103110

104111
# pdm
105112
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106-
#pdm.lock
107-
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108-
# in version control.
109-
# https://pdm.fming.dev/#use-with-ide
110-
.pdm.toml
113+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115+
# pdm.lock
116+
# pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# pixi
121+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122+
# pixi.lock
123+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124+
# in the .venv directory. It is recommended not to include this directory in version control.
125+
.pixi
111126

112127
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113128
__pypackages__/
@@ -116,11 +131,25 @@ __pypackages__/
116131
celerybeat-schedule
117132
celerybeat.pid
118133

134+
# Redis
135+
*.rdb
136+
*.aof
137+
*.pid
138+
139+
# RabbitMQ
140+
mnesia/
141+
rabbitmq/
142+
rabbitmq-data/
143+
144+
# ActiveMQ
145+
activemq-data/
146+
119147
# SageMath parsed files
120148
*.sage.py
121149

122150
# Environments
123151
.env
152+
.envrc
124153
.venv
125154
env/
126155
venv/
@@ -153,103 +182,38 @@ dmypy.json
153182
cython_debug/
154183

155184
# PyCharm
156-
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157-
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
158-
# and can be added to the global gitignore or merged into this file. For a more nuclear
159-
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
160-
.idea/
161-
162-
### macOS ###
163-
# General
185+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187+
# and can be added to the global gitignore or merged into this file. For a more nuclear
188+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
189+
# .idea/
190+
191+
# Abstra
192+
# Abstra is an AI-powered process automation framework.
193+
# Ignore directories containing user credentials, local state, and settings.
194+
# Learn more at https://abstra.io/docs
195+
.abstra/
196+
197+
# Visual Studio Code
198+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
201+
# you could uncomment the following to ignore the entire vscode folder
202+
# .vscode/
203+
204+
# Ruff stuff:
205+
.ruff_cache/
206+
207+
# PyPI configuration file
208+
.pypirc
209+
210+
# Marimo
211+
marimo/_static/
212+
marimo/_lsp/
213+
__marimo__/
214+
215+
# Streamlit
216+
.streamlit/secrets.toml
217+
218+
# .DS_Store
164219
.DS_Store
165-
.AppleDouble
166-
.LSOverride
167-
168-
# Icon must end with two \r
169-
Icon
170-
171-
172-
# Thumbnails
173-
._*
174-
175-
# Files that might appear in the root of a volume
176-
.DocumentRevisions-V100
177-
.fseventsd
178-
.Spotlight-V100
179-
.TemporaryItems
180-
.Trashes
181-
.VolumeIcon.icns
182-
.com.apple.timemachine.donotpresent
183-
184-
# Directories potentially created on remote AFP share
185-
.AppleDB
186-
.AppleDesktop
187-
Network Trash Folder
188-
Temporary Items
189-
.apdisk
190-
191-
### macOS Patch ###
192-
# iCloud generated files
193-
*.icloud
194-
195-
### Linux ###
196-
*~
197-
198-
# temporary files which can be created if a process still has a handle open of a deleted file
199-
.fuse_hidden*
200-
201-
# KDE directory preferences
202-
.directory
203-
204-
# Linux trash folder which might appear on any partition or disk
205-
.Trash-*
206-
207-
# .nfs files are created when an open file is removed but is still being accessed
208-
.nfs*
209-
210-
### Windows ###
211-
# Windows thumbnail cache files
212-
Thumbs.db
213-
Thumbs.db:encryptable
214-
ehthumbs.db
215-
ehthumbs_vista.db
216-
217-
# Dump file
218-
*.stackdump
219-
220-
# Folder config file
221-
[Dd]esktop.ini
222-
223-
# Recycle Bin used on file shares
224-
$RECYCLE.BIN/
225-
226-
# Windows Installer files
227-
*.cab
228-
*.msi
229-
*.msix
230-
*.msm
231-
*.msp
232-
233-
# Windows shortcuts
234-
*.lnk
235-
236-
*node_modules
237-
238-
# Terraform
239-
.terraform
240-
*.tfstate
241-
*.tfstate.*
242-
243-
# Ignore Helm dependencies
244-
charts/*/Chart.lock
245-
charts/*/tmpcharts/
246-
247-
# Helm-generated files
248-
*.tgz
249-
Chart.lock
250-
tmpcharts/
251-
252-
# Ignore Helm release artifacts
253-
.release-name/
254-
255-
*values-secrets.yaml

.pre-commit-config.yaml

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: false
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.5.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-toml
88
- id: check-yaml
@@ -18,18 +18,16 @@ repos:
1818
- id: check-case-conflict
1919
- id: requirements-txt-fixer
2020

21-
- repo: https://github.com/psf/black
22-
rev: 23.10.1
23-
hooks:
24-
- id: black
25-
args: [--config=pyproject.toml]
26-
27-
- repo: https://github.com/charliermarsh/ruff-pre-commit
21+
- repo: https://github.com/astral-sh/ruff-pre-commit
2822
# Ruff version.
29-
rev: "v0.1.2"
23+
rev: v0.14.14
3024
hooks:
31-
- id: ruff
32-
args: [--fix, --exit-non-zero-on-fix, "--config=pyproject.toml"] # enable autofix
25+
# Run the linter.
26+
- id: ruff-check
27+
args: [--fix, --config=ruff.toml]
28+
# Run the formatter.
29+
- id: ruff-format
30+
args: [--config=ruff.toml]
3331

3432
- repo: local
3533
hooks:
@@ -38,22 +36,21 @@ repos:
3836
entry: mypy
3937
language: system
4038
types: [python]
41-
args: ["--config-file=pyproject.toml", "--ignore-missing-imports"]
42-
exclude: '.*__init__\.py|tests'
39+
args: ["--config-file=mypy.ini"]
40+
exclude: ^legacy/
4341

4442
- repo: https://github.com/crate-ci/typos
45-
rev: v1.32.0
43+
rev: v1.42.1
4644
hooks:
4745
- id: typos
48-
args: [--config=pyproject.toml]
46+
args: [--config=typos.toml]
4947
pass_filenames: false
5048

5149
- repo: https://github.com/PyCQA/bandit
52-
rev: 1.7.8
50+
rev: 1.9.3
5351
hooks:
5452
- id: bandit
55-
args: ["--config=pyproject.toml"]
56-
additional_dependencies: ["bandit[toml]"]
53+
args: ["-c", "bandit.yaml"]
5754

5855
- repo: local
5956
hooks:

.typos.toml

Lines changed: 0 additions & 16 deletions
This file was deleted.

AGENTS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# AGENTS.md
2+
3+
## Do
4+
- Always use Context7 MCP when I need library/API documentation, code generation, setup or configuration steps without me having to explicitly ask.
5+
- Keep code simple, with a strong focus on readability and maintainability.
6+
- Use UK English.
7+
- No em dashes in comments and documentations.
8+
9+
## Functions
10+
- Keep each function concise, easy to read, and clearly named.
11+
- Avoid functions that handle multiple responsibilities. Break them into smaller units unless there is a sensible trade off.
12+
- Prioritise on readability, maintainability, reusability, and testability.
13+
14+
## Docstrings
15+
- Keep module-level and script top-level docstrings to a single line.
16+
- Use Google-style docstrings.
17+
- Do not include types for arguments.
18+
- Keep docstrings concise and only include what is necessary to help readers understand the function or class.
19+
20+
### Docstrings Example
21+
```
22+
def function_with_pep484_type_annotations(param1: int, param2: str) -> bool:
23+
"""Example function with PEP 484 type annotations.
24+
25+
Important note.
26+
27+
Args:
28+
param1: The first parameter.
29+
param2: The second parameter.
30+
31+
Returns:
32+
The return value. True for success, False otherwise.
33+
34+
"""
35+
```

0 commit comments

Comments
 (0)