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
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to PyPI

on:
release:
types: [published]

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

release:
runs-on: ubuntu-latest
needs: tests
if: needs.tests.result == 'success'
permissions:
id-token: write

steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Setup uv
uses: astral-sh/setup-uv@v6

- name: Build package with uv
run: uv build

- name: Publish package distributions to PyPI with uv
run: uv publish -t ${{ secrets.PYPI_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)
[![GitHub Repo Size](https://img.shields.io/github/repo-size/comprhys/aviary?label=Repo+Size)](https://github.com/comprhys/aviary/graphs/contributors)
[![PyPI](https://img.shields.io/pypi/v/aviary-models?logo=pypi&logoColor=white)](https://pypi.org/project/aviary-models)
[![GitHub last commit](https://img.shields.io/github/last-commit/comprhys/aviary?label=Last+Commit)](https://github.com/comprhys/aviary/commits)
[![Tests](https://github.com/CompRhys/aviary/actions/workflows/test.yml/badge.svg)](https://github.com/CompRhys/aviary/actions/workflows/test.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/CompRhys/aviary/main.svg)](https://results.pre-commit.ci/latest/github/CompRhys/aviary/main)
Expand All @@ -18,7 +19,7 @@ The aim of `aviary` is to contain multiple models for materials discovery under
Users can install `aviary` from source with

```sh
pip install -U git+https://github.com/CompRhys/aviary
pip install aviary-models
```

or for an editable source install from a local clone:
Expand Down
19 changes: 7 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "aviary"
name = "aviary-models"
version = "1.2.0"
description = "A collection of machine learning models for materials discovery"
authors = [{ name = "Rhys Goodall", email = "rhys.goodall@outlook.com" }]
Expand Down Expand Up @@ -52,14 +48,13 @@ Repo = "https://github.com/CompRhys/aviary"
test = ["matminer", "moyopy>=0.3.3", "pytest", "pytest-cov"]
moyopy = ["moyopy>=0.3.3"]

[tool.hatch.build.targets.wheel]
packages = ["aviary"]
[build-system]
requires = ["uv_build>=0.7.5"]
build-backend = "uv_build"

[tool.hatch.build]
include = [
"aviary/**/*.py",
"aviary/**/*.json",
]
[tool.uv.build-backend]
module-name = "aviary"
module-root = ""

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand Down