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
182 changes: 0 additions & 182 deletions .github/workflows/CD.yaml

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
name: CI

on:
push:
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
check:
name: Check
Expand All @@ -15,7 +12,6 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo check

test:
name: Test Suite
runs-on: ubuntu-latest
Expand All @@ -24,23 +20,20 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --benches --verbose --all

test_python:
name: Test Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v5
with:
python-version: '3.10'
cache: 'pip'
python-version: "3.10"
enable-cache: true
cache-dependency-glob: pyproject.toml
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: install project
run: uv sync --all-extras --dev
- name: pytest
shell: bash
run: |
set -e
python -m venv .venv
source .venv/bin/activate
pip install '.[test]'
pytest
run: uv run pytest
15 changes: 9 additions & 6 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: pyproject.toml
- run: uv run --only-group dev pre-commit run --all
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Changelog

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]

### Added

- Started a changelog ([#2](https://github.com/BattModels/smirk/pull/2))

### Changed

- Bumped PyO3, tokenizers and dict_derive dependencies ([#2](https://github.com/BattModels/smirk/pull/2))
- Switched to uv for CI/pre-commit workflows ([#2](https://github.com/BattModels/smirk/pull/2))

### Breaking

- Increased minimum python version to 3.9 ([#2](https://github.com/BattModels/smirk/pull/2))

### Fixed

- Mark version as dynamic in pyproject ([#2](https://github.com/BattModels/smirk/pull/2))

### Removed

## [0.1.1] - 2024-12-09

Preprint v2 posted: [arXiv:2409.15370v2](https://arxiv.org/abs/2409.15370v2)

## Added

- Added support for post-processing templates to `SmirkTokenizerFast` ([#1](https://github.com/BattModels/smirk/pull/1))
- Registered smirk with transformer's AutoTokenizer ([#1](https://github.com/BattModels/smirk/pull/1))
- Added `vocab`, `convert_ids_to_tokens` and `convert_tokens_to_ids` methods ([#1](https://github.com/BattModels/smirk/pull/1))
- Added support for truncating and padding during tokenization ([#1](https://github.com/BattModels/smirk/pull/1))

## Fixed

- Fixed CI to install test dependencies ([#1](https://github.com/BattModels/smirk/pull/1))

## [0.1.0] - 2024-09-11

Preprint posted: [arXiv:2409.15370v1](https://arxiv.org/abs/2409.15370v1)

### Added

- Initial tagged version of smirk
18 changes: 12 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
[package]
name = "smirk"
version = "0.1.1"
version = "0.2.0"
edition = "2021"
license = "Apache-2.0"
description = "A chemically complete tokenizer for OpenSMILES"
authors = [
"Alexius Wadell <awadell@umich.edu>",
"Anoushka Bhutani",
]
readme = "README.md"
repository = "https://github.com/BattModels/smirk"

[lib]
name = "smirk"

# "cdylib" is necessary to produce a shared library for Python to import from.
crate-type = ["cdylib"]

[dependencies]
clap = "4.5.1"
const_format = "0.2.32"
derive_builder = "0.20.0"
dict_derive = "0.5.0"
dict_derive = "0.6.0"
either = "1.13.0"
macro_rules_attribute = "0.2.0"
once_cell = "1.19.0"
paste = "1.0.14"
pyo3 = { version = "^0.20", features = ["extension-module"] }
pyo3 = { version = "^0.23", features = ["extension-module"] }
regex = "1.10.3"
serde = "1.0.197"
serde_json = "1.0.114"
serde_with = "3.8.0"
tokenizers = { version = "^0.19"}
tokenizers = { version = "^0.21"}

[dev-dependencies]
tempfile = "3.10.1"
11 changes: 11 additions & 0 deletions dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: cargo
directory: /
schedule:
interval: monthly
versioning-strategy: increase
- package-ecosystem: pip
directory: /
schedule:
interval: monthly
15 changes: 9 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
[project]
name = "smirk"
requires-python = ">=3.7"
requires-python = ">=3.9"
license = {file = "LICENSE"}
dynamic = ["version"]
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = [
"transformers ~= 4.40",
"transformers >=4.40,<5",
]

[project.optional-dependencies]
test = [
[dependency-groups]
dev = [
"pytest~=8.3",
"parameterized==0.9.0",
"torch",
"numpy",
"ruff~=0.9.4",
"torch~=2.0",
"numpy~=2.0",
"pre-commit~=4.1.0",
]

[build-system]
Expand Down
Loading
Loading