Skip to content

Commit 60d6753

Browse files
authored
Merge pull request #84 from awslabs/release/v1
Release System Preparation for v1.0
2 parents c34951f + 78d4ead commit 60d6753

106 files changed

Lines changed: 6010 additions & 5808 deletions

File tree

Some content is hidden

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

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ body:
2626
label: Python Version
2727
description: What version of Python are you using?
2828
options:
29-
- Python 3.9
3029
- Python 3.10
3130
- Python 3.11
3231
- Python 3.12
3332
- Python 3.13
33+
- Python 3.14
3434
- Other (specify in environment details)
3535
validations:
3636
required: true

.github/actions/get-config/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ runs:
2323
using: 'composite'
2424
steps:
2525
- name: Install yq
26-
uses: mikefarah/yq@master
26+
uses: mikefarah/yq@v4.50.1
2727

2828
- name: Get configuration from project config
2929
id: config
3030
shell: bash
3131
run: |
3232
DEFAULT_PYTHON_VERSION=$(yq '.python.default_version' .project.yml)
33-
PYTHON_VERSIONS=$(yq -o json '.python.versions' .project.yml | tr -d '\n' | tr -d ' ')
33+
PYTHON_VERSIONS=$(yq -o json '.python.versions' .project.yml | tr -d '\n')
3434
CONTAINER_REGISTRY=$(yq '.repository.registry // "ghcr.io"' .project.yml)
3535
REPO_ORG=$(yq '.repository.org' .project.yml)
3636
REPO_NAME=$(yq '.repository.name' .project.yml)

.github/actions/setup-uv-cached/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717

1818
- name: Restore UV environment
1919
id: restore-cache
20-
uses: actions/cache/restore@v4
20+
uses: actions/cache/restore@v5.0.0
2121
with:
2222
path: |
2323
.venv
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Cache Management
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
cache-type:
7+
description: 'Type of cache (dependencies, build, container)'
8+
required: true
9+
type: string
10+
cache-key-base:
11+
description: 'Base cache key'
12+
required: true
13+
type: string
14+
python-version:
15+
description: 'Python version for cache key'
16+
required: false
17+
type: string
18+
default: '3.13'
19+
outputs:
20+
cache-key:
21+
description: 'Generated cache key'
22+
value: ${{ jobs.generate-cache-key.outputs.cache-key }}
23+
cache-hit:
24+
description: 'Whether cache was hit'
25+
value: ${{ jobs.generate-cache-key.outputs.cache-hit }}
26+
27+
jobs:
28+
generate-cache-key:
29+
name: Generate Cache Key
30+
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
33+
outputs:
34+
cache-key: ${{ steps.cache-key.outputs.key }}
35+
cache-hit: ${{ steps.cache.outputs.cache-hit }}
36+
steps:
37+
- name: Checkout code
38+
uses: actions/checkout@v6.0.1
39+
40+
- name: Generate cache key
41+
id: cache-key
42+
run: |
43+
case "${{ inputs.cache-type }}" in
44+
dependencies)
45+
KEY="${{ inputs.cache-key-base }}-py${{ inputs.python-version }}-${{ hashFiles('.project.yml', 'pyproject.toml', 'uv.lock') }}"
46+
;;
47+
build)
48+
KEY="${{ inputs.cache-key-base }}-py${{ inputs.python-version }}-${{ hashFiles('src/**/*.py', 'pyproject.toml') }}"
49+
;;
50+
container)
51+
KEY="${{ inputs.cache-key-base }}-py${{ inputs.python-version }}-${{ hashFiles('Dockerfile', 'src/**/*.py', 'pyproject.toml') }}"
52+
;;
53+
*)
54+
KEY="${{ inputs.cache-key-base }}-${{ github.sha }}"
55+
;;
56+
esac
57+
echo "key=$KEY" >> "$GITHUB_OUTPUT"
58+
echo "Generated cache key: $KEY"
59+
60+
- name: Restore cache
61+
id: cache
62+
uses: actions/cache@v5.0.0
63+
with:
64+
path: |
65+
~/.cache/uv
66+
.venv
67+
dist/
68+
.pytest_cache
69+
key: ${{ steps.cache-key.outputs.key }}
70+
restore-keys: |
71+
${{ inputs.cache-key-base }}-py${{ inputs.python-version }}-
72+
${{ inputs.cache-key-base }}-

.github/workflows/changelog.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ jobs:
2020
validate-changelog:
2121
name: Validate Changelog
2222
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
2325

2426
steps:
2527
- name: Checkout code
26-
uses: actions/checkout@v6
28+
uses: actions/checkout@v6.0.1
2729
with:
2830
fetch-depth: 0 # Need full history for changelog generation
2931

@@ -88,7 +90,7 @@ jobs:
8890

8991
steps:
9092
- name: Checkout code
91-
uses: actions/checkout@v6
93+
uses: actions/checkout@v6.0.1
9294
with:
9395
fetch-depth: 0
9496

.github/workflows/ci-quality.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
name: CI Quality
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- 'pyproject.toml'
10+
- 'requirements*.txt'
11+
- '.ruff.toml'
12+
- 'mypy.ini'
13+
- '.github/workflows/ci-quality.yml'
14+
pull_request:
15+
branches: [ main, develop ]
16+
paths:
17+
- 'src/**'
18+
- 'tests/**'
19+
- 'pyproject.toml'
20+
- 'requirements*.txt'
21+
- '.ruff.toml'
22+
- 'mypy.ini'
23+
- '.github/workflows/ci-quality.yml'
24+
25+
env:
26+
AWS_DEFAULT_REGION: us-east-1
27+
AWS_ACCESS_KEY_ID: testing
28+
AWS_SECRET_ACCESS_KEY: testing
29+
ENVIRONMENT: testing
30+
TESTING: true
31+
32+
jobs:
33+
config:
34+
name: Configuration
35+
uses: ./.github/workflows/shared-config.yml
36+
37+
quality-check:
38+
name: Professional Quality Standards
39+
runs-on: ubuntu-latest
40+
needs: config
41+
permissions:
42+
contents: read
43+
44+
steps:
45+
- uses: actions/checkout@v6.0.1
46+
with:
47+
fetch-depth: 0
48+
49+
- name: Setup Python and UV
50+
uses: ./.github/actions/setup-python-uv
51+
with:
52+
python-version: ${{ needs.config.outputs.default-python-version }}
53+
cache-key-suffix: quality
54+
55+
- name: Run professional quality checks
56+
run: |
57+
if [ "${{ github.event_name }}" = "schedule" ]; then
58+
make quality-check-all
59+
else
60+
make quality-check
61+
fi
62+
63+
setup-cache:
64+
name: Setup Cache
65+
needs: config
66+
uses: ./.github/workflows/cache-management.yml
67+
with:
68+
cache-type: dependencies
69+
cache-key-base: quality-deps
70+
python-version: ${{ needs.config.outputs.default-python-version }}
71+
72+
auto-format:
73+
name: Auto-Format Code
74+
if: github.event_name == 'pull_request'
75+
runs-on: ubuntu-latest
76+
needs: [config, setup-cache]
77+
permissions:
78+
contents: write
79+
steps:
80+
- name: Checkout code
81+
uses: actions/checkout@v6.0.1
82+
with:
83+
token: ${{ secrets.GITHUB_TOKEN }}
84+
ref: ${{ github.head_ref }}
85+
86+
- name: Setup UV with cache
87+
uses: ./.github/actions/setup-uv-cached
88+
with:
89+
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
90+
fail-on-cache-miss: false
91+
92+
- name: Auto-format code
93+
run: make format-fix
94+
95+
- name: Commit formatting changes
96+
run: |
97+
make ci-git-setup
98+
git add .
99+
if ! git diff --staged --quiet; then
100+
git commit -m "style: auto-format code with ruff [skip ci]"
101+
git push
102+
fi
103+
104+
lint-ruff:
105+
name: Ruff (Code Quality)
106+
runs-on: ubuntu-latest
107+
needs: [config, setup-cache]
108+
permissions:
109+
contents: read
110+
steps:
111+
- name: Checkout code
112+
uses: actions/checkout@v6.0.1
113+
114+
- name: Setup UV with cache
115+
uses: ./.github/actions/setup-uv-cached
116+
with:
117+
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
118+
fail-on-cache-miss: false
119+
120+
- name: Check code quality
121+
run: make ci-quality-ruff
122+
123+
lint-ruff-optional:
124+
name: Ruff (Extended Checks)
125+
runs-on: ubuntu-latest
126+
needs: [config, setup-cache, lint-ruff]
127+
permissions:
128+
contents: read
129+
steps:
130+
- name: Checkout code
131+
uses: actions/checkout@v6.0.1
132+
133+
- name: Setup UV with cache
134+
uses: ./.github/actions/setup-uv-cached
135+
with:
136+
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
137+
fail-on-cache-miss: false
138+
139+
- name: Extended linting (warnings)
140+
run: make ci-quality-ruff-optional
141+
continue-on-error: true
142+
143+
lint-mypy:
144+
name: mypy (Type Checking)
145+
runs-on: ubuntu-latest
146+
needs: [config, setup-cache, lint-ruff]
147+
permissions:
148+
contents: read
149+
steps:
150+
- name: Checkout code
151+
uses: actions/checkout@v6.0.1
152+
153+
- name: Setup UV with cache
154+
uses: ./.github/actions/setup-uv-cached
155+
with:
156+
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
157+
fail-on-cache-miss: false
158+
159+
- name: Run mypy type check
160+
run: make ci-quality-mypy
161+
continue-on-error: true
162+
163+
arch-validation:
164+
name: Architecture Validation
165+
runs-on: ubuntu-latest
166+
needs: [config, setup-cache, lint-ruff]
167+
permissions:
168+
contents: read
169+
strategy:
170+
matrix:
171+
check: [cqrs, clean, imports, file-sizes]
172+
steps:
173+
- name: Checkout code
174+
uses: actions/checkout@v6.0.1
175+
176+
- name: Setup UV with cache
177+
uses: ./.github/actions/setup-uv-cached
178+
with:
179+
cache-key: ${{ needs.setup-cache.outputs.cache-key }}
180+
fail-on-cache-miss: false
181+
182+
- name: Run architecture validation
183+
run: make ci-arch-${{ matrix.check }}
184+
continue-on-error: true

0 commit comments

Comments
 (0)