diff --git a/dependabot.yaml b/.github/dependabot.yaml similarity index 100% rename from dependabot.yaml rename to .github/dependabot.yaml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..07bad33 --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,144 @@ +# This file is autogenerated by maturin v1.11.5 +# To update, run +# +# maturin generate-ci github --platform manylinux windows macos --output .github/workflows/CD.yml +# +name: CD +on: + push: + branches: + - main + tags: + - '*' + workflow_dispatch: +permissions: + contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + linux: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + - runner: ubuntu-22.04 + target: x86_64 + - runner: ubuntu-22.04 + target: x86 + - runner: ubuntu-22.04 + target: aarch64 + - runner: ubuntu-22.04 + target: armv7 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.13 + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist -i python3.10 -i python3.11 -i python3.12 -i python3.13 -i python3.14 + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + manylinux: auto + - name: Upload wheels + uses: actions/upload-artifact@v5 + with: + name: wheels-linux-${{ matrix.platform.target }} + path: dist + windows: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + - runner: windows-latest + target: x64 + python_arch: x64 + - runner: windows-latest + target: x86 + python_arch: x86 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.13 + architecture: ${{ matrix.platform.python_arch }} + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + - name: Upload wheels + uses: actions/upload-artifact@v5 + with: + name: wheels-windows-${{ matrix.platform.target }} + path: dist + macos: + runs-on: ${{ matrix.platform.runner }} + strategy: + matrix: + platform: + - runner: macos-15-intel + target: x86_64 + - runner: macos-latest + target: aarch64 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: 3.13 + - name: Build wheels + uses: PyO3/maturin-action@v1 + with: + target: ${{ matrix.platform.target }} + args: --release --out dist --find-interpreter + sccache: ${{ !startsWith(github.ref, 'refs/tags/') }} + - name: Upload wheels + uses: actions/upload-artifact@v5 + with: + name: wheels-macos-${{ matrix.platform.target }} + path: dist + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Build sdist + uses: PyO3/maturin-action@v1 + with: + command: sdist + args: --out dist + - name: Upload sdist + uses: actions/upload-artifact@v5 + with: + name: wheels-sdist + path: dist + release: + name: Release + runs-on: ubuntu-latest + if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }} + needs: + - linux + - windows + - macos + - sdist + permissions: + # Use to sign the release artifacts + id-token: write + # Used to upload release artifacts + contents: write + # Used to generate artifact attestation + attestations: write + steps: + - uses: actions/download-artifact@v6 + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v3 + with: + subject-path: wheels-*/* + - name: Install uv + if: ${{ startsWith(github.ref, 'refs/tags/') }} + uses: astral-sh/setup-uv@v7 + - name: Publish to PyPI + if: ${{ startsWith(github.ref, 'refs/tags/') }} + run: uv publish 'wheels-*/*' diff --git a/CHANGELOG.md b/CHANGELOG.md index c538a6d..ddd3ee6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/BattModels/smirk) +## [v0.2.0](https://github.com/BattModels/smirk) + +Paper published in ACS JCIM: [*Tokenization for Molecular Foundation Models*](https://doi.org/10.1021/acs.jcim.5c01856) ### Added - Started a changelog ([#2](https://github.com/BattModels/smirk/pull/2)) +- Added a release pipeline ([#6](https://github.com/BattModels/smirk/pull/6)) ### Changed diff --git a/Cargo.toml b/Cargo.toml index 031a62d..4f9e772 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "smirk" -version = "0.2.0-dev" +version = "0.2.0" edition = "2021" license = "Apache-2.0" description = "A chemically complete tokenizer for OpenSMILES" @@ -25,7 +25,7 @@ either = "1.13.0" macro_rules_attribute = "0.2.0" once_cell = "1.19.0" paste = "1.0.14" -pyo3 = { version = "^0.23", features = ["extension-module"] } +pyo3 = { version = "^0.27", features = ["extension-module"] } regex = "1.10.3" serde = "1.0.197" serde_json = "1.0.114" diff --git a/README.md b/README.md index 722d135..904d627 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@