Skip to content
Open
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
all-dependencies:
patterns:
- "*"
open-pull-requests-limit: 5
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: CI

on:
push:
branches: [main, master]
tags: ["v*.*.*"]
pull_request:
branches: [main, master]

env:
AWS_REGION: us-west-2

permissions:
contents: read

jobs:
build_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- id: build
run: |
uv build
ls -1 dist/
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: graphcore-build
path: dist/
if-no-files-found: error

tests:
needs: [build_package]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: graphcore-build
path: dist/
- name: Install from wheel
run: |
uv sync --frozen --no-install-project --group test --group ci
uv pip install --force-reinstall --no-deps dist/*.whl
- name: Run pytest
if: success() || failure()
run: make pytest
- name: Run pyright
if: success() || failure()
run: make pyright

codeartifact_pypi_upload:
name: AWS CodeArtifact PyPI Upload
needs: [build_package, tests]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6.1.1
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ env.AWS_REGION }}
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: graphcore-build
path: dist/
- name: Upload package
env:
UV_PUBLISH_USERNAME: aws
run: |
export UV_PUBLISH_PASSWORD="$(aws codeartifact get-authorization-token --domain certora --domain-owner 092457480553 --region us-west-2 --query authorizationToken --output text)"
uv publish --index certora
- name: GitHub Release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
files: |
dist/*.whl
dist/*.tar.gz
27 changes: 0 additions & 27 deletions .github/workflows/pyright.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/pytest.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.venv/
build/
*.egg-info/
*/_version.py
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.PHONY: install
install:
uv sync

.PHONY: update-deps
update-deps:
uv lock --upgrade
uv sync

.PHONY: build
build:
uv build

.PHONY: pytest
pytest:
uv run pytest tests/

.PHONY: pyright
pyright:
uv run pyright .
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,19 @@
This is a reusable framework for writing LLM-powered applications that iterate using
various client side tools to help the LLM complete a task. It is used by Certora's Concordance
and AI Composer (among others). It is also currently deeply undocumented.

## Development setup

### Prerequisites

- [uv](https://docs.astral.sh/uv/getting-started/installation/)

### Install

```bash
make install
```

### Updating a dependency

When a dependency releases a new version: `make update-deps` then commit the updated `uv.lock`.
35 changes: 23 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,41 @@
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "graphcore"
version = "0.1.0"
dynamic = ["version"]
description = "A reusable framework for writing LLM-powered applications that iterate using various client side tools"
readme = "README.md"
requires-python = ">=3.12"
license = {text = "GPL-3.0"}
authors = [
{name = "Certora Ltd."}
]

license = { text = "GPL-3.0" }
authors = [{ name = "Certora Ltd." }]

dependencies = [
"langchain>=1.2",
"langchain-anthropic>=1.4",
"langchain-core>=1.2",
"langgraph==1.0.5",
"langgraph-prebuilt==1.0.8",
"psycopg[binary]>=3.2",
"psycopg[pool]>=3.2"
"psycopg[pool]>=3.2",
]

[dependency-groups]
test = ["pytest>=9.0", "pytest-asyncio>=1.3", "testcontainers>=4.0"]
ci = ["pyright"]

[tool.setuptools]
packages = ["graphcore", "graphcore.tools"]
[tool.hatch.version]
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "graphcore/_version.py"

[tool.hatch.build.targets.wheel]
packages = ["graphcore"]

[[tool.uv.index]]
name = "certora"
url = "https://certora-092457480553.d.codeartifact.us-west-2.amazonaws.com/pypi/Certora-Internal/simple/"
publish-url = "https://certora-092457480553.d.codeartifact.us-west-2.amazonaws.com/pypi/Certora-Internal/"
explicit = true
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

Loading