pymetadata 0.4.0__tar.gz → 0.4.2__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.

Potentially problematic release.


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

Files changed (49) hide show
  1. {pymetadata-0.4.0/src/pymetadata.egg-info → pymetadata-0.4.2}/PKG-INFO +30 -39
  2. {pymetadata-0.4.0 → pymetadata-0.4.2}/README.rst +13 -21
  3. {pymetadata-0.4.0 → pymetadata-0.4.2}/setup.cfg +19 -20
  4. {pymetadata-0.4.0 → pymetadata-0.4.2}/setup.py +1 -1
  5. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/__init__.py +2 -1
  6. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/cache.py +1 -0
  7. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/chebi.py +1 -0
  8. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/console.py +1 -0
  9. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/core/annotation.py +1 -0
  10. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/core/creator.py +1 -0
  11. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/core/synonym.py +1 -0
  12. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/core/xref.py +1 -0
  13. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/examples/omex_example.py +1 -0
  14. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/identifiers/registry.py +2 -16
  15. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/log.py +1 -0
  16. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/metadata/kisao.py +10 -0
  17. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/omex.py +1 -1
  18. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/omex_v2.py +1 -0
  19. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/ontologies/ols.py +6 -9
  20. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/ontologies/ontology.py +2 -1
  21. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/resources/identifiers_registry.json +1082 -554
  22. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/unichem.py +7 -5
  23. {pymetadata-0.4.0 → pymetadata-0.4.2/src/pymetadata.egg-info}/PKG-INFO +30 -39
  24. pymetadata-0.4.2/src/pymetadata.egg-info/requires.txt +22 -0
  25. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_chebi.py +1 -0
  26. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_ols.py +1 -0
  27. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_omex.py +1 -0
  28. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_ontology.py +1 -0
  29. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_registry.py +1 -0
  30. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_sbo_kisao.py +1 -0
  31. {pymetadata-0.4.0 → pymetadata-0.4.2}/tests/test_unichem.py +2 -1
  32. pymetadata-0.4.0/src/pymetadata.egg-info/requires.txt +0 -23
  33. {pymetadata-0.4.0 → pymetadata-0.4.2}/LICENSE +0 -0
  34. {pymetadata-0.4.0 → pymetadata-0.4.2}/MANIFEST.in +0 -0
  35. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/core/__init__.py +0 -0
  36. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/examples/__init__.py +0 -0
  37. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/identifiers/__init__.py +0 -0
  38. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/identifiers/miriam.py +0 -0
  39. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/metadata/__init__.py +0 -0
  40. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/metadata/eco.py +0 -0
  41. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/metadata/sbo.py +0 -0
  42. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/ontologies/__init__.py +0 -0
  43. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/py.typed +0 -0
  44. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/resources/chebi_webservice_wsdl.xml +0 -0
  45. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata/resources/templates/ontology_enum.pytemplate +0 -0
  46. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata.egg-info/SOURCES.txt +0 -0
  47. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata.egg-info/dependency_links.txt +0 -0
  48. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata.egg-info/top_level.txt +0 -0
  49. {pymetadata-0.4.0 → pymetadata-0.4.2}/src/pymetadata.egg-info/zip-safe +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pymetadata
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: pymetadata are python utilities for working with metadata.
5
5
  Home-page: https://github.com/matthiaskoenig/pymetadata
6
6
  Download-URL: https://pypi.org/project/pymetadata
@@ -17,38 +17,37 @@ Classifier: Development Status :: 4 - Beta
17
17
  Classifier: Intended Audience :: Science/Research
18
18
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
19
19
  Classifier: Operating System :: OS Independent
20
- Classifier: Programming Language :: Python :: 3.8
21
20
  Classifier: Programming Language :: Python :: 3.9
22
21
  Classifier: Programming Language :: Python :: 3.10
23
22
  Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
24
  Classifier: Programming Language :: Python :: Implementation :: CPython
25
25
  Classifier: Topic :: Scientific/Engineering
26
26
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
27
- Requires-Python: >=3.8
27
+ Requires-Python: >=3.9
28
28
  Description-Content-Type: text/x-rst
29
29
  License-File: LICENSE
30
30
  Requires-Dist: depinfo>=1.7
