Skip to content

Commit 0b36345

Browse files
committed
bootstrap: project boilerplate
Cobbled from a few sources, we add uv, ruff, and pyright for project dependencies, as well as generate documentation from doc strings using mkdocs (which is awesome!).
1 parent 278779c commit 0b36345

File tree

15 files changed

+1033
-18
lines changed

15 files changed

+1033
-18
lines changed

.github/workflows/pyright.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Pyright Type Checking
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.py'
6+
push:
7+
branches: [main]
8+
paths:
9+
- '**.py'
10+
jobs:
11+
pyright:
12+
name: Run Pyright
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Repository
16+
uses: actions/checkout@v4
17+
- name: Run Pyright
18+
uses: jakebailey/pyright-action@v2
19+

.github/workflows/ruff.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Ruff
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.py'
6+
push:
7+
branches: [main]
8+
paths:
9+
- '**.py'
10+
jobs:
11+
ruff:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repository
15+
uses: actions/checkout@v4
16+
- name: Run Ruff
17+
uses: astral-sh/ruff-action@v3

.gitignore

Lines changed: 163 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,170 @@
1-
# If you prefer the allow list template instead of the deny list, see community template:
2-
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
3-
#
4-
# Binaries for programs and plugins
5-
*.exe
6-
*.exe~
7-
*.dll
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
87
*.so
9-
*.dylib
108

11-
# Test binary, built with `go test -c`
12-
*.test
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# 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.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
1396

14-
# Output of the go coverage tool, specifically when used with LiteIDE
15-
*.out
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
16102

17-
# Dependency directories (remove the comment below to include it)
18-
# vendor/
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
19109

20-
# Go workspace file
21-
go.work
22-
go.work.sum
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
23119

24-
# env file
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
25131
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
.idea/
165+
166+
# Ruff stuff:
167+
.ruff_cache/
168+
169+
# PyPI configuration file
170+
.pypirc

.python-version

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

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# agent
2+
23
unreasonably good developer experience for enterprise agents

Taskfile.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
version: '3'
2+
3+
tasks:
4+
sync:
5+
desc: "Sync all extras and packages for the dev group"
6+
cmds:
7+
- uv sync --all-extras --all-packages --group dev
8+
9+
format:
10+
aliases: [fmt]
11+
desc: "Run ruff format and check with fix"
12+
cmds:
13+
- uv run ruff format
14+
- uv run ruff check --fix
15+
16+
lint:
17+
desc: "Run ruff check"
18+
cmds:
19+
- uv run ruff check
20+
21+
pyright:
22+
desc: "Run pyright"
23+
cmds:
24+
- uv run pyright
25+
26+
tests:
27+
aliases: [test]
28+
desc: "Run pytest"
29+
cmds:
30+
- uv run pytest
31+
32+
coverage:
33+
desc: "Run coverage tests and reports"
34+
cmds:
35+
- uv run coverage run -m pytest
36+
- uv run coverage xml -o coverage.xml
37+
- uv run coverage report -m --fail-under=95
38+
39+
snapshots-fix:
40+
desc: "Run pytest with inline-snapshot fix"
41+
cmds:
42+
- uv run pytest --inline-snapshot=fix
43+
44+
snapshots-create:
45+
desc: "Run pytest with inline-snapshot create"
46+
cmds:
47+
- uv run pytest --inline-snapshot=create
48+
49+
old-version-tests:
50+
desc: "Run tests with Python 3.9"
51+
env:
52+
UV_PROJECT_ENVIRONMENT: ".venv_39"
53+
cmds:
54+
- uv run --python 3.9 -m pytest
55+
- uv run --python 3.9 -m pyright .
56+
57+
build-docs:
58+
desc: "Build documentation with mkdocs"
59+
cmds:
60+
- uv run mkdocs build
61+
62+
serve-docs:
63+
desc: "Serve documentation with mkdocs"
64+
cmds:
65+
- uv run mkdocs serve --dev-addr 0.0.0.0:8000
66+
67+
deploy-docs:
68+
desc: "Deploy documentation to GitHub Pages with mkdocs"
69+
cmds:
70+
- uv run mkdocs gh-deploy --force --verbose

docs/assets/logo.svg

Lines changed: 13 additions & 0 deletions
Loading

docs/index.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Welcome to MkDocs
2+
3+
For full documentation visit [mkdocs.org](https://www.mkdocs.org).
4+
5+
## Commands
6+
7+
* `mkdocs new [dir-name]` - Create a new project.
8+
* `mkdocs serve` - Start the live-reloading docs server.
9+
* `mkdocs build` - Build the documentation site.
10+
* `mkdocs -h` - Print help message and exit.
11+
12+
## Project layout
13+
14+
mkdocs.yml # The configuration file.
15+
docs/
16+
index.md # The documentation homepage.
17+
... # Other markdown pages, images and other files.

docs/reference/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Agents module
2+
3+
::: agents

0 commit comments

Comments
 (0)