Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish to PyPI
on:
workflow_dispatch:
release:
types: [created]

permissions:
contents: read

jobs:
test:
uses: ./.github/workflows/pytest.yml

deploy:
runs-on: ubuntu-latest
environment:
name: ${{ github.event_name == 'workflow_dispatch' && 'testpypi' || 'release' }}
url: ${{ github.event_name == 'workflow_dispatch' && 'https://test.pypi.org/p/medarc-verifiers' || 'https://pypi.org/p/medarc-verifiers' }}
permissions:
id-token: write
needs: test

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Python and uv with caching
uses: astral-sh/setup-uv@v7
with:
version: ">=0.10.4,<0.11.0"
python-version: 3.13
enable-cache: true
cache-dependency-glob: "pyproject.toml"

- name: Install optimi
run: uv sync --group cpu

- name: Build
run: uv build

- name: Publish to PyPI
if: github.event_name == 'release'
run: uv publish

- name: Publish to Test PyPI
if: github.event_name == 'workflow_dispatch'
run: uv publish --publish-url https://test.pypi.org/legacy/
47 changes: 47 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI
on:
workflow_call:
workflow_dispatch:
push:
branches: [main]
paths:
- 'medarc_verifiers/**'
- '!medarc_verifiers/orchestrate/**'
- 'tests/**'
- '!tests/test_orchestrate/**'
pull_request:
paths:
- 'medarc_verifiers/**'
- '!medarc_verifiers/orchestrate/**'
- 'tests/**'
- '!tests/test_orchestrate/**'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Install Python and uv with caching
uses: astral-sh/setup-uv@v7
with:
version: ">=0.10.4,<0.11.0"
python-version: 3.13
enable-cache: true
cache-dependency-glob: "pyproject.toml"

- name: Install optimi
run: uv sync

- name: Ruff Check
id: ruff
run: |
uv run ruff check --output-format=github .
uv run ruff format --check .

- name: Run Tests
id: pytest
run: |
uv run pytest -v --ignore=tests/test_orchestrate
5 changes: 1 addition & 4 deletions environments/aci_bench/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"verifiers>=0.1.5.post0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[tool.prime.environment]
Expand All @@ -18,6 +18,3 @@ visibility = "PUBLIC"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }
5 changes: 1 addition & 4 deletions environments/careqa/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.11"
dependencies = [
"verifiers>=0.1.4",
"datasets>=2.13.0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[tool.prime.environment]
Expand All @@ -21,6 +21,3 @@ build-backend = "hatchling.build"

[tool.hatch.build]
include = ["careqa.py"]

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }
2 changes: 0 additions & 2 deletions environments/head_qa/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ dependencies = [
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }

[tool.prime.environment]
loader = "head_qa:load_environment"
Expand Down
2 changes: 0 additions & 2 deletions environments/head_qa_v2/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ dependencies = [
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }

[tool.prime.environment]
loader = "head_qa_v2:load_environment"
Expand Down
4 changes: 1 addition & 3 deletions environments/longhealth/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,13 @@ authors = [
]
dependencies = [
"verifiers>=0.1.5.post0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }

[tool.prime.environment]
loader = "longhealth:load_environment"
Expand Down
4 changes: 1 addition & 3 deletions environments/m_arc/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
"verifiers>=0.1.3.post0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[tool.prime.environment]
Expand All @@ -21,5 +21,3 @@ build-backend = "hatchling.build"
[tool.hatch.build]
include = ["m_arc.py"]

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }
5 changes: 1 addition & 4 deletions environments/med_dialog/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ dependencies = [
"verifiers>=0.1.4",
"datasets>=4.1.1",
"openai>=2.1.0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }
4 changes: 1 addition & 3 deletions environments/med_halt/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.11"
dependencies = [
"datasets>=4.0.0",
"verifiers>=0.1.2.post0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[tool.prime.environment]
Expand All @@ -22,5 +22,3 @@ build-backend = "hatchling.build"
[tool.hatch.build]
include = ["med_halt.py"]

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }
4 changes: 1 addition & 3 deletions environments/med_mcqa/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ authors = [
]
dependencies = [
"verifiers>=0.1.5.post0",
"medarc_verifiers>=0.1.0",
"medarc-verifiers>=0.1.0",
]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.uv.sources]
medarc_verifiers = { git = "https://github.com/MedARC-AI/med-lm-envs" }

[tool.prime.environment]
loader = "med_mcqa:load_environment"
Expand Down
Loading