nerdd-module 0.3.33__tar.gz → 0.3.35__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.33 → nerdd_module-0.3.35}/PKG-INFO +1 -1
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/cli.py +1 -1
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/models.py +4 -3
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/sdf_writer.py +17 -2
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module.egg-info/PKG-INFO +1 -1
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/pyproject.toml +1 -1
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/LICENSE +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/README.md +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/default_configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/dict_configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/merged_configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/package_configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/search_yaml_configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/config/yaml_configuration.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/basic_type_converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/converter_config.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/mol_converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/problem_list_converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/representation_converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/source_list_converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/void_converter.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/depth_first_explorer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/explorer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/file_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/gzip_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/inchi_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/list_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/mol_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/reader_config.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/sdf_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/smiles_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/string_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/tar_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/input/zip_reader.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/assign_name_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/convert_representations_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/enforce_schema_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/model.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/read_input_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/simple_model.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/model/write_output_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/csv_writer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/file_writer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/iterator_writer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/pandas_writer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/record_list_writer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/writer.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/output/writer_config.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/block_logs.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/files.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/get_entry_points.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/literal.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/typed_dict.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/types.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/polyfills/version.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/check_valid_smiles.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/chembl_structure_pipeline.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/filter_by_element.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/filter_by_weight.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/preprocessing_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/remove_stereochemistry.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/sanitize.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/problem.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/py.typed +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/steps/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/steps/map_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/steps/output_step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/steps/step.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/checks.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/files.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/models/AtomicMassModel.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/models/MolWeightModel.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/models/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/predictions.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/preprocessing/DummyPreprocessingStep.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/preprocessing/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/tests/representations.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/util/__init__.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/util/call_with_mappings.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/util/package.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/version.py +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module.egg-info/SOURCES.txt +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module.egg-info/dependency_links.txt +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module.egg-info/requires.txt +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module.egg-info/top_level.txt +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/setup.cfg +0 -0
- {nerdd_module-0.3.33 → nerdd_module-0.3.35}/tests/test_features.py +0 -0
|
@@ -27,7 +27,7 @@ Note that input formats shouldn't be mixed.
|
|
|
27
27
|
|
|
28
28
|
def infer_click_type(param: JobParameter) -> click.ParamType:
|
|
29
29
|
if param.choices is not None:
|
|
30
|
-
choices = [c.value for c in param.choices]
|
|
30
|
+
choices = [str(c.value) for c in param.choices]
|
|
31
31
|
return click.Choice(choices)
|
|
32
32
|
|
|
33
33
|
type_map = {
|
|
@@ -46,8 +46,8 @@ class ColorPalette(BaseModel):
|
|
|
46
46
|
unknown: Optional[str] = None
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
class
|
|
50
|
-
value: str
|
|
49
|
+
class Choice(BaseModel):
|
|
50
|
+
value: Union[str, int, float, bool]
|
|
51
51
|
label: Optional[str] = None
|
|
52
52
|
|
|
53
53
|
|
|
@@ -58,7 +58,7 @@ class JobParameter(BaseModel):
|
|
|
58
58
|
help_text: Optional[str] = None
|
|
59
59
|
default: Any = None
|
|
60
60
|
required: bool = False
|
|
61
|
-
choices: Optional[List[
|
|
61
|
+
choices: Optional[List[Choice]] = None
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
Task = Literal[
|
|
@@ -85,6 +85,7 @@ class ResultProperty(BaseModel):
|
|
|
85
85
|
sortable: bool = False
|
|
86
86
|
group: Optional[str] = None
|
|
87
87
|
level: Level = "molecule"
|
|
88
|
+
choices: Optional[List[Choice]] = None
|
|
88
89
|
formats: Union[FormatSpec, IncludeExcludeFormatSpec, None] = None
|
|
89
90
|
representation: Optional[str] = None
|
|
90
91
|
from_property: Optional[str] = None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import IO, Any, Dict, Iterable
|
|
2
2
|
|
|
3
|
-
from rdkit.Chem import Mol, SDWriter
|
|
3
|
+
from rdkit.Chem import Mol, SanitizeMol, SDWriter
|
|
4
4
|
|
|
5
5
|
from .file_writer import FileLike, FileWriter
|
|
6
6
|
from .writer_config import WriterConfig
|
|
@@ -19,6 +19,12 @@ class SdfWriter(FileWriter):
|
|
|
19
19
|
# assume that there is a mol object
|
|
20
20
|
mol = entry["input_mol"]
|
|
21
21
|
|
|
22
|
+
# sanitize molecule to avoid basic writing errors (e.g. AtomKekulizeException)
|
|
23
|
+
try:
|
|
24
|
+
SanitizeMol(mol)
|
|
25
|
+
except: # noqa: E722
|
|
26
|
+
mol = None
|
|
27
|
+
|
|
22
28
|
# if the molecule is erroneous, use an empty molecule
|
|
23
29
|
if mol is None:
|
|
24
30
|
mol = Mol()
|
|
@@ -38,7 +44,16 @@ class SdfWriter(FileWriter):
|
|
|
38
44
|
mol.SetProp(key, value_as_str)
|
|
39
45
|
|
|
40
46
|
# write molecule
|
|
41
|
-
|
|
47
|
+
try:
|
|
48
|
+
writer.write(mol)
|
|
49
|
+
except: # noqa: E722
|
|
50
|
+
# if the molecule can't be written, try to use an empty molecule
|
|
51
|
+
empty_mol = Mol()
|
|
52
|
+
# copy all properties from the original molecule
|
|
53
|
+
for key, value in mol.GetPropsAsDict().items():
|
|
54
|
+
empty_mol.SetProp(key, value)
|
|
55
|
+
# write the empty molecule
|
|
56
|
+
writer.write(mol)
|
|
42
57
|
finally:
|
|
43
58
|
writer.close()
|
|
44
59
|
|
|
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.33 → nerdd_module-0.3.35}/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.33 → nerdd_module-0.3.35}/nerdd_module/converters/problem_list_converter.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/converters/representation_converter.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/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
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/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
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/check_valid_smiles.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/chembl_structure_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/nerdd_module/preprocessing/preprocessing_step.py
RENAMED
|
File without changes
|
{nerdd_module-0.3.33 → nerdd_module-0.3.35}/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
|