31
- Requires-Dist: uuid>=1.30
32
- Requires-Dist: lxml>=4.9
33
- Requires-Dist: rich>=13.6
31
+ Requires-Dist: lxml>=5.2
32
+ Requires-Dist: rich>=13.7
34
33
  Requires-Dist: requests>=2.31
35
34
  Requires-Dist: zeep>=4.2.1
36
- Requires-Dist: pronto>=2.5.5
37
- Requires-Dist: fastobo>=0.12.2
38
- Requires-Dist: jinja2>=3.1.2
35
+ Requires-Dist: pronto>=2.5.6
36
+ Requires-Dist: fastobo>=0.12.3
37
+ Requires-Dist: jinja2>=3.1
39
38
  Requires-Dist: xmltodict>=0.13.0
40
- Requires-Dist: pydantic>=2.4
39
+ Requires-Dist: pydantic>=2.6
41
40
  Provides-Extra: development
42
- Requires-Dist: pip-tools>6.5.1; extra == "development"
43
- Requires-Dist: black>=22.1.0; extra == "development"
41
+ Requires-Dist: pip-tools>=7.4.1; extra == "development"
42
+ Requires-Dist: black>=24.3.0; extra == "development"
44
43
  Requires-Dist: bump2version>=1.0.1; extra == "development"
45
- Requires-Dist: isort>=5.10; extra == "development"
46
- Requires-Dist: tox>=3.25; extra == "development"
47
- Requires-Dist: flake8>=4.0.1; extra == "development"
44
+ Requires-Dist: isort>=5.13.2; extra == "development"
45
+ Requires-Dist: tox>=4.12.2; extra == "development"
46
+ Requires-Dist: flake8>=7.0.0; extra == "development"
48
47
  Requires-Dist: flake8-mypy>=17.8.0; extra == "development"
49
- Requires-Dist: mypy>=0.931; extra == "development"
50
- Requires-Dist: pytest>=7.0.1; extra == "development"
51
- Requires-Dist: pytest-cov>=3.0.0; extra == "development"
48
+ Requires-Dist: mypy>=1.9.0; extra == "development"
49
+ Requires-Dist: pytest>=8.1.1; extra == "development"
50
+ Requires-Dist: pytest-cov>=5.0.0; extra == "development"
52
51
 
53
52
  .. image:: https://github.com/matthiaskoenig/pymetadata/raw/develop/docs/images/favicon/pymetadata-100x100-300dpi.png
54
53
  :align: left
@@ -56,36 +55,28 @@ Requires-Dist: pytest-cov>=3.0.0; extra == "development"
56
55
 
57
56
  pymetadata: python utilities for metadata and COMBINE archives
58
57
  ==============================================================
58
+ |icon1| |icon2| |icon3| |icon4| |icon5| |icon6| |icon7|
59
59
 
60
- .. image:: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD/badge.svg
60
+
61
+ .. |icon1| image:: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD/badge.svg
61
62
  :target: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD
62
63
  :alt: GitHub Actions CI/CD Status
63
-
64
- .. image:: https://img.shields.io/pypi/v/pymetadata.svg
64
+ .. |icon2| image:: https://img.shields.io/pypi/v/pymetadata.svg
65
65
  :target: https://pypi.org/project/pymetadata/
66
66
  :alt: Current PyPI Version
67
-
68
- .. image:: https://img.shields.io/pypi/pyversions/pymetadata.svg
67
+ .. |icon3| image:: https://img.shields.io/pypi/pyversions/pymetadata.svg
69
68
  :target: https://pypi.org/project/pymetadata/
70
69
  :alt: Supported Python Versions
71
-
72
- .. image:: https://img.shields.io/pypi/l/pymetadata.svg
70
+ .. |icon4| image:: https://img.shields.io/pypi/l/pymetadata.svg
73
71
  :target: http://opensource.org/licenses/LGPL-3.0
74
72
  :alt: GNU Lesser General Public License 3
75
-
76
- .. image:: https://codecov.io/gh/matthiaskoenig/pymetadata/branch/develop/graph/badge.svg
77
- :target: https://codecov.io/gh/matthiaskoenig/pymetadata
78
- :alt: Codecov
79
-
80
- .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5308801.svg
73
+ .. |icon5| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5308801.svg
81
74
  :target: https://doi.org/10.5281/zenodo.5308801
