pymetadata 0.5.2__py3-none-any.whl → 0.5.4__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.

Potentially problematic release.


This version of pymetadata might be problematic. Click here for more details.

@@ -26,6 +26,7 @@ from pronto.relationship import Relationship as ProntoRelationship
26
26
  from pronto.term import Term as ProntoTerm
27
27
 
28
28
  from pymetadata import ENUM_DIR, RESOURCES_DIR, log
29
+ from pymetadata.console import console
29
30
 
30
31
  logger = log.get_logger(__name__)
31
32
 
@@ -51,18 +52,18 @@ class OntologyFile:
51
52
  @property
52
53
  def path(self) -> Path:
53
54
  """Path of ontology file."""
54
- return RESOURCES_DIR / "ontologies" / f"{self.id.lower()}.{self.format}.gz"
55
+ return RESOURCES_DIR / "ontologies" / f"{self.id.lower()}.{self.format.value}.gz"
55
56
 
56
57
  @property
57
58
  def filename(self) -> str:
58
59
  """Filename of ontology file.
59
60
 
60
- :return: ontolgoy filename
61
+ :return: ontology filename
61
62
  :rtype: str
62
63
  """
63
- data = str(self.path)
64
- print(data)
65
- return data
64
+ name = str(self.path)
65
+ console.print(name)
66
+ return name
66
67
 
67
68
 
68
69
  _ontology_files: List[OntologyFile] = [
@@ -57,5 +57,3 @@ __all__ = [
57
57
  "{{ontology_id}}",
58
58
  "{{ontology_id}}Type",
59
59
  ]
60
-
61
-
pymetadata/unichem.py CHANGED
@@ -130,7 +130,7 @@ class UnichemQuery:
130
130
  xrefs: List[CrossReference] = []
131
131
  if data:
132
132
  if "error" in data:
133
- logger.error(f"No xrefs for inchikey: '{inchikey}'")
133
+ logger.warning(f"No xrefs for inchikey: '{inchikey}'")
134
134
  return []
135
135
 
136
136
  # process data
@@ -138,7 +138,7 @@ class UnichemQuery:
138
138
  for item in data:
139
139
  source_id: int = int(item["src_id"])
140
140
  if source_id not in self.sources:
141
- if source_id != 40:
141
+ if source_id not in {40, 49, 50}:
142
142
  # number 40 is missing from definitions
143
143
  logger.error(
144
144
  f"No UniChem source for source id '{source_id}', in item "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pymetadata
3
- Version: 0.5.2
3
+ Version: 0.5.4
4
4
  Summary: pymetadata are python utilities for working with metadata.
5
5
  Author-email: Matthias König <konigmatt@googlemail.com>
6
6
  Maintainer-email: Matthias König <konigmatt@googlemail.com>
@@ -27,7 +27,6 @@ Requires-Dist: pydantic>=2.10.4
27
27
  Requires-Dist: requests>=2.32.3
28
28
  Requires-Dist: rich>=13.9.4
29
29
  Requires-Dist: xmltodict>=0.14.2
30
- Requires-Dist: zeep>=4.3.1
31
30
  Provides-Extra: dev
32
31
  Requires-Dist: bump-my-version>=0.29.0; extra == 'dev'
33
32
  Requires-Dist: mypy>=1.9.0; extra == 'dev'
@@ -49,15 +48,15 @@ Description-Content-Type: text/markdown
49
48
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5308801.svg)](https://doi.org/10.5281/zenodo.5308801)
50
49
 
51
50
  pymetadata is a collection of python utilities for working with
52
- metadata in the context of COMBINE standards with source code available from
51
+ metadata in the context of COMBINE standards with source code available from
53
52
  [https://github.com/matthiaskoenig/pymetadata](https://github.com/matthiaskoenig/pymetadata).
54
53
 
55
54
  Features include among others
56
55
 
57
- - COMBINE archive version 1 support (OMEX)
56
+ - [core](src/pymetadata/core)COMBINE archive version 1 support (OMEX)
58
57
  - annotation classes and helpers
59
58
  - SBO and KISAO ontology enums
60
-
59
+
61
60
  If you have any questions or issues please [open an issue](https://github.com/matthiaskoenig/pymetadata/issues).
62
61
 
63
62
  # Documentation
@@ -75,10 +74,10 @@ Contributions are always welcome! Please read the [contributing guidelines](http
75
74
  - Documentation: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
76
75
 
77
76
  # Funding
78
- Matthias König (MK) was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054). MK is supported by the Federal Ministry of Education and Research (BMBF, Germany) within ATLAS by grant number 031L0304B and by the German Research Foundation (DFG) within the Research Unit Program FOR 5151 QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach) by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).
77
+ Matthias König (MK) was supported by the Federal Ministry of Education and Research (BMBF, Germany) within the research network Systems Medicine of the Liver (LiSyM, grant number 031L0054). MK is supported by the Federal Ministry of Education and Research (BMBF, Germany) within ATLAS by grant number 031L0304B and by the German Research Foundation (DFG) within the Research Unit Program FOR 5151 QuaLiPerF (Quantifying Liver Perfusion-Function Relationship in Complex Resection - A Systems Medicine Approach) by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).
79
78
 
80
79
  # Installation
81
- `pymetadata` is available from [pypi](https://pypi.python.org/pypi/pymetadata) and
80
+ `pymetadata` is available from [pypi](https://pypi.python.org/pypi/pymetadata) and
82
81
  can be installed via
83
82
 
84
83
  ```bash
@@ -1,19 +1,19 @@
1
- pymetadata/__init__.py,sha256=35mfW854dCAnEdVYlCj4WPTTQiU-v_XXB7B0VnUPS6M,357
1
+ pymetadata/__init__.py,sha256=jesaxsDSp7xbL8JFTMU_pSdcTcYx1NdgzY_XV8wgoD0,357
2
2
  pymetadata/cache.py,sha256=tQuMIcd1cOfO0dvODQMG92_IrHqgswPfshhFjtl7Pd0,1409
3
- pymetadata/chebi.py,sha256=EH8sYRx7af3Hi1O8x5Tvj_T9cawGVMtlYp_4B3L8tHY,2730
3
+ pymetadata/chebi.py,sha256=P9OWSf8fzcjfMscPG8LORMNnFRUye-Ai-Y3NiGyG0uc,2822
4
4
  pymetadata/console.py,sha256=ouDYOx_81ndvtMW5GVrut71uzPC5xlvibGu9N5YdbRA,332
5
5
  pymetadata/log.py,sha256=3uRVMYolalrS0PVWS_4qSme8RYhot3_W2ad1JopI88g,664
6
6
  pymetadata/omex.py,sha256=ZFsX9Xbh8sgT1UeBpKMgdrOh2PGTxrH2IAdYo_R9xc0,29927
7
7
  pymetadata/omex_v2.py,sha256=HZBg_wmQWixweOZG3qVj2zqG_o1x9Ljxy-JEP6-ZFhM,584
8
8
  pymetadata/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- pymetadata/unichem.py,sha256=slxTabar1ZdZQUyTyRloiWKxD92ixnDGsJ2xk3alrTo,6878
9
+ pymetadata/unichem.py,sha256=SCdljAA6dsR3DrD_OrjRoXIMhgwVV-MiXoCiNMVo_-0,6894
10
10
  pymetadata/core/__init__.py,sha256=VWZCD9TgSGldzdtXoarvp_2oUHKXQkC1T-VUSvMLwNA,28
11
- pymetadata/core/annotation.py,sha256=PO2dyjgDP91J6JcJ2i3CzvdSd-6I0-3lAeTaaRd_cyY,13695
11
+ pymetadata/core/annotation.py,sha256=aAkgWzx-Qmp2fUO3Qn-yq0-Ht3fEiwaR1yAlqXvvQJ4,13742
12
12
  pymetadata/core/creator.py,sha256=0_z0HPhO2Tq8FnAED_4kuVzUiPfm_tYMiZSvyw73Aho,1307
13
13
  pymetadata/core/synonym.py,sha256=-2_1ouSWAtQK5eZv2-p6CIJgYZX4xGKua-09ubBg5uo,155
14
14
  pymetadata/core/xref.py,sha256=qlUfAb5wk4bOwPiUCEV0s9gIWVdWf5yup1W8UxR5uHY,1594
15
15
  pymetadata/examples/__init__.py,sha256=LHY-XmQoiBxoHQW9mQN1_fUYnpfkALuRsdxDXU9sIeU,31
16
- pymetadata/examples/cache_path_example.py,sha256=f1-uvvIO28voxpehIvlXuWybNsAkAldmS70Bd77Cb78,377
16
+ pymetadata/examples/cache_path_example.py,sha256=WGDiwVmRO47r2k19y3mtyQGYD74NgTfiK6V4Cm8kaEQ,376
17
17
  pymetadata/examples/omex_example.py,sha256=z8fKyI1z5NMze8DdTfGYvG0rxzinFk61ruiT6NDdcT4,1403
18
18
  pymetadata/examples/test.omex,sha256=uVrkDrA59F0S6TpQOk_UulDO-pTu0nU3f6zmaWI7zi4,26219
19
19
  pymetadata/examples/results/test_from_files.omex,sha256=wFBnU3v8uUiKkh4RcvMBWSUuaKtSCixQMwwZtbwEiZE,1807
@@ -25,18 +25,17 @@ pymetadata/examples/results/testomex/models/omex_comp_flat.xml,sha256=3avaqyiP07
25
25
  pymetadata/examples/results/testomex/models/omex_minimal.xml,sha256=r6FDgMu4rEXR2H_EKyQlSh4JkisH1Yu2clVkqKarPOI,6619
26
26
  pymetadata/identifiers/__init__.py,sha256=6Jd-w9Izl_wpWKV8IMBv7rW0Aq067V2czu00LNfPTL8,34
27
27
  pymetadata/identifiers/miriam.py,sha256=pa7lB1_C2cKRUuojFPvxAQ6yDI_ZQNjGEoYMb1395pY,982
28
- pymetadata/identifiers/registry.py,sha256=FzajEoFXlywtAqhGQ2YpxkViAoBRXZM5P82J6ZOHyPc,13081
28
+ pymetadata/identifiers/registry.py,sha256=B2LgtNhGyEwL_X-PlwmrJy4IWUuOQPN6-54L-WZs8xk,12152
29
29
  pymetadata/metadata/__init__.py,sha256=wrZtmqudWwyxJXrsHoTx235ooDepKgiia8kHKiIZO4Y,154
30
- pymetadata/metadata/eco.py,sha256=wsF-nRuXdI5Fm8T1e8wWYFtBPgzQ9ap2zIkH3nXjab4,662767
31
- pymetadata/metadata/kisao.py,sha256=oI3zuCDhDmA-aK5pWLhNJu1Y0XgBvI6IpmLlEnymgdo,89273
32
- pymetadata/metadata/sbo.py,sha256=rJEtdhOP5YUY1i8-6drWsglDmayFEpWVA2h2t3fjLCo,141756
30
+ pymetadata/metadata/eco.py,sha256=5htFnOP7y5EKVJujTcuUvGQWHiBBjpQBrKl5Z0wN41g,704651
31
+ pymetadata/metadata/kisao.py,sha256=W8ZrG79zRUftOLIIvuSSIp-b33YtLhJqifYF40v7jv4,91588
32
+ pymetadata/metadata/sbo.py,sha256=x8Sg6k4VhqkcFF_NjBRF_RixCYIwJvUAz2YSuq-77HU,139787
33
33
  pymetadata/ontologies/__init__.py,sha256=vIpTqwqrhOAOYfnavWBQL149dNMAPv-OE5IyloYQCrQ,18
34
34
  pymetadata/ontologies/ols.py,sha256=lKmhRMKuEx29QAZsxCRlzUwH48CGtl8YKM2AcsiDFVk,6814
35
- pymetadata/ontologies/ontology.py,sha256=cnAgXzxPn3XxZ8FUAMuSAH0eOGio-YK1Enzy3ZuKzcc,9100
36
- pymetadata/resources/chebi_webservice_wsdl.xml,sha256=0AEgcZ48bk4L6l3jO5-6BIVwfTr4yXnRZCtXue5NyHo,23846
35
+ pymetadata/ontologies/ontology.py,sha256=-3_AAq-HxRBOZReuLb3dj56HPPFUXsW22ULwaYQLIBc,9153
37
36
  pymetadata/resources/ontologies/README.md,sha256=h1LIKpr42-s0RzwpCufkR_YJ2nWiwOapZX_frRXk3Qg,163
38
- pymetadata/resources/templates/ontology_enum.pytemplate,sha256=fK7SBTVfRzVk-z_6wiZ_9MDbTNSlEpGGellRoliGqac,1674
39
- pymetadata-0.5.2.dist-info/METADATA,sha256=d39G-Arr7ZINSjkrXQg5JxHqurwMItj8dmwOAP0Vc0w,4943
40
- pymetadata-0.5.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
41
- pymetadata-0.5.2.dist-info/licenses/LICENSE,sha256=bIHEDEMiQfVe9c81lFP7Q9hsCOmEuj2c_m50LuotsMM,1058
42
- pymetadata-0.5.2.dist-info/RECORD,,
37
+ pymetadata/resources/templates/ontology_enum.pytemplate,sha256=nona0KbGoFumgJo2v_J-pcTniXveiTGb8bz-1rMoDR8,1672
38
+ pymetadata-0.5.4.dist-info/METADATA,sha256=0U53rnyuNU9DAru79B-TAmujpzBCzvFbYTYEg5iCIxE,4936
39
+ pymetadata-0.5.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
40
+ pymetadata-0.5.4.dist-info/licenses/LICENSE,sha256=4oZhYj-TN8e6NrD0wup4nJfQUH9zX0v3gz43xN6F2hs,1059
41
+ pymetadata-0.5.4.dist-info/RECORD,,
@@ -4,4 +4,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
4
4
 
5
5
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
6
 
7
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.