Skip to content

Commit 6357a4d

Browse files
committed
feat: add devcontainer
1 parent 748b058 commit 6357a4d

7 files changed

Lines changed: 66 additions & 4 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"name": "Duron",
3+
"image": "mcr.microsoft.com/devcontainers/python:2-3",
4+
"features": {
5+
"ghcr.io/devcontainers-extra/features/nox:2": {},
6+
"ghcr.io/devcontainers-extra/features/uv:1": {}
7+
},
8+
"postCreateCommand": "uv sync --all-groups --all-extras",
9+
"appPort": [],
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"python.terminal.activateEnvInCurrentTerminal": true,
14+
"python.defaultInterpreterPath": ".venv/bin/python"
15+
},
16+
"extensions": []
17+
}
18+
}
19+
}

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
enable-cache: true
2929
- name: Sync dependencies
30-
run: uv sync --group type-checking --group lint --group examples
30+
run: uv sync --all-groups --all-extras --no-group docs
3131
- name: Run tests
3232
run: uv run pytest
3333
- name: Run linter

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
/data
12
/dist
23
/site
34
/.venv
45
/.nox
6+
/.mypy_cache
7+
/.ruff_cache
8+
/.pytest_cache
59
/.codspeed
6-
/logs
710
__pycache__

examples/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async def main() -> None:
156156
)
157157
args = parser.parse_args()
158158

159-
log_storage = FileLogStorage(Path("logs") / f"{args.session_id}.jsonl")
159+
log_storage = FileLogStorage(Path("data") / f"{args.session_id}.jsonl")
160160
async with agent_fn.invoke(log_storage) as job:
161161
input_stream: StreamWriter[str] = job.open_stream("input_", "w")
162162
signal_stream: StreamWriter[None] = job.open_stream("signal", "w")

flake.lock

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
inputs = {
33
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
44
flake-parts.url = "github:hercules-ci/flake-parts";
5+
process-compose-flake.url = "github:Platonic-Systems/process-compose-flake";
6+
services-flake.url = "github:juspay/services-flake";
57
treefmt-nix = {
68
url = "github:numtide/treefmt-nix";
79
inputs.nixpkgs.follows = "nixpkgs";
@@ -12,6 +14,7 @@
1214
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
1315
imports = [
1416
inputs.treefmt-nix.flakeModule
17+
inputs.process-compose-flake.flakeModule
1518
];
1619
systems = [
1720
"x86_64-linux"
@@ -26,6 +29,11 @@
2629
...
2730
}:
2831
{
32+
process-compose."env" = {
33+
imports = [
34+
inputs.services-flake.processComposeModules.default
35+
];
36+
};
2937
devShells = {
3038
default = pkgs.mkShell {
3139
buildInputs = with pkgs; [

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
def install_deps(s: nox.Session, groups: list[str]) -> None:
1414
s.env["UV_PROJECT_ENVIRONMENT"] = s.virtualenv.location
15-
cmd = ["uv", "sync", "--frozen"]
15+
cmd = ["uv", "sync", "--frozen", "--all-extras"]
1616
for g in groups:
1717
cmd.extend(("--group", g))
1818
_ = s.run_install(*cmd)

0 commit comments

Comments
 (0)