diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..8d6a770 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,50 @@ +name: Publish to PyPI + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install build + run: python -m pip install --upgrade build + + - name: Build wheel and sdist + run: python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + name: Publish to PyPI + needs: build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/alchemize-ai + permissions: + id-token: write + steps: + - name: Download distributions + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/README.md b/README.md index c181057..3b5a132 100644 --- a/README.md +++ b/README.md @@ -79,11 +79,25 @@ minGPT-nano (3 layers, 3 heads, 48-dim embeddings) transpiled to zero-dependency Forward pass numerical accuracy: max_diff = 5.36e-07. Enzyme gradients match PyTorch autograd to ~5e-7 (f32 precision). +## Install + +```bash +pip install alchemize-ai +``` + +> Note: the PyPI distribution name is `alchemize-ai` (the `alchemize` name was taken by an abandoned package), but the import name is still `alchemize`: +> +> ```python +> from alchemize import compile_model +> ``` + +The CLI command is also `alchemize`. + ## Quick start ```bash export ANTHROPIC_API_KEY=sk-ant-... -uv sync # or: pip install -e . +pip install alchemize-ai # or, for development: uv sync / pip install -e . ``` ```python diff --git a/pyproject.toml b/pyproject.toml index 3b2e3f7..719fa8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "alchemize" +name = "alchemize-ai" version = "0.1.0" description = "The Transalchemy: an AI agent that transpiles between any computational framework via LLM" authors = [{name = "Thomas Wiecki", email = "thomas.wiecki@pymc-labs.com"}]