Skip to content

Commit e197acb

Browse files
Merge pull request #50 from Annotation-Garden/develop
Release v0.6.1-alpha: CLI implementation and PyPI publishing
2 parents 6c59425 + 8330c3c commit e197acb

File tree

19 files changed

+2962
-62
lines changed

19 files changed

+2962
-62
lines changed

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ API_KEYS=your-generated-api-key-here
1818
# Set to "false" only for local development without auth
1919
REQUIRE_API_AUTH=true
2020

21+
# BYOK (Bring Your Own Key) Mode
22+
# When enabled, users can provide their own OpenRouter API key via X-OpenRouter-Key header
23+
# Their key is used for LLM calls (billing goes to their account)
24+
# Set to "false" to require server API keys only
25+
ALLOW_BYOK=true
26+
2127
# Audit Logging (recommended for production)
2228
ENABLE_AUDIT_LOG=true
2329
AUDIT_LOG_FILE=/var/log/hedit/audit.log

.github/workflows/publish.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
test_pypi:
9+
description: 'Publish to TestPyPI instead of PyPI'
10+
required: false
11+
default: false
12+
type: boolean
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
build:
19+
name: Build distribution
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.12'
28+
29+
- name: Install build dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install build twine
33+
34+
- name: Build package
35+
run: python -m build
36+
37+
- name: Check package
38+
run: twine check dist/*
39+
40+
- name: Upload artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: python-package-distributions
44+
path: dist/
45+
46+
publish-testpypi:
47+
name: Publish to TestPyPI
48+
needs: build
49+
runs-on: ubuntu-latest
50+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'true'
51+
environment:
52+
name: testpypi
53+
url: https://test.pypi.org/p/hedit
54+
permissions:
55+
id-token: write
56+
steps:
57+
- name: Download artifacts
58+
uses: actions/download-artifact@v4
59+
with:
60+
name: python-package-distributions
61+
path: dist/
62+
63+
- name: Publish to TestPyPI
64+
uses: pypa/gh-action-pypi-publish@release/v1
65+
with:
66+
repository-url: https://test.pypi.org/legacy/
67+
68+
publish-pypi:
69+
name: Publish to PyPI
70+
needs: build
71+
runs-on: ubuntu-latest
72+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi != 'true')
73+
environment:
74+
name: pypi
75+
url: https://pypi.org/p/hedit
76+
permissions:
77+
id-token: write
78+
steps:
79+
- name: Download artifacts
80+
uses: actions/download-artifact@v4
81+
with:
82+
name: python-package-distributions
83+
path: dist/
84+
85+
- name: Publish to PyPI
86+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,41 @@ jobs:
5454
tag_name: ${{ github.ref_name }}
5555
release_name: Release ${{ steps.get_version.outputs.VERSION }}
5656
body: |
57-
## HED-BOT ${{ steps.get_version.outputs.VERSION }}
57+
## HEDit ${{ steps.get_version.outputs.VERSION }}
5858
5959
${{ steps.changelog.outputs.CHANGELOG }}
6060
6161
---
6262
6363
### Installation
6464
65-
**Docker (Recommended):**
65+
**PyPI (Recommended for CLI):**
66+
```bash
67+
pip install hedit
68+
```
69+
70+
**Docker (for API server):**
6671
```bash
6772
docker pull ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.VERSION }}
6873
```
6974
7075
**From Source:**
7176
```bash
7277
git clone https://github.com/${{ github.repository }}.git
73-
cd hed-bot
78+
cd hedit
7479
git checkout v${{ steps.get_version.outputs.VERSION }}
7580
pip install -e .
7681
```
7782
83+
### Quick Start
84+
```bash
85+
# Initialize with your OpenRouter API key
86+
hedit init --api-key YOUR_KEY
87+
88+
# Generate HED annotation
89+
hedit annotate "A red circle appears on screen"
90+
```
91+
7892
### Documentation
7993
See [README.md](https://github.com/${{ github.repository }}/blob/main/README.md) for setup and usage instructions.
8094
draft: false

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ENV/
3636
# Claude specific
3737
CLAUDE.md
3838
.rules/
39+
.context/
3940
plan.md
4041
ideas.md
4142
scratch_notes.md

pyproject.toml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,23 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "hedit"
7-
version = "0.6.0-alpha"
7+
version = "0.6.1-alpha"
88
description = "Multi-agent system for HED annotation generation and validation"
99
readme = "README.md"
1010
requires-python = ">=3.12"
11-
license = {text = "MIT"}
11+
license = "MIT"
1212
authors = [
13-
{name = "Yahya", email = "yahya@example.com"}
13+
{name = "Annotation Garden Initiative", email = "info@annotation.garden"}
14+
]
15+
keywords = ["hed", "annotation", "neuroscience", "bids", "cli"]
16+
classifiers = [
17+
"Development Status :: 4 - Beta",
18+
"Environment :: Console",
19+
"Intended Audience :: Science/Research",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python :: 3",
22+
"Programming Language :: Python :: 3.12",
23+
"Topic :: Scientific/Engineering",
1424
]
1525

1626
dependencies = [
@@ -29,8 +39,22 @@ dependencies = [
2939
"lxml>=5.3.0",
3040
"beautifulsoup4>=4.12.3",
3141
"pillow>=11.0.0",
42+
# CLI dependencies
43+
"typer>=0.20.0",
44+
"rich>=14.0.0",
45+
"platformdirs>=4.5.0",
46+
"pyyaml>=6.0.2",
3247
]
3348

49+
[project.scripts]
50+
hedit = "src.cli.main:cli"
51+
52+
[project.urls]
53+
Homepage = "https://annotation.garden/hedit"
54+
Documentation = "https://github.com/Annotation-Garden/hedit#readme"
55+
Repository = "https://github.com/Annotation-Garden/hedit"
56+
Issues = "https://github.com/Annotation-Garden/hedit/issues"
57+
3458
[project.optional-dependencies]
3559
dev = [
3660
"pytest>=8.3.0",
@@ -94,6 +118,10 @@ exclude_lines = [
94118
"raise NotImplementedError",
95119
]
96120

121+
[tool.setuptools.packages.find]
122+
where = ["."]
123+
include = ["src*"]
124+
97125
[tool.mypy]
98126
python_version = "3.12"
99127
warn_return_any = true

0 commit comments

Comments
 (0)