82
75
  :alt: Zenodo DOI
83
-
84
- .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
76
+ .. |icon6| image:: https://img.shields.io/badge/code%20style-black-000000.svg
85
77
  :target: https://github.com/ambv/black
86
78
  :alt: Black
87
-
88
- .. image:: http://www.mypy-lang.org/static/mypy_badge.svg
79
+ .. |icon7| image:: http://www.mypy-lang.org/static/mypy_badge.svg
89
80
  :target: http://mypy-lang.org/
90
81
  :alt: mypy
91
82
 
@@ -140,11 +131,11 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
140
131
 
141
132
  Funding
142
133
  =======
143
- Matthias König is supported by the Federal Ministry of Education and Research (BMBF, Germany)
134
+ Matthias König was supported by the Federal Ministry of Education and Research (BMBF, Germany)
144
135
  within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054)
145
- and by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151
136
+ and is supported by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151
146
137
  "`QuaLiPerF <https://qualiperf.de>`__ (Quantifying Liver Perfusion-Function Relationship in Complex Resection -
147
- A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).
138
+ A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA), and
148
139
 
149
140
  Installation
150
141
  ============
@@ -169,4 +160,4 @@ To install for development use::
169
160
 
170
161
  pip install -e .[development]
171
162
 
172
- © 2021-2022 Matthias König
163
+ © 2021-2024 Matthias König
@@ -4,36 +4,28 @@
4
4
 
5
5
  pymetadata: python utilities for metadata and COMBINE archives
6
6
  ==============================================================
7
+ |icon1| |icon2| |icon3| |icon4| |icon5| |icon6| |icon7|
7
8
 
8
- .. image:: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD/badge.svg
9
+
10
+ .. |icon1| image:: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD/badge.svg
9
11
  :target: https://github.com/matthiaskoenig/pymetadata/workflows/CI-CD
10
12
  :alt: GitHub Actions CI/CD Status
11
-
12
- .. image:: https://img.shields.io/pypi/v/pymetadata.svg
13
+ .. |icon2| image:: https://img.shields.io/pypi/v/pymetadata.svg
13
14
  :target: https://pypi.org/project/pymetadata/
14
15
  :alt: Current PyPI Version
15
-
16
- .. image:: https://img.shields.io/pypi/pyversions/pymetadata.svg
16
+ .. |icon3| image:: https://img.shields.io/pypi/pyversions/pymetadata.svg
17
17
  :target: https://pypi.org/project/pymetadata/
18
18
  :alt: Supported Python Versions
19
-
20
- .. image:: https://img.shields.io/pypi/l/pymetadata.svg
19
+ .. |icon4| image:: https://img.shields.io/pypi/l/pymetadata.svg
21
20
  :target: http://opensource.org/licenses/LGPL-3.0
22
21
  :alt: GNU Lesser General Public License 3
23
-
24
- .. image:: https://codecov.io/gh/matthiaskoenig/pymetadata/branch/develop/graph/badge.svg
25
- :target: https://codecov.io/gh/matthiaskoenig/pymetadata
26
- :alt: Codecov
27
-
28
- .. image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5308801.svg
22
+ .. |icon5| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.5308801.svg
29
23
  :target: https://doi.org/10.5281/zenodo.5308801
30
24
  :alt: Zenodo DOI
31
-
32
- .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
25
+ .. |icon6| image:: https://img.shields.io/badge/code%20style-black-000000.svg
33
26
  :target: https://github.com/ambv/black
34
27
  :alt: Black
35
-
36
- .. image:: http://www.mypy-lang.org/static/mypy_badge.svg
28
+ .. |icon7| image:: http://www.mypy-lang.org/static/mypy_badge.svg
37
29
  :target: http://mypy-lang.org/
38
30
  :alt: mypy
39
31
 
@@ -88,11 +80,11 @@ PARTICULAR PURPOSE. See the GNU General Public License for more details.
88
80
 
89
81
  Funding
90
82
  =======
