Skip to content

Commit

Permalink
Merge pull request #4 from OpenProteinAI/develop
Browse files Browse the repository at this point in the history
Release v0.5.0
  • Loading branch information
markgeejw authored Oct 18, 2024
2 parents 228654e + 048dfc5 commit d31bc18
Show file tree
Hide file tree
Showing 82 changed files with 9,775 additions and 5,022 deletions.
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
VERSION ?= 0.4.0
VERSION ?= 0.5.0
SHELL := /bin/bash

.PHONY: releasehere
releasegit:
# Update Poetry version
poetry version $(VERSION)
# Update Pixi version
pixi project version set $(VERSION)

# Update version in meta.yaml
sed -i 's/^ version: .*/ version: "$(VERSION)"/' anaconda_build/meta.yaml
# sed -i'' 's/^ version: .*/^ version: "$(VERSION)"/' anaconda_build/meta.yaml
perl -i -pe's/^ version: .*/ version: "$(VERSION)"/' anaconda_build/meta.yaml

# Commit changes
git add pyproject.toml anaconda_build/meta.yaml
Expand All @@ -20,8 +21,6 @@ releasegit:
git push origin HEAD
git push origin v$(VERSION)

curl -X PURGE https://camo.githubusercontent.com/125a275204c801f733fd69689c1e72bde9960a1e193c9c46299d848373a52a93/68747470733a2f2f616e61636f6e64612e6f72672f6f70656e70726f7465696e2f6f70656e70726f7465696e2d707974686f6e2f6261646765732f76657273696f6e2e737667


releasehere:
# Update Poetry version
Expand All @@ -47,8 +46,10 @@ releasehere:

#conda
source activate bld && conda build ./anaconda_build

curl -X PURGE https://camo.githubusercontent.com/125a275204c801f733fd69689c1e72bde9960a1e193c9c46299d848373a52a93/68747470733a2f2f616e61636f6e64612e6f72672f6f70656e70726f7465696e2f6f70656e70726f7465696e2d707974686f6e2f6261646765732f76657273696f6e2e737667

condabld:
micromamba activate openprotein-sdk-build
conda build -c conda-forge --numpy 2.1 ./anaconda_build

proddocs:
cd apidocs && make clean && make html
Expand Down
2 changes: 2 additions & 0 deletions anaconda_build/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
numpy:
- 2.1
21 changes: 11 additions & 10 deletions anaconda_build/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: openprotein-python
version: "0.4.1"
version: "0.5.0"

source:
path: ../
Expand All @@ -12,18 +12,19 @@ build:

requirements:
build:
- python >=3.7
- poetry
- python >=3.10,<3.11
- hatchling >=1.25.0,<2
host:
- python >=3.7
- python >=3.10,<3.11
- pip
- poetry
- hatchling >=1.25.0,<2
run:
- python >=3.7
- requests >=2.0
- pydantic >=1.0
- tqdm >=4.0
- pandas >=1.0
- python >=3.10,<3.11
- requests >=2.32.3,<3
- pydantic >=2.5,<3
- tqdm >=4.66.5,<5
- pandas >=2.1.4,<3
- numpy >=2.1.1,<3

about:
home: https://www.openprotein.ai/
Expand Down
57 changes: 40 additions & 17 deletions openprotein/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
from openprotein._version import __version__

from openprotein.app import (
SVDAPI,
AlignAPI,
AssayDataAPI,
DesignAPI,
EmbeddingsAPI,
FoldAPI,
JobsAPI,
PredictorAPI,
TrainingAPI,
)
from openprotein.app.models import Future
from openprotein.base import APISession
from openprotein.api.jobs import JobsAPI, Job
from openprotein.api.data import DataAPI
from openprotein.api.align import AlignAPI
from openprotein.api.embedding import EmbeddingAPI
from openprotein.api.train import TrainingAPI
from openprotein.api.design import DesignAPI
from openprotein.api.fold import FoldAPI
from openprotein.api.jobs import load_job


class OpenProtein(APISession):
Expand All @@ -17,20 +20,22 @@ class OpenProtein(APISession):
"""

_embedding = None
_svd = None
_fold = None
_align = None
_jobs = None
_data = None
_train = None
_design = None
_predictor = None

def wait(self, job: Job, *args, **kwargs):
return job.wait(self, *args, **kwargs)
def wait(self, future: Future, *args, **kwargs):
return future.wait(*args, **kwargs)

wait_until_done = wait

def load_job(self, job_id):
return load_job(self, job_id)
return self.jobs.__load(job_id=job_id)

@property
def jobs(self) -> JobsAPI:
Expand All @@ -42,12 +47,12 @@ def jobs(self) -> JobsAPI:
return self._jobs

@property
def data(self) -> DataAPI:
def data(self) -> AssayDataAPI:
"""
The data submodule gives access to functionality for uploading and accessing user data.
"""
if self._data is None:
self._data = DataAPI(self)
self._data = AssayDataAPI(self)
return self._data

@property
Expand All @@ -62,21 +67,39 @@ def train(self) -> TrainingAPI:
@property
def align(self) -> AlignAPI:
"""
The PoET submodule gives access to the PoET generative model and MSA and prompt creation interfaces.
The Align submodule gives access to the sequence alignment capabilities by building MSAs and prompts that can be used with PoET.
"""
if self._align is None:
self._align = AlignAPI(self)
return self._align

@property
def embedding(self) -> EmbeddingAPI:
def embedding(self) -> EmbeddingsAPI:
"""
The embedding submodule gives access to protein embedding models and their inference endpoints.
"""
if self._embedding is None:
self._embedding = EmbeddingAPI(self)
self._embedding = EmbeddingsAPI(self)
return self._embedding

@property
def svd(self) -> SVDAPI:
"""
The embedding submodule gives access to protein embedding models and their inference endpoints.
"""
if self._svd is None:
self._svd = SVDAPI(self, self.embedding)
return self._svd

@property
def predictor(self) -> PredictorAPI:
"""
The predictor submodule gives access to training and predicting with predictors built on top of embeddings.
"""
if self._predictor is None:
self._predictor = PredictorAPI(self, self.embedding, self.svd)
return self._predictor

@property
def design(self) -> DesignAPI:
"""
Expand Down
9 changes: 2 additions & 7 deletions openprotein/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
from . import data
from . import design
from . import train
from . import predict
from . import align
from . import embedding
from . import fold
from . import align, assaydata, design, embedding, fold, predict, predictor, train
from .deprecated import poet
Loading

0 comments on commit d31bc18

Please sign in to comment.