eido 0.2.3__py3-none-any.whl → 0.2.5__py3-none-any.whl
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.
- eido/_version.py +1 -1
- eido/conversion.py +1 -2
- eido/conversion_plugins.py +3 -4
- eido/exceptions.py +1 -1
- eido/output_formatters.py +1 -1
- eido/validation.py +9 -5
- {eido-0.2.3.dist-info → eido-0.2.5.dist-info}/METADATA +15 -5
- eido-0.2.5.dist-info/RECORD +19 -0
- {eido-0.2.3.dist-info → eido-0.2.5.dist-info}/WHEEL +1 -1
- eido-0.2.3.dist-info/RECORD +0 -19
- {eido-0.2.3.dist-info → eido-0.2.5.dist-info}/entry_points.txt +0 -0
- {eido-0.2.3.dist-info → eido-0.2.5.dist-info/licenses}/LICENSE.txt +0 -0
- {eido-0.2.3.dist-info → eido-0.2.5.dist-info}/top_level.txt +0 -0
eido/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.2.
|
|
1
|
+
__version__ = "0.2.5"
|
eido/conversion.py
CHANGED
|
@@ -7,7 +7,6 @@ else:
|
|
|
7
7
|
import inspect
|
|
8
8
|
from logging import getLogger
|
|
9
9
|
import os
|
|
10
|
-
from typing import NoReturn
|
|
11
10
|
|
|
12
11
|
from .exceptions import *
|
|
13
12
|
|
|
@@ -107,7 +106,7 @@ def run_filter(prj, filter_name, verbose=True, plugin_kwargs=None):
|
|
|
107
106
|
return conv_result
|
|
108
107
|
|
|
109
108
|
|
|
110
|
-
def save_result(result_path: str, content: str) ->
|
|
109
|
+
def save_result(result_path: str, content: str) -> None:
|
|
111
110
|
with open(result_path, "w") as f:
|
|
112
111
|
f.write(content)
|
|
113
112
|
|
eido/conversion_plugins.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""built-in PEP filters"""
|
|
2
2
|
|
|
3
3
|
from typing import Dict
|
|
4
4
|
from .output_formatters import MultilineOutputFormatter
|
|
@@ -42,8 +42,7 @@ def yaml_pep_filter(p, **kwargs) -> Dict[str, str]:
|
|
|
42
42
|
"""
|
|
43
43
|
from yaml import dump
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
return {"project": dump(data, default_flow_style=False)}
|
|
45
|
+
return {"project": dump(p.config, default_flow_style=False)}
|
|
47
46
|
|
|
48
47
|
|
|
49
48
|
def csv_pep_filter(p, **kwargs) -> Dict[str, str]:
|
|
@@ -70,7 +69,7 @@ def processed_pep_filter(p, **kwargs) -> Dict[str, str]:
|
|
|
70
69
|
samples_as_objects = kwargs.get("samples_as_objects")
|
|
71
70
|
subsamples_as_objects = kwargs.get("subsamples_as_objects")
|
|
72
71
|
|
|
73
|
-
prj_repr = p.config
|
|
72
|
+
prj_repr = p.config
|
|
74
73
|
|
|
75
74
|
return {
|
|
76
75
|
"project": str(prj_repr),
|
eido/exceptions.py
CHANGED
eido/output_formatters.py
CHANGED
eido/validation.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Mapping, Union
|
|
3
3
|
from copy import deepcopy as dpcpy
|
|
4
4
|
from logging import getLogger
|
|
5
5
|
|
|
@@ -43,6 +43,10 @@ def _validate_object(obj: Mapping, schema: Union[str, dict], sample_name_colname
|
|
|
43
43
|
instance_name = error.instance[sample_name_colname]
|
|
44
44
|
except KeyError:
|
|
45
45
|
instance_name = "project"
|
|
46
|
+
except TypeError:
|
|
47
|
+
instance_name = obj["samples"][error.absolute_path[1]][
|
|
48
|
+
sample_name_colname
|
|
49
|
+
]
|
|
46
50
|
errors_by_type[error.message].append(
|
|
47
51
|
{
|
|
48
52
|
"type": error.message,
|
|
@@ -56,7 +60,7 @@ def _validate_object(obj: Mapping, schema: Union[str, dict], sample_name_colname
|
|
|
56
60
|
_LOGGER.debug("Validation was successful...")
|
|
57
61
|
|
|
58
62
|
|
|
59
|
-
def validate_project(project: peppy.Project, schema: Union[str, dict]) ->
|
|
63
|
+
def validate_project(project: peppy.Project, schema: Union[str, dict]) -> None:
|
|
60
64
|
"""
|
|
61
65
|
Validate a project object against a schema
|
|
62
66
|
|
|
@@ -64,7 +68,7 @@ def validate_project(project: peppy.Project, schema: Union[str, dict]) -> NoRetu
|
|
|
64
68
|
:param str | dict schema: schema dict to validate against or a path to one
|
|
65
69
|
from the error. Useful when used ith large projects
|
|
66
70
|
|
|
67
|
-
:return:
|
|
71
|
+
:return: None
|
|
68
72
|
:raises EidoValidationError: if validation is unsuccessful
|
|
69
73
|
"""
|
|
70
74
|
sample_name_colname = project.sample_name_colname
|
|
@@ -96,7 +100,7 @@ def _validate_sample_object(sample: peppy.Sample, schemas):
|
|
|
96
100
|
|
|
97
101
|
def validate_sample(
|
|
98
102
|
project: peppy.Project, sample_name: Union[str, int], schema: Union[str, dict]
|
|
99
|
-
) ->
|
|
103
|
+
) -> None:
|
|
100
104
|
"""
|
|
101
105
|
Validate the selected sample object against a schema
|
|
102
106
|
|
|
@@ -119,7 +123,7 @@ def validate_sample(
|
|
|
119
123
|
|
|
120
124
|
def validate_config(
|
|
121
125
|
project: Union[peppy.Project, dict], schema: Union[str, dict]
|
|
122
|
-
) ->
|
|
126
|
+
) -> None:
|
|
123
127
|
"""
|
|
124
128
|
Validate the config part of the Project object against a schema
|
|
125
129
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: eido
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: A project metadata validator
|
|
5
5
|
Home-page: https://github.com/pepkit/eido/
|
|
6
6
|
Author: Michal Stolarczyk, Nathan Sheffield
|
|
@@ -15,12 +15,22 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
15
15
|
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
16
16
|
Description-Content-Type: text/markdown
|
|
17
17
|
License-File: LICENSE.txt
|
|
18
|
+
Requires-Dist: importlib-metadata; python_version < "3.10"
|
|
18
19
|
Requires-Dist: jsonschema>=3.0.1
|
|
19
20
|
Requires-Dist: logmuse>=0.2.5
|
|
20
|
-
Requires-Dist: pandas
|
|
21
|
-
Requires-Dist: peppy>=0.40.
|
|
21
|
+
Requires-Dist: pandas<3.0.0
|
|
22
|
+
Requires-Dist: peppy>=0.40.7
|
|
22
23
|
Requires-Dist: ubiquerg>=0.5.2
|
|
23
|
-
|
|
24
|
+
Dynamic: author
|
|
25
|
+
Dynamic: classifier
|
|
26
|
+
Dynamic: description
|
|
27
|
+
Dynamic: description-content-type
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: keywords
|
|
30
|
+
Dynamic: license
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
Dynamic: requires-dist
|
|
33
|
+
Dynamic: summary
|
|
24
34
|
|
|
25
35
|
# <img src="docs/img/eido.svg" alt="eido logo" height="70">
|
|
26
36
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
eido/__init__.py,sha256=D3CD9BefyY5Yckz-LswPca_VH_RIcZpr53_siXkbi14,612
|
|
2
|
+
eido/__main__.py,sha256=L1wnnEreqYv27ZaaCwwImCIHZK0Mz5IxS80ZsNcS1zg,189
|
|
3
|
+
eido/_version.py,sha256=Xsa3ayOMVkhUWm4t06YeyHE0apjpZefxLH4ylp0CDtU,22
|
|
4
|
+
eido/argparser.py,sha256=vx59eO8CClaQpXehcW052y4HW5mttGTqM96PoJJwWkE,4806
|
|
5
|
+
eido/cli.py,sha256=dXPaqF6uUYnGMlW2H9Mc628CfhCl3pEinxWYnQ94SVc,5814
|
|
6
|
+
eido/const.py,sha256=Tb-fDKvneyZX3qLgLYVWtGGs4Hw4tRogB3OXIlwtpdY,1109
|
|
7
|
+
eido/conversion.py,sha256=KARokqRn4gEh5ftstzSBDtpwwpAzIHOHXZnkkk2vZSo,3970
|
|
8
|
+
eido/conversion_plugins.py,sha256=ad9XXxtlAbkhUOTkOF8yuwGz3D2tOB3acd-gktZCdcs,2491
|
|
9
|
+
eido/exceptions.py,sha256=ZMrkp6OO-zgK_bdpu4DiI2-q_JzedEwKMLRt68QOiwc,1211
|
|
10
|
+
eido/inspection.py,sha256=rfuXnAawGBWQFz_hbJA2VYP_sFvpYxztxOiXL6t610o,3223
|
|
11
|
+
eido/output_formatters.py,sha256=gmS-UIRjRQ8Eg24UEyp2fmU046SDbIS7jh4zOLFHlcE,4485
|
|
12
|
+
eido/schema.py,sha256=I75jlUlUdswkne6Xq2XLD8zm-f8p7VITQIj7J_x7aH8,2664
|
|
13
|
+
eido/validation.py,sha256=eFc0YUbrnfANvJ_NzLPMZ-ApV0KUGls6V17MHyUwEJI,8661
|
|
14
|
+
eido-0.2.5.dist-info/licenses/LICENSE.txt,sha256=oB6ZGDa4kcznznJKJsLLFFcOZyi8Y6e2Jv0rJozgp-I,1269
|
|
15
|
+
eido-0.2.5.dist-info/METADATA,sha256=Fu8zDU6AmlNUfi5L_6g_A6EEGbaFHMDFE4iYj_tvtZk,1732
|
|
16
|
+
eido-0.2.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
17
|
+
eido-0.2.5.dist-info/entry_points.txt,sha256=pu2Iw-IUjVa_bKRgt0xUtPT9iwfR0y2nfRYyaRlkLZU,263
|
|
18
|
+
eido-0.2.5.dist-info/top_level.txt,sha256=oltuMelApqcnJZ09Rrg3lF7kmTkmU5bcA6oRvXhNu6A,5
|
|
19
|
+
eido-0.2.5.dist-info/RECORD,,
|
eido-0.2.3.dist-info/RECORD
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
eido/__init__.py,sha256=D3CD9BefyY5Yckz-LswPca_VH_RIcZpr53_siXkbi14,612
|
|
2
|
-
eido/__main__.py,sha256=L1wnnEreqYv27ZaaCwwImCIHZK0Mz5IxS80ZsNcS1zg,189
|
|
3
|
-
eido/_version.py,sha256=PNiDER4qM19h9zdsdfgKt2_dT4WgYK7EguJ8RU2qA_g,22
|
|
4
|
-
eido/argparser.py,sha256=vx59eO8CClaQpXehcW052y4HW5mttGTqM96PoJJwWkE,4806
|
|
5
|
-
eido/cli.py,sha256=dXPaqF6uUYnGMlW2H9Mc628CfhCl3pEinxWYnQ94SVc,5814
|
|
6
|
-
eido/const.py,sha256=Tb-fDKvneyZX3qLgLYVWtGGs4Hw4tRogB3OXIlwtpdY,1109
|
|
7
|
-
eido/conversion.py,sha256=MKuJWvLB10opq_noTiOSviiiJgMLY7n8B2stfCjEELE,4002
|
|
8
|
-
eido/conversion_plugins.py,sha256=zqjJbUo1p3l50NddGcO2KccnK5fXvQPe-GFyABr5Pg4,2529
|
|
9
|
-
eido/exceptions.py,sha256=C9gc_XnxYXT8uH7xXoh1NN7KUFXbRvLp4VN7H1DqF9w,1213
|
|
10
|
-
eido/inspection.py,sha256=rfuXnAawGBWQFz_hbJA2VYP_sFvpYxztxOiXL6t610o,3223
|
|
11
|
-
eido/output_formatters.py,sha256=bKqaashXRh-Vp6WbQzq8lQXbNHtvOR9IdXkn31rCmL8,4481
|
|
12
|
-
eido/schema.py,sha256=I75jlUlUdswkne6Xq2XLD8zm-f8p7VITQIj7J_x7aH8,2664
|
|
13
|
-
eido/validation.py,sha256=vmujhaDmNp2SFLhjBrh1SVGhM_NDf3ARVt91ZHaqrUA,8527
|
|
14
|
-
eido-0.2.3.dist-info/LICENSE.txt,sha256=oB6ZGDa4kcznznJKJsLLFFcOZyi8Y6e2Jv0rJozgp-I,1269
|
|
15
|
-
eido-0.2.3.dist-info/METADATA,sha256=kku0Ni4ZW43It53F7_xXQVVyKl7r9HIiBdRecT3USFM,1519
|
|
16
|
-
eido-0.2.3.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
17
|
-
eido-0.2.3.dist-info/entry_points.txt,sha256=pu2Iw-IUjVa_bKRgt0xUtPT9iwfR0y2nfRYyaRlkLZU,263
|
|
18
|
-
eido-0.2.3.dist-info/top_level.txt,sha256=oltuMelApqcnJZ09Rrg3lF7kmTkmU5bcA6oRvXhNu6A,5
|
|
19
|
-
eido-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|