Skip to content

Commit 64e5370

Browse files
author
Matthias Zimmermann
committed
1 parent 4012ebe commit 64e5370

Some content is hidden

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

51 files changed

+3906
-5729
lines changed

.devcontainer/Dockerfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
# Install system dependencies
4+
RUN apt-get update && apt-get install -y \
5+
--no-install-recommends \
6+
nano \
7+
curl \
8+
iputils-ping \
9+
ca-certificates
10+
11+
# Install uv and add it to PATH
12+
ADD https://astral.sh/uv/install.sh /uv-installer.sh
13+
RUN sh /uv-installer.sh && rm /uv-installer.sh
14+
15+
ENV PATH="/root/.local/bin/:$PATH"
16+
17+
# Suppress UV hardlink warnings in dev containers
18+
ENV UV_LINK_MODE=copy
19+
20+
WORKDIR /workspace

.devcontainer/devcontainer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "Arkiv SDK For Python",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"features": {
7+
"ghcr.io/devcontainers/features/github-cli:1": {}
8+
},
9+
"mounts": [
10+
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
11+
],
12+
"customizations": {
13+
"vscode": {
14+
"settings": {
15+
"git.editor": "nano",
16+
"files.insertFinalNewline": true,
17+
"files.trimTrailingWhitespace": true,
18+
"python.defaultInterpreterPath": "/workspace/./.venv/bin/python",
19+
"python.terminal.activateEnvironment": true,
20+
"python.formatting.provider": "ruff",
21+
"python.analysis.extraPaths": ["./src", "./tests"],
22+
"python.autoComplete.extraPaths": ["./src", "./tests"],
23+
"[python]": {
24+
"editor.codeActionsOnSave": {
25+
"source.fixAll": "explicit",
26+
"source.organizeImports": "explicit"
27+
},
28+
"editor.formatOnSave": true,
29+
"editor.tabSize": 4
30+
}
31+
},
32+
"extensions": [
33+
"ms-python.python",
34+
"ms-python.vscode-pylance",
35+
"charliermarsh.ruff",
36+
"ms-azuretools.vscode-docker",
37+
"tamasfe.even-better-toml",
38+
"redhat.vscode-yaml"
39+
]
40+
}
41+
},
42+
"postCreateCommand": "uv sync --all-groups && git config --global core.editor nano"
43+
}

.env.testing

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Example .env file for flexible test setup
2+
# Copy this to .env and modify as needed
3+
4+
# External Node Configuration (uncomment to use external node instead of testcontainers)
5+
RPC_URL=https://kaolin.hoodi.arkiv.network/rpc
6+
WS_URL=wss://kaolin.hoodi.arkiv.network/rpc/ws
7+
8+
# External Wallet Configuration (required when using external node)
9+
WALLET_FILE_1=wallet_alice.json
10+
WALLET_PASSWORD_1=s3cret
11+
WALLET_FILE_2=wallet_bob.json
12+
WALLET_PASSWORD_2=s3cret

.envrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["**"] # Run on all branches for early feedback
6+
pull_request:
7+
branches: [main] # Run on PRs targeting main
8+
9+
jobs:
10+
# Fast linting job with minimal dependencies
11+
lint:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: ["3.12", "3.13"]
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install uv
26+
run: |
27+
curl -LsSf https://astral.sh/uv/install.sh | sh
28+
echo "$HOME/.local/bin" >> $GITHUB_PATH
29+
30+
- name: Install lint dependencies only
31+
run: uv sync --group lint
32+
33+
- name: Run code formatting check
34+
run: uv run ruff format --check src/ tests/
35+
36+
- name: Run linting
37+
run: uv run ruff check src/ tests/
38+
39+
- name: Run type checking
40+
run: uv run mypy src/
41+
42+
# Comprehensive testing job with full test dependencies
43+
test:
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
python-version: ["3.12", "3.13"]
48+
steps:
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
52+
- name: Setup Python ${{ matrix.python-version }}
53+
uses: actions/setup-python@v5
54+
with:
55+
python-version: ${{ matrix.python-version }}
56+
57+
- name: Install uv
58+
run: |
59+
curl -LsSf https://astral.sh/uv/install.sh | sh
60+
echo "$HOME/.local/bin" >> $GITHUB_PATH
61+
62+
- name: Install test dependencies only
63+
run: uv sync --group test
64+
65+
- name: Run all tests
66+
run: uv run pytest tests/ -v --log-cli-level=INFO
67+
68+
# Build verification job
69+
build:
70+
runs-on: ubuntu-latest
71+
needs: [lint, test] # Only run if lint and test pass
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@v4
75+
76+
- name: Setup Python
77+
uses: actions/setup-python@v5
78+
with:
79+
python-version: "3.12"
80+
81+
- name: Install uv
82+
run: |
83+
curl -LsSf https://astral.sh/uv/install.sh | sh
84+
echo "$HOME/.local/bin" >> $GITHUB_PATH
85+
86+
- name: Build package
87+
run: uv build
88+
89+
- name: Verify package can be installed
90+
run: |
91+
# Create a temporary virtual environment for testing
92+
python -m venv test-install-env
93+
source test-install-env/bin/activate
94+
pip install dist/*.whl
95+
python -c "from arkiv import Arkiv; print('✅ Package installation successful')"

.github/workflows/deploy_docs.yml

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

.github/workflows/example.yml

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

0 commit comments

Comments
 (0)