nerdd-module 0.3.51__tar.gz → 0.3.52__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/PKG-INFO +1 -1
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/models.py +26 -8
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module.egg-info/PKG-INFO +1 -1
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/pyproject.toml +1 -1
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/LICENSE +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/README.md +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/cli.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/default_configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/dict_configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/merged_configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/package_configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/search_yaml_configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/yaml_configuration.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/basic_type_converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/converter_config.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/mol_converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/problem_list_converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/representation_converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/source_list_converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/void_converter.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/depth_first_explorer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/explorer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/file_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/gzip_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/inchi_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/list_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/mol_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/reader_config.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/sdf_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/smiles_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/stream_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/string_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/tar_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/input/zip_reader.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/assign_name_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/convert_representations_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/enforce_schema_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/model.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/prediction_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/read_input_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/write_output_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/csv_writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/file_writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/iterator_writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/pandas_writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/record_list_writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/sdf_writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/writer.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/output/writer_config.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/block_logs.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/files.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/get_entry_points.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/literal.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/typed_dict.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/types.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/polyfills/version.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/check_valid_smiles.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/chembl_structure_pipeline.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/filter_by_element.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/filter_by_weight.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/preprocessing_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/remove_hydrogens.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/remove_small_fragments.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/remove_stereochemistry.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/sanitize.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/problem.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/py.typed +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/steps/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/steps/map_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/steps/output_step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/steps/step.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/checks.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/files.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/models/AtomicMassModel.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/models/MolWeightModel.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/models/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/predictions.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/preprocessing/DummyPreprocessingStep.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/tests/representations.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/util/__init__.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/util/call_with_mappings.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/util/package.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/version.py +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module.egg-info/SOURCES.txt +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module.egg-info/dependency_links.txt +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module.egg-info/requires.txt +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module.egg-info/top_level.txt +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/setup.cfg +0 -0
- {nerdd_module-0.3.51 → nerdd_module-0.3.52}/tests/test_features.py +0 -0
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"""Pydantic models describing module metadata, schema, and parameters."""
|
|
2
|
+
|
|
1
3
|
from typing import Any, List, Optional, Union
|
|
2
4
|
|
|
3
5
|
from pydantic import BaseModel, computed_field, model_validator
|
|
@@ -7,6 +9,8 @@ from ..polyfills import Literal
|
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
class Partner(BaseModel):
|
|
12
|
+
"""Partner organization metadata for module marketing/attribution."""
|
|
13
|
+
|
|
10
14
|
name: str
|
|
11
15
|
logo: str
|
|
12
16
|
url: Optional[str] = None
|
|
@@ -31,14 +35,18 @@ class Author(BaseModel):
|
|
|
31
35
|
|
|
32
36
|
|
|
33
37
|
class Publication(BaseModel):
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
+
"""Reference to a publication related to the module or model."""
|
|
39
|
+
|
|
40
|
+
title: Optional[str] = None
|
|
41
|
+
authors: Optional[List[Author]] = None
|
|
42
|
+
journal: Optional[str] = None
|
|
43
|
+
year: Optional[int] = None
|
|
38
44
|
doi: Optional[str]
|
|
39
45
|
|
|
40
46
|
|
|
41
47
|
class ColorPalette(BaseModel):
|
|
48
|
+
"""Optional color mapping for visualizing categorical or numeric outputs."""
|
|
49
|
+
|
|
42
50
|
type: Optional[str] = None
|
|
43
51
|
name: Optional[str] = None
|
|
44
52
|
domain: Optional[Union[List[str], List[float], List[int], List[bool]]] = None
|
|
@@ -47,6 +55,8 @@ class ColorPalette(BaseModel):
|
|
|
47
55
|
|
|
48
56
|
|
|
49
57
|
class Choice(BaseModel):
|
|
58
|
+
"""Select options for job parameters or categorical result properties."""
|
|
59
|
+
|
|
50
60
|
value: Union[str, int, float, bool]
|
|
51
61
|
label: Optional[str] = None
|
|
52
62
|
|
|
@@ -55,6 +65,8 @@ JobType = Literal["int", "integer", "float", "bool", "boolean", "str", "string"]
|
|
|
55
65
|
|
|
56
66
|
|
|
57
67
|
class JobParameter(BaseModel):
|
|
68
|
+
"""Definition of a user-configurable parameter for a job run."""
|
|
69
|
+
|
|
58
70
|
name: str
|
|
59
71
|
type: JobType
|
|
60
72
|
visible_name: Optional[str] = None
|
|
@@ -64,6 +76,7 @@ class JobParameter(BaseModel):
|
|
|
64
76
|
choices: Optional[List[Choice]] = None
|
|
65
77
|
|
|
66
78
|
def validate_value(self, value: Any) -> None:
|
|
79
|
+
"""Validate a provided value against type and choices."""
|
|
67
80
|
if self.type == ["int", "integer"]:
|
|
68
81
|
if not isinstance(value, int):
|
|
69
82
|
raise ValueError(
|
|
@@ -107,11 +120,15 @@ FormatSpec = Union[List[str], str]
|
|
|
107
120
|
|
|
108
121
|
|
|
109
122
|
class IncludeExcludeFormatSpec(BaseModel):
|
|
123
|
+
"""Visibility filter for result properties per output format."""
|
|
124
|
+
|
|
110
125
|
include: Optional[FormatSpec]
|
|
111
126
|
exclude: Optional[FormatSpec]
|
|
112
127
|
|
|
113
128
|
|
|
114
129
|
class ResultProperty(BaseModel):
|
|
130
|
+
"""Schema entry for a model output property."""
|
|
131
|
+
|
|
115
132
|
name: str
|
|
116
133
|
type: str
|
|
117
134
|
visible_name: Optional[str] = None
|
|
@@ -129,6 +146,7 @@ class ResultProperty(BaseModel):
|
|
|
129
146
|
color_palette: Optional[ColorPalette] = None
|
|
130
147
|
|
|
131
148
|
def is_visible(self, output_format: str) -> bool:
|
|
149
|
+
"""Return True if property should be shown for the given format."""
|
|
132
150
|
formats = self.formats
|
|
133
151
|
|
|
134
152
|
if formats is None:
|
|
@@ -144,6 +162,8 @@ class ResultProperty(BaseModel):
|
|
|
144
162
|
|
|
145
163
|
|
|
146
164
|
class Module(BaseModel):
|
|
165
|
+
"""Full module configuration: metadata, schema, parameters, and validation."""
|
|
166
|
+
|
|
147
167
|
@computed_field # type: ignore[prop-decorator]
|
|
148
168
|
@property
|
|
149
169
|
def id(self) -> str:
|
|
@@ -194,6 +214,7 @@ class Module(BaseModel):
|
|
|
194
214
|
@model_validator(mode="after")
|
|
195
215
|
@classmethod
|
|
196
216
|
def validate_model(cls, values: Any) -> Any:
|
|
217
|
+
"""Enforce consistency between task type and declared result properties."""
|
|
197
218
|
assert isinstance(values, Module)
|
|
198
219
|
|
|
199
220
|
num_atom_properties = len(values.get_property_columns_of_type("atom"))
|
|
@@ -244,10 +265,7 @@ class Module(BaseModel):
|
|
|
244
265
|
return values
|
|
245
266
|
|
|
246
267
|
def validate_job_parameters(self, params: dict) -> None:
|
|
247
|
-
"""
|
|
248
|
-
Validate the job parameters against the module's job parameters.
|
|
249
|
-
Raises an error if a parameter is missing or has an invalid type.
|
|
250
|
-
"""
|
|
268
|
+
"""Validate provided job parameters against the module declaration."""
|
|
251
269
|
# make sure that all job parameters are present
|
|
252
270
|
for param in self.job_parameters:
|
|
253
271
|
if param.name not in params and param.required:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/config/search_yaml_configuration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/problem_list_converter.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/representation_converter.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/converters/source_list_converter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/model/convert_representations_step.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/check_valid_smiles.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/chembl_structure_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/preprocessing_step.py
RENAMED
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/remove_small_fragments.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.51 → nerdd_module-0.3.52}/nerdd_module/preprocessing/remove_stereochemistry.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|