Skip to content

Commit a1c00b9

Browse files
committed
Release v0.8.0
1 parent b9d7eac commit a1c00b9

File tree

135 files changed

+15796
-940
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+15796
-940
lines changed

Makefile

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,4 @@ future.get_msa()
155155
future.get_seed()
156156
```
157157

158-
See more at our [Homepage](https://docs.openprotein.ai/)
158+
See more at our [Homepage](https://docs.openprotein.ai/)

anaconda_build/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: openprotein-python
3-
version: "0.7.0"
3+
version: "0.8.0"
44

55
source:
66
path: ../

dprint.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"toml": {},
3+
"excludes": [],
4+
"plugins": ["https://plugins.dprint.dev/toml-0.6.2.wasm"]
5+
}

mise.dev.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[env]
2+
_.python.venv = ".pixi/envs/dev"

mise.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[tools]
2+
pixi = "latest"
3+
"npm:pyright" = "latest"
4+
5+
[env]
6+
_.python.venv = ".pixi/envs/default"

openprotein/__init__.py

Lines changed: 27 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,20 @@
1010
import warnings
1111

1212
from openprotein._version import __version__
13-
from openprotein.app import (
14-
DataAPI,
15-
JobsAPI,
16-
AlignAPI,
17-
PromptAPI,
18-
EmbeddingsAPI,
19-
FoldAPI,
20-
SVDAPI,
21-
UMAPAPI,
22-
PredictorAPI,
23-
DesignAPI,
24-
)
25-
from openprotein.app.models import Future
13+
from openprotein.data import DataAPI
14+
from openprotein.errors import DeprecationError
15+
from openprotein.jobs import JobsAPI
16+
from openprotein.align import AlignAPI
17+
from openprotein.prompt import PromptAPI
18+
from openprotein.embeddings import EmbeddingsAPI
19+
from openprotein.fold import FoldAPI
20+
from openprotein.svd import SVDAPI
21+
from openprotein.umap import UMAPAPI
22+
from openprotein.predictor import PredictorAPI
23+
from openprotein.design import DesignAPI
24+
from openprotein.jobs import Future
2625
from openprotein.base import APISession
2726

28-
if TYPE_CHECKING:
29-
from openprotein.app.deprecated import TrainingAPI, DesignAPI
30-
3127

3228
class OpenProtein(APISession):
3329
"""
@@ -43,8 +39,7 @@ class OpenProtein(APISession):
4339
_umap = None
4440
_fold = None
4541
_predictor = None
46-
_designer = None
47-
_deprecated = None
42+
_design = None
4843

4944
def wait(self, future: Future, *args, **kwargs):
5045
return future.wait(*args, **kwargs)
@@ -63,12 +58,6 @@ def data(self) -> DataAPI:
6358
self._data = DataAPI(self)
6459
return self._data
6560

66-
@property
67-
def train(self):
68-
raise AttributeError(
69-
"Access to deprecated train module is under the deprecated property, i.e. session.deprecated.train"
70-
)
71-
7261
@property
7362
def jobs(self) -> JobsAPI:
7463
"""
@@ -113,7 +102,9 @@ def svd(self) -> SVDAPI:
113102
The embedding submodule gives access to protein embedding models and their inference endpoints.
114103
"""
115104
if self._svd is None:
116-
self._svd = SVDAPI(self, self.embeddings)
105+
self._svd = SVDAPI(
106+
session=self,
107+
)
117108
return self._svd
118109

119110
@property
@@ -122,7 +113,9 @@ def umap(self) -> UMAPAPI:
122113
The embedding submodule gives access to protein embedding models and their inference endpoints.
123114
"""
124115
if self._umap is None:
125-
self._umap = UMAPAPI(self)
116+
self._umap = UMAPAPI(
117+
session=self,
118+
)
126119
return self._umap
127120

128121
@property
@@ -131,17 +124,21 @@ def predictor(self) -> PredictorAPI:
131124
The predictor submodule gives access to training and predicting with predictors built on top of embeddings.
132125
"""
133126
if self._predictor is None:
134-
self._predictor = PredictorAPI(self, self.embeddings, self.svd)
127+
self._predictor = PredictorAPI(
128+
session=self,
129+
)
135130
return self._predictor
136131

137132
@property
138133
def design(self) -> DesignAPI:
139134
"""
140135
The designer submodule gives access to functionality for designing new sequences using models from predictor train.
141136
"""
142-
if self._designer is None:
143-
self._designer = DesignAPI(self)
144-
return self._designer
137+
if self._design is None:
138+
self._design = DesignAPI(
139+
session=self,
140+
)
141+
return self._design
145142

146143
@property
147144
def fold(self) -> FoldAPI:
@@ -152,45 +149,5 @@ def fold(self) -> FoldAPI:
152149
self._fold = FoldAPI(self)
153150
return self._fold
154151

155-
@property
156-
def deprecated(self) -> "Deprecated":
157-
158-
if self._deprecated is None:
159-
warnings.warn(
160-
"Support for deprecated APIs will be dropped in the future! Read the documentation to migrate to the updated APIs."
161-
)
162-
self._deprecated = self.Deprecated(self)
163-
return self._deprecated
164-
165-
class Deprecated:
166-
167-
_train = None
168-
_design = None
169-
170-
def __init__(self, session: APISession):
171-
self.session = session
172-
173-
@property
174-
def train(self) -> "TrainingAPI":
175-
"""
176-
The train submodule gives access to functionality for training and validating ML models.
177-
"""
178-
from openprotein.app.deprecated import TrainingAPI
179-
180-
if self._train is None:
181-
self._train = TrainingAPI(self.session)
182-
return self._train
183-
184-
@property
185-
def design(self) -> "DesignAPI":
186-
"""
187-
The design submodule gives access to functionality for designing new sequences using models from train.
188-
"""
189-
from openprotein.app.deprecated import DesignAPI
190-
191-
if self._design is None:
192-
self._design = DesignAPI(self.session)
193-
return self._design
194-
195152

196153
connect = OpenProtein

openprotein/_version.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
try:
22
from importlib.metadata import version
33
except ModuleNotFoundError:
4-
from importlib_metadata import version # py37
4+
from importlib_metadata import version # type: ignore - py37
55

66
try:
77
__version__ = version("openprotein-python")
8-
except:
8+
except:
99
__version__ = "None"
10-

openprotein/align/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
1-
from openprotein.app import AlignAPI
2-
from openprotein.app.models import MSAFuture
1+
"""
2+
Align module for creating and searching alignments on OpenProtein.
3+
4+
isort:skip_file
5+
"""
6+
7+
from .msa import MSAFuture
8+
from .align import AlignAPI

0 commit comments

Comments
 (0)