Skip to content

Commit b5afd22

Browse files
Added workflows.
1 parent 49a8aed commit b5afd22

File tree

5 files changed

+88
-33
lines changed

5 files changed

+88
-33
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Release
13+
uses: patrick-kidger/action_update_python_project@v7
14+
with:
15+
python-version: "3.11"
16+
test-script: |
17+
cp -r ${{ github.workspace }}/tests ./tests
18+
cp ${{ github.workspace }}/pyproject.toml ./pyproject.toml
19+
uv sync --extra dev --no-install-project --inexact
20+
uv run --no-sync pytest
21+
pypi-token: ${{ secrets.pypi_token }}
22+
github-user: patrick-kidger
23+
github-token: ${{ github.token }}

.github/workflows/run_tests.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
run-test:
8+
strategy:
9+
matrix:
10+
python-version: [ "3.10", "3.12" ]
11+
os: [ ubuntu-latest ]
12+
fail-fast: false
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install '.[dev]'
27+
28+
- name: Checks with pre-commit
29+
uses: pre-commit/[email protected]
30+
31+
- name: Test with pytest
32+
run: |
33+
python -m pytest

esm2quinox/_esm2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@jax.jit
14-
def _randint(key: PRNGKeyArray, index: int, maxval: Int[ArrayLike, ""]):
14+
def _randint(key: PRNGKeyArray, index: Int[ArrayLike, ""], maxval: Int[ArrayLike, ""]):
1515
return jr.randint(jr.fold_in(key, index), (), minval=0, maxval=maxval)
1616

1717

pyproject.toml

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = ["hatchling"]
4+
15
[project]
2-
name = "esm2quinox"
3-
version = "0.0.1"
4-
description = "ESM2 implemented in Equinox+JAX."
5-
readme = "README.md"
6-
requires-python =">=3.10"
7-
license = {file = "LICENSE"}
86
authors = [
9-
{name = "Patrick Kidger", email = "[email protected]"},
7+
{email = "[email protected]", name = "Patrick Kidger"}
108
]
11-
keywords = ["jax", "neural-networks", "deep-learning", "equinox", "esm2", "protein-language-model"]
129
classifiers = [
13-
"Development Status :: 3 - Alpha",
14-
"Intended Audience :: Developers",
15-
"Intended Audience :: Financial and Insurance Industry",
16-
"Intended Audience :: Information Technology",
17-
"Intended Audience :: Science/Research",
18-
"License :: OSI Approved :: Apache Software License",
19-
"Natural Language :: English",
20-
"Programming Language :: Python :: 3",
21-
"Topic :: Scientific/Engineering :: Artificial Intelligence",
22-
"Topic :: Scientific/Engineering :: Information Analysis",
23-
"Topic :: Scientific/Engineering :: Mathematics",
10+
"Development Status :: 3 - Alpha",
11+
"Intended Audience :: Developers",
12+
"Intended Audience :: Financial and Insurance Industry",
13+
"Intended Audience :: Information Technology",
14+
"Intended Audience :: Science/Research",
15+
"License :: OSI Approved :: Apache Software License",
16+
"Natural Language :: English",
17+
"Programming Language :: Python :: 3",
18+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
19+
"Topic :: Scientific/Engineering :: Information Analysis",
20+
"Topic :: Scientific/Engineering :: Mathematics"
2421
]
25-
urls = {repository = "https://github.com/patrick-kidger/esm2quinox" }
2622
dependencies = ["equinox>=0.11.11", "jax>=0.5.0", "jaxtyping>=0.2.37"]
23+
description = "ESM2 implemented in Equinox+JAX."
24+
keywords = ["jax", "neural-networks", "deep-learning", "equinox", "esm2", "protein-language-model"]
25+
license = {file = "LICENSE"}
26+
name = "esm2quinox"
27+
readme = "README.md"
28+
requires-python = ">=3.10"
29+
urls = {repository = "https://github.com/patrick-kidger/esm2quinox"}
30+
version = "0.1.0"
2731

28-
[build-system]
29-
requires = ["hatchling"]
30-
build-backend = "hatchling.build"
32+
[project.optional-dependencies]
33+
dev = ["beartype", "fair-esm==2.0.0", "pre-commit", "pytest", "torch"]
3134

3235
[tool.hatch.build]
3336
include = ["esm2quinox/*"]
3437

38+
[tool.pyright]
39+
include = ["esm2quinox", "tests"]
40+
reportIncompatibleMethodOverride = true
41+
reportIncompatibleVariableOverride = false # Incompatible with eqx.AbstractVar
42+
3543
[tool.pytest.ini_options]
3644
addopts = "--jaxtyping-packages=esm2quinox,beartype.beartype(conf=beartype.BeartypeConf(strategy=beartype.BeartypeStrategy.On))"
3745

@@ -50,8 +58,3 @@ combine-as-imports = true
5058
extra-standard-library = ["typing_extensions"]
5159
lines-after-imports = 2
5260
order-by-type = false
53-
54-
[tool.pyright]
55-
reportIncompatibleMethodOverride = true
56-
reportIncompatibleVariableOverride = false # Incompatible with eqx.AbstractVar
57-
include = ["esm2quinox", "tests"]

tests/requirements.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)