nerdd-module 0.3.24__tar.gz → 0.3.25__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.24 → nerdd_module-0.3.25}/PKG-INFO +1 -1
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/__init__.py +0 -1
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/read_input_step.py +2 -1
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/simple_model.py +5 -4
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module.egg-info/PKG-INFO +1 -1
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module.egg-info/SOURCES.txt +0 -1
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/pyproject.toml +1 -1
- nerdd_module-0.3.24/nerdd_module/model/assign_mol_id_step.py +0 -17
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/LICENSE +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/README.md +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/cli.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/default_configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/dict_configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/merged_configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/models.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/package_configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/search_yaml_configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/config/yaml_configuration.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/basic_type_converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/converter_config.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/mol_converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/problem_list_converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/representation_converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/source_list_converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/void_converter.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/depth_first_explorer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/explorer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/file_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/gzip_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/inchi_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/list_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/mol_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/reader_config.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/sdf_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/smiles_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/string_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/tar_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/input/zip_reader.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/assign_name_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/convert_representations_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/enforce_schema_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/model.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/model/write_output_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/csv_writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/file_writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/iterator_writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/pandas_writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/record_list_writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/sdf_writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/output/writer.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/block_logs.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/files.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/get_entry_points.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/literal.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/typed_dict.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/types.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/polyfills/version.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/check_valid_smiles.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/chembl_structure_pipeline.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/filter_by_element.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/filter_by_weight.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/preprocessing_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/remove_stereochemistry.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/sanitize.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/problem.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/py.typed +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/steps/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/steps/map_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/steps/output_step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/steps/step.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/checks.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/files.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/models/AtomicMassModel.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/models/MolWeightModel.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/models/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/predictions.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/preprocessing/DummyPreprocessingStep.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/tests/representations.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/util/__init__.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/util/call_with_mappings.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/util/package.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/version.py +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module.egg-info/dependency_links.txt +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module.egg-info/requires.txt +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module.egg-info/top_level.txt +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/setup.cfg +0 -0
- {nerdd_module-0.3.24 → nerdd_module-0.3.25}/tests/test_features.py +0 -0
|
@@ -13,8 +13,9 @@ class ReadInputStep(Step):
|
|
|
13
13
|
self._input = input
|
|
14
14
|
|
|
15
15
|
def _run(self, source: Iterator[dict]) -> Iterator[dict]:
|
|
16
|
-
for entry in self._explorer.explore(self._input):
|
|
16
|
+
for mol_id, entry in enumerate(self._explorer.explore(self._input)):
|
|
17
17
|
record = dict(
|
|
18
|
+
mol_id=mol_id,
|
|
18
19
|
input_text=entry.raw_input,
|
|
19
20
|
source=entry.source,
|
|
20
21
|
input_type=entry.input_type,
|
|
@@ -18,7 +18,6 @@ from ..preprocessing import PreprocessingStep
|
|
|
18
18
|
from ..problem import Problem
|
|
19
19
|
from ..steps import Step
|
|
20
20
|
from ..util import get_file_path_to_instance
|
|
21
|
-
from .assign_mol_id_step import AssignMolIdStep
|
|
22
21
|
from .assign_name_step import AssignNameStep
|
|
23
22
|
from .convert_representations_step import ConvertRepresentationsStep
|
|
24
23
|
from .enforce_schema_step import EnforceSchemaStep
|
|
@@ -52,11 +51,10 @@ class SimpleModel(Model):
|
|
|
52
51
|
self, input: Any, input_format: Optional[str], **kwargs: Any
|
|
53
52
|
) -> List[Step]:
|
|
54
53
|
return [
|
|
55
|
-
AssignMolIdStep(),
|
|
56
54
|
AssignNameStep(),
|
|
57
55
|
*self._preprocessing_steps,
|
|
58
56
|
# the following step ensures that the column preprocessed_mol is created
|
|
59
|
-
# (even
|
|
57
|
+
# (even if self._preprocessing_steps is empty)
|
|
60
58
|
CustomPreprocessingStep(self),
|
|
61
59
|
]
|
|
62
60
|
|
|
@@ -214,4 +212,7 @@ class CustomPreprocessingStep(PreprocessingStep):
|
|
|
214
212
|
self.model = model
|
|
215
213
|
|
|
216
214
|
def _preprocess(self, mol: Mol) -> Tuple[Optional[Mol], List[Problem]]:
|
|
217
|
-
|
|
215
|
+
try:
|
|
216
|
+
return self.model._preprocess(mol)
|
|
217
|
+
except Exception as e:
|
|
218
|
+
return None, [Problem(type="preprocessing_error", message=str(e))]
|
|
@@ -45,7 +45,6 @@ nerdd_module/input/string_reader.py
|
|
|
45
45
|
nerdd_module/input/tar_reader.py
|
|
46
46
|
nerdd_module/input/zip_reader.py
|
|
47
47
|
nerdd_module/model/__init__.py
|
|
48
|
-
nerdd_module/model/assign_mol_id_step.py
|
|
49
48
|
nerdd_module/model/assign_name_step.py
|
|
50
49
|
nerdd_module/model/convert_representations_step.py
|
|
51
50
|
nerdd_module/model/enforce_schema_step.py
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from typing import Iterator
|
|
2
|
-
|
|
3
|
-
from ..steps import Step
|
|
4
|
-
|
|
5
|
-
__all__ = ["AssignMolIdStep"]
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class AssignMolIdStep(Step):
|
|
9
|
-
def __init__(self) -> None:
|
|
10
|
-
super().__init__()
|
|
11
|
-
|
|
12
|
-
def _run(self, source: Iterator[dict]) -> Iterator[dict]:
|
|
13
|
-
mol_id = 0
|
|
14
|
-
for record in source:
|
|
15
|
-
record["mol_id"] = mol_id
|
|
16
|
-
mol_id += 1
|
|
17
|
-
yield record
|
|
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.24 → nerdd_module-0.3.25}/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.24 → nerdd_module-0.3.25}/nerdd_module/converters/problem_list_converter.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/converters/representation_converter.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/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
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/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
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/check_valid_smiles.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/chembl_structure_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/nerdd_module/preprocessing/preprocessing_step.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.24 → nerdd_module-0.3.25}/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
|