91
- Matthias König is supported by the Federal Ministry of Education and Research (BMBF, Germany)
83
+ Matthias König was supported by the Federal Ministry of Education and Research (BMBF, Germany)
92
84
  within the research network Systems Medicine of the Liver (**LiSyM**, grant number 031L0054)
93
- and by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151
85
+ and is supported by the German Research Foundation (DFG) within the Research Unit Programme FOR 5151
94
86
  "`QuaLiPerF <https://qualiperf.de>`__ (Quantifying Liver Perfusion-Function Relationship in Complex Resection -
95
- A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA).
87
+ A Systems Medicine Approach)" by grant number 436883643 and by grant number 465194077 (Priority Programme SPP 2311, Subproject SimLivA), and
96
88
 
97
89
  Installation
98
90
  ============
@@ -117,4 +109,4 @@ To install for development use::
117
109
 
118
110
  pip install -e .[development]
119
111
 
120
- © 2021-2022 Matthias König
112
+ © 2021-2024 Matthias König
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 0.4.0
2
+ current_version = 0.4.2
3
3
  commit = True
4
4
  tag = True
5
5
  parse = (?P<major>\d+)
@@ -28,10 +28,10 @@ classifiers =
28
28
  Intended Audience :: Science/Research
29
29
  License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
30
30
  Operating System :: OS Independent
31
- Programming Language :: Python :: 3.8
32
31
  Programming Language :: Python :: 3.9
33
32
  Programming Language :: Python :: 3.10
34
33
  Programming Language :: Python :: 3.11
34
+ Programming Language :: Python :: 3.12
35
35
  Programming Language :: Python :: Implementation :: CPython
36
36
  Topic :: Scientific/Engineering
37
37
  Topic :: Scientific/Engineering :: Bio-Informatics
@@ -49,22 +49,21 @@ keywords =
49
49
 
50
50
  [options]
51
51
  zip_safe = True
52
- python_requires = >=3.8
52
+ python_requires = >=3.9
53
53
  install_requires =
54
54
  depinfo>=1.7
55
- uuid>=1.30
56
- lxml>=4.9
57
- rich>=13.6
55
+ lxml>=5.2
56
+ rich>=13.7
58
57
  requests>=2.31
59
58
  zeep>=4.2.1
60
- pronto>=2.5.5
61
- fastobo>=0.12.2
62
- jinja2>=3.1.2
59
+ pronto>=2.5.6
60
+ fastobo>=0.12.3
61
+ jinja2>=3.1
63
62
  xmltodict>=0.13.0
64
- pydantic>=2.4
63
+ pydantic>=2.6
65
64
  tests_require =
66
- tox>=3.27
67
- pytest
65
+ tox>=4.14.2
66
+ pytest>=8.1.1
68
67
  packages = find:
69
68
  package_dir =
70
69
  = src
@@ -81,16 +80,16 @@ where = src
81
80
 
82
81
  [options.extras_require]
83
82
  development =
84
- pip-tools>6.5.1
85
- black>=22.1.0
83
+ pip-tools>=7.4.1
84
+ black>=24.3.0
86
85
  bump2version>=1.0.1
87
- isort>=5.10
88
- tox>=3.25
89
- flake8>=4.0.1
86
+ isort>=5.13.2
87
+ tox>=4.12.2
88
+ flake8>=7.0.0
90
89
  flake8-mypy>=17.8.0
91
- mypy>=0.931
92
- pytest>=7.0.1
93
- pytest-cov>=3.0.0
90
+ mypy>=1.9.0
91
+ pytest>=8.1.1
92
+ pytest-cov>=5.0.0
94
93
 
95
94
  [bdist_wheel]
96
95
  universal = 1
@@ -4,4 +4,4 @@ from setuptools import setup # type: ignore
4
4
 
5
5
 
6
6
  if __name__ == "__main__":
7
- setup(version="0.4.0")
7
+ setup(version="0.4.2")
@@ -1,8 +1,9 @@
1
1
  """pymetadata - Python utilities for metadata."""
2
+
2
3
  from pathlib import Path
3
4
 
4
5
  __author__ = "Matthias Koenig"
5
- __version__ = "0.4.0"
6
+ __version__ = "0.4.2"
6
7
 
7
8
 
8
9
  program_name: str = "pymetadata"
@@ -1,4 +1,5 @@
1
1
  """Caching of information."""
2
+
2
3
  import json
3
4
  from json.encoder import JSONEncoder
4
5
  from pathlib import Path
@@ -1,4 +1,5 @@
1
1
  """Module for working with chebi."""
2
+
2
3
  from pathlib import Path
3
4
  from pprint import pprint
4
5
  from typing import Any, Dict
@@ -1,4 +1,5 @@
1
1
  """Rich console for logging."""
2
+
2
3
  from rich import pretty
3
4
  from rich.console import Console
4
5
  from rich.theme import Theme
@@ -2,6 +2,7 @@
2
2
 
3
3
  Core data structure to store annotations.
4
4
  """
5
+
5
6
  import re
6
7
  import urllib
7
8
  from pprint import pprint
@@ -1,4 +1,5 @@
1
1
  """Creator information."""
2
+
2
3
  from typing import Optional
3
4
 
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Synonym information."""
2
+
2
3
  from dataclasses import dataclass
3
4
 
4
5
 
@@ -1,4 +1,5 @@
1
1
  """Module for crossreferences (xref)."""
2
+
2
3
  import re
3
4
  from dataclasses import dataclass
4
5
  from typing import Dict
@@ -1,4 +1,5 @@
1
1
  """Example for reading and writing omex archives."""
2
+
2
3
  import zipfile
3
4
  from pathlib import Path
4
5
 
@@ -4,6 +4,7 @@ Helper tools to work with identifiers registry.
4
4
  https://identifiers.org/
5
5
  https://docs.identifiers.org/articles/api.html
6
6
  """
7
+
7
8
  from __future__ import annotations
8
9
 
9
10
  import inspect
@@ -186,18 +187,6 @@ def ols_namespaces() -> Dict[str, Namespace]:
186
187
  description="MONDO",
187
188
  namespaceEmbeddedInLui=True,
188
189
  ),
189
- Namespace(
190
- id=None,
191
- prefix="stato",
192
- pattern=r"^STATO:\d+$",
193
- name="STATO",
194
- description="STATO is the statistical methods ontology. It contains "
195
- "concepts and properties related to statistical methods, "
196
- "probability distributions and other concepts related to "
197
- "statistical analysis, including relationships to study "
198
- "designs and plots.",
199
- namespaceEmbeddedInLui=True,
200
- ),
201
190
  Namespace(
202
191
  id=None,
203
192
  prefix="atol",
@@ -348,7 +337,7 @@ class Registry:
348
337
  registry_path: Optional[Path] = None,
349
338
  ) -> Dict[str, Namespace]:
350
339
  """Update registry from identifiers.org webservice."""
351
- logger.warning(f"Update registry: '{Registry.URL}' -> '{registry_path}'")
340
+ logger.info(f"Update registry from '{Registry.URL}'")
352
341
  response = requests.get(Registry.URL)
353
342
  namespaces = response.json()["payload"]["namespaces"]
354
343
 
@@ -373,9 +362,6 @@ class Registry:
373
362
  ns_dict[ns.prefix] = ns
374
363
 
375
364
  if custom_namespaces is not None:
376
- logger.warning(
377
- f"Adding custom namespaces: {sorted(custom_namespaces.keys())}"
378
- )
379
365
  for key, ns in custom_namespaces.items():
380
366
  if key in ns_dict:
381
367
  logger.error(
@@ -2,6 +2,7 @@
2
2
 
3
3
  Using rich for output formating.
4
4
  """
5
+
5
6
  import logging
6
7
 
7
8
  from rich.logging import RichHandler
@@ -481,6 +481,8 @@ _terms = {
481
481
  "KISAO_0000695": "parameters for",
482
482
  "KISAO_0000696": "steady state root-finding problem",
483
483
  "KISAO_0000697": "SDE solver",
484
+ "KISAO_0000698": "particle coordinates",
485
+ "KISAO_0000699": "DAE Solver",
484
486
  "KISAO_0000800": "systems property",
485
487
  "KISAO_0000801": "concentration control coefficient matrix (unscaled)",
486
488
  "KISAO_0000802": "control coefficient (scaled)",
@@ -2455,6 +2457,14 @@ class KISAO(str, Enum):
2455
2457
  KISAO_0000697 = "KISAO_0000697"
2456
2458
  SDE_SOLVER = "KISAO_0000697"
2457
2459
 
2460
+ # particle coordinates
2461
+ KISAO_0000698 = "KISAO_0000698"
2462
+ PARTICLE_COORDINATES = "KISAO_0000698"
2463
+
2464
+ # DAE Solver
2465
+ KISAO_0000699 = "KISAO_0000699"
2466
+ DAE_SOLVER = "KISAO_0000699"
2467
+
2458
2468
  # systems property
2459
2469
  KISAO_0000800 = "KISAO_0000800"
2460
2470
  SYSTEMS_PROPERTY = "KISAO_0000800"
@@ -33,7 +33,7 @@ logger = log.get_logger(__name__)
33
33
  __all__ = ["EntryFormat", "ManifestEntry", "Manifest", "Omex"]
34
34
 
35
35
 
36
- IDENTIFIERS_PREFIX = "http://identifiers.org/combine.specifications:"
36
+ IDENTIFIERS_PREFIX = "http://identifiers.org/combine.specifications/"
37
37
  PURL_PREFIX = "https://purl.org/NET/mediatypes/"
38
38
 
39
39
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  See https://docs.google.com/document/d/1-UDgY5lQ6tv4mZILZzol-PvCoAYW8yr2Ydn1OxcHMjM/edit#
4
4
  """
5
+
5
6
  from typing import List, Optional
6
7
 
7
8
  from pydantic import BaseModel
@@ -4,6 +4,7 @@ This uses the EMBL-EBI Ontology Lookup Service
4
4
  https://www.ebi.ac.uk/ols4
5
5
 
6
6
  """
7
+
7
8
  import urllib.parse
8
9
  from dataclasses import dataclass, field
9
10
  from pathlib import Path
@@ -79,13 +80,13 @@ class OLSQuery:
79
80
  cache: bool = CACHE_USE,
80
81
  ):
81
82
  """Initialize OLSQuery."""
82
- self.ontologies = {
83
+ self.ontologies: Dict[str, OLSOntology] = {
83
84
  ontology.name: ontology for ontology in ontologies
84
- } # type: Dict[str, OLSOntology]
85
+ }
85
86
  self.cache_path = cache_path / "ols"
86
87
  self.cache = cache
87
88
 
88
- if not self.cache_path.exists():
89
+ if cache and not self.cache_path.exists():
89
90
  self.cache_path.mkdir(parents=True)
90
91
 
91
92
  def get_iri(self, ontology: str, term: str) -> str:
@@ -136,11 +137,6 @@ class OLSQuery:
136
137
  # double urlencode iri for OLS
137
138
  urliri = urllib.parse.quote(iri, safe="")
138
139
  urliri = urllib.parse.quote(urliri, safe="")
139
- # urliri = iri.replace(":", "%253A")
140
- # urliri = urliri.replace("/", "%252F")
141
-
142
- # term_id = term.split(":")[-1]
143
- # url = ols_pattern.replace('{$id}', term_id)
144
140
  cache_path = self.cache_path / f"{urliri}.json"
145
141
  data: Dict[str, Any] = {}
146
142
  if self.cache:
@@ -176,7 +172,8 @@ class OLSQuery:
176
172
  else:
177
173
  data["errors"] = []
178
174
  data["warnings"] = []
179
- write_json_cache(data=data, cache_path=cache_path) # type: ignore
175
+ if self.cache:
176
+ write_json_cache(data=data, cache_path=cache_path) # type: ignore
180
177
 
181
178
  return data
182
179
 
@@ -5,6 +5,7 @@ Special ontologies are provided as enums.
5
5
 
6
6
  Uses the OWL links provided on OLS4 to download the ontologies.
7
7
  """
8
+
8
9
  import gzip
9
10
  import importlib
10
11
  import re
@@ -290,7 +291,7 @@ def try_ontology_import(ontology_id: str) -> None:
290
291
 
291
292
  if __name__ == "__main__":
292
293
  # download latest versions
293
- # update_ontology_files()
294
+ update_ontology_files()
294
295
 
295
296
  # test loading of OWL files
296
297
  # ofile: OntologyFile