Skip to content

Commit 00d21d3

Browse files
gmrclaude
andcommitted
Bootstrap Python project structure
- src layout with hatchling build, uv dependency management - Ruff linting/formatting, mypy strict, pyright strict - pytest with 90% coverage threshold - Pre-commit hooks (ruff, tombi, mypy) - CI: Python 3.12/3.13/3.14 matrix, codecov, PyPI deploy - MkDocs with Material theme and GitHub Pages workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b2bbd74 commit 00d21d3

16 files changed

Lines changed: 1816 additions & 1 deletion

.github/workflows/deploy.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [ created ]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/p/awagent
14+
15+
permissions:
16+
id-token: write
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Set up Python 3.14
22+
uses: actions/setup-python@v6
23+
with:
24+
python-version: "3.14"
25+
26+
- name: Install dependencies
27+
run: |
28+
uv sync --group=dist
29+
30+
- name: Build and check package
31+
run: |
32+
python -m build
33+
twine check dist/*
34+
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/docs.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'docs/**'
9+
- 'mkdocs.yml'
10+
- '.github/workflows/docs.yaml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v5
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
31+
with:
32+
python-version: 3.14
33+
enable-cache: true
34+
35+
- name: Install dependencies
36+
run: |
37+
uv sync --all-extras --all-groups --locked
38+
39+
- name: Build documentation
40+
run: uv run mkdocs build --strict
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: ./site
46+
47+
deploy:
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

.github/workflows/testing.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Testing
2+
on:
3+
pull_request:
4+
push:
5+
branches: [ "main" ]
6+
paths-ignore:
7+
- 'docs/**'
8+
- '*.md'
9+
tags-ignore: [ "*" ]
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python: [ "3.12", "3.13", "3.14" ]
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v5
21+
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v7
24+
with:
25+
python-version: "${{ matrix.python }}"
26+
enable-cache: true
27+
28+
- name: Install pre-commit
29+
uses: pre-commit/action@v3.0.1
30+
31+
- name: Lint Check
32+
run: pre-commit run --all-files
33+
34+
- name: Run Tests
35+
run: uv run pytest
36+
37+
- name: Upload Coverage
38+
uses: codecov/codecov-action@v5
39+
with:
40+
files: ./build/coverage.xml
41+
flags: unittests

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.*
2+
/build
3+
/dist
4+
/public
5+
/site
6+
VERSION
7+
!/.github
8+
!/.gitignore
9+
!/.pre-commit-config.yaml
10+
!/.python-version

.pre-commit-config.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- id: check-merge-conflict
10+
- id: check-toml
11+
- id: debug-statements
12+
13+
- repo: https://github.com/astral-sh/ruff-pre-commit
14+
rev: v0.14.6
15+
hooks:
16+
- id: ruff-check
17+
args: [--fix]
18+
- id: ruff-format
19+
20+
- repo: https://github.com/tombi-toml/tombi-pre-commit
21+
rev: v0.7.25
22+
hooks:
23+
- id: tombi-format
24+
25+
- repo: local
26+
hooks:
27+
- id: mypy
28+
name: mypy
29+
language: system
30+
types: [python]
31+
pass_filenames: false
32+
entry: uv
33+
args:
34+
- run
35+
- mypy
36+
- src

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# awagent
2-
Framework for building Autonomous Agents
2+
3+
The foundation for building production-ready agents fast.

docs/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# awagent
2+
3+
Framework for building Autonomous Agents.
4+
5+
## Features
6+
7+
*Coming soon.*
8+
9+
## License
10+
11+
BSD-3-Clause

docs/installation.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Installation
2+
3+
## From PyPI
4+
5+
```bash
6+
pip install awagent
7+
```
8+
9+
## From Source
10+
11+
```bash
12+
git clone https://github.com/aweber/awagent.git
13+
cd awagent
14+
uv sync
15+
```

docs/quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Quick Start
2+
3+
*Coming soon.*

0 commit comments

Comments
 (0)