metahq-core 0.1.2__tar.gz → 1.0.0rc1__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.
- metahq_core-1.0.0rc1/LICENSE +28 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/PKG-INFO +13 -6
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/README.md +2 -1
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/pyproject.toml +10 -5
- metahq_core-1.0.0rc1/src/metahq_core/__init__.py +1 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/curations/annotation_converter.py +5 -5
- metahq_core-1.0.0rc1/src/metahq_core/curations/annotations.py +656 -0
- metahq_core-1.0.0rc1/src/metahq_core/curations/index.py +152 -0
- metahq_core-1.0.0rc1/src/metahq_core/curations/labels.py +446 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/curations/propagator.py +62 -85
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/export/annotations.py +125 -59
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/export/labels.py +128 -70
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/logger.py +11 -18
- metahq_core-1.0.0rc1/src/metahq_core/query.py +654 -0
- metahq_core-0.1.2/src/metahq_core/ontology/loader.py → metahq_core-1.0.0rc1/src/metahq_core/relations_loader.py +2 -1
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/search.py +37 -14
- metahq_core-1.0.0rc1/src/metahq_core/util/__init__.py +0 -0
- metahq_core-1.0.0rc1/src/metahq_core/util/io.py +190 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/util/supported.py +16 -5
- metahq_core-0.1.2/src/metahq_core/__init__.py +0 -1
- metahq_core-0.1.2/src/metahq_core/curations/annotations.py +0 -446
- metahq_core-0.1.2/src/metahq_core/curations/index.py +0 -91
- metahq_core-0.1.2/src/metahq_core/curations/labels.py +0 -315
- metahq_core-0.1.2/src/metahq_core/ontology/base.py +0 -376
- metahq_core-0.1.2/src/metahq_core/ontology/graph.py +0 -252
- metahq_core-0.1.2/src/metahq_core/query.py +0 -549
- metahq_core-0.1.2/src/metahq_core/util/io.py +0 -127
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/.gitignore +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/README.md +0 -0
- {metahq_core-0.1.2/src/metahq_core/ontology → metahq_core-1.0.0rc1/src/metahq_core/curations}/__init__.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/curations/_multiprocess_propagator.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/curations/base.py +0 -0
- {metahq_core-0.1.2/src/metahq_core/util → metahq_core-1.0.0rc1/src/metahq_core/export}/__init__.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/export/base.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/util/alltypes.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/util/checkers.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/util/exceptions.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/util/helpers.py +0 -0
- {metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/util/progress.py +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Krishnan Lab
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
9
|
+
list of conditions and the following disclaimer.
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
12
|
+
this list of conditions and the following disclaimer in the documentation
|
|
13
|
+
and/or other materials provided with the distribution.
|
|
14
|
+
|
|
15
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: metahq-core
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.0rc1
|
|
4
4
|
Summary: Core API for the meta-hq CLI.
|
|
5
5
|
Author-email: Parker Hicks <parker.hicks@cuanschutz.edu>, Faisal Alquaddoomi <faisal.alquaddoomi@cuanschutz.edu>
|
|
6
|
-
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: Data Curation,Database,Public Biomedical Data
|
|
7
8
|
Classifier: Development Status :: 3 - Alpha
|
|
8
9
|
Classifier: Intended Audience :: Science/Research
|
|
9
10
|
Classifier: Operating System :: OS Independent
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
-
Requires-Python: >=3.
|
|
13
|
+
Requires-Python: >=3.12
|
|
15
14
|
Requires-Dist: duckdb>=1.4.0
|
|
16
15
|
Requires-Dist: networkx>=3.0
|
|
17
16
|
Requires-Dist: numpy>=2.3.0
|
|
@@ -21,13 +20,20 @@ Requires-Dist: pydantic>=2.0.0
|
|
|
21
20
|
Requires-Dist: pymongo>=4.13.0
|
|
22
21
|
Requires-Dist: pyyaml>=5.1
|
|
23
22
|
Requires-Dist: rank-bm25>=0.2.2
|
|
23
|
+
Requires-Dist: rich>=13.0.0
|
|
24
24
|
Provides-Extra: dev
|
|
25
25
|
Requires-Dist: black; extra == 'dev'
|
|
26
26
|
Requires-Dist: flake8; extra == 'dev'
|
|
27
27
|
Requires-Dist: isort; extra == 'dev'
|
|
28
|
+
Requires-Dist: mkdocs-click; extra == 'dev'
|
|
29
|
+
Requires-Dist: mkdocs-material; extra == 'dev'
|
|
30
|
+
Requires-Dist: mkdocs>=1.6.1; extra == 'dev'
|
|
31
|
+
Requires-Dist: mkdocstrings[python]; extra == 'dev'
|
|
28
32
|
Requires-Dist: mypy; extra == 'dev'
|
|
33
|
+
Requires-Dist: pymdown-extensions; extra == 'dev'
|
|
29
34
|
Requires-Dist: pytest-cov; extra == 'dev'
|
|
30
35
|
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: vulture; extra == 'dev'
|
|
31
37
|
Provides-Extra: test
|
|
32
38
|
Requires-Dist: pytest-benchmark; extra == 'test'
|
|
33
39
|
Requires-Dist: pytest-cov; extra == 'test'
|
|
@@ -37,9 +43,10 @@ Description-Content-Type: text/markdown
|
|
|
37
43
|
# metahq-core
|
|
38
44
|
|
|
39
45
|

|
|
40
|
-

|
|
41
47
|

|
|
42
48
|

|
|
49
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
43
50
|
|
|
44
51
|
Backend package for `metahq-cli` also available on PyPI. Currently this package
|
|
45
52
|
is solely intended to be used through the MetaHQ CLI.
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# metahq-core
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|

|
|
6
6
|

|
|
7
|
+
[](https://opensource.org/licenses/BSD-3-Clause)
|
|
7
8
|
|
|
8
9
|
Backend package for `metahq-cli` also available on PyPI. Currently this package
|
|
9
10
|
is solely intended to be used through the MetaHQ CLI.
|
|
@@ -3,18 +3,16 @@ name = "metahq-core"
|
|
|
3
3
|
dynamic = ["version"]
|
|
4
4
|
description = "Core API for the meta-hq CLI."
|
|
5
5
|
readme = "README.md"
|
|
6
|
-
requires-python = ">=3.
|
|
6
|
+
requires-python = ">=3.12"
|
|
7
7
|
authors = [
|
|
8
8
|
{name = "Parker Hicks", email = "parker.hicks@cuanschutz.edu"},
|
|
9
9
|
{name = "Faisal Alquaddoomi", email = "faisal.alquaddoomi@cuanschutz.edu"},
|
|
10
10
|
]
|
|
11
|
-
keywords = ["
|
|
11
|
+
keywords = ["Database", "Data Curation", "Public Biomedical Data"]
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Development Status :: 3 - Alpha",
|
|
14
14
|
"Intended Audience :: Science/Research",
|
|
15
15
|
"Operating System :: OS Independent",
|
|
16
|
-
"Programming Language :: Python :: 3",
|
|
17
|
-
"Programming Language :: Python :: 3.11",
|
|
18
16
|
"Programming Language :: Python :: 3.12",
|
|
19
17
|
"Programming Language :: Python :: 3.13",
|
|
20
18
|
]
|
|
@@ -29,6 +27,7 @@ dependencies = [
|
|
|
29
27
|
"pyyaml>=5.1",
|
|
30
28
|
"duckdb>=1.4.0",
|
|
31
29
|
"rank-bm25>=0.2.2",
|
|
30
|
+
"rich>=13.0.0",
|
|
32
31
|
]
|
|
33
32
|
|
|
34
33
|
[project.optional-dependencies]
|
|
@@ -39,6 +38,12 @@ dev = [
|
|
|
39
38
|
"isort",
|
|
40
39
|
"flake8",
|
|
41
40
|
"mypy",
|
|
41
|
+
"mkdocs>=1.6.1",
|
|
42
|
+
"pymdown-extensions",
|
|
43
|
+
"mkdocstrings[python]",
|
|
44
|
+
"mkdocs-material",
|
|
45
|
+
"mkdocs-click",
|
|
46
|
+
"vulture",
|
|
42
47
|
]
|
|
43
48
|
|
|
44
49
|
test = [
|
|
@@ -71,7 +76,7 @@ profile = "black"
|
|
|
71
76
|
multi_line_output = 3
|
|
72
77
|
|
|
73
78
|
[tool.mypy]
|
|
74
|
-
python_version = "3.
|
|
79
|
+
python_version = "3.12"
|
|
75
80
|
warn_return_any = true
|
|
76
81
|
warn_unused_configs = true
|
|
77
82
|
disallow_untyped_defs = true
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.0-rc.1"
|
{metahq_core-0.1.2 → metahq_core-1.0.0rc1}/src/metahq_core/curations/annotation_converter.py
RENAMED
|
@@ -17,10 +17,10 @@ import polars as pl
|
|
|
17
17
|
from metahq_core.curations.labels import Labels
|
|
18
18
|
from metahq_core.curations.propagator import Propagator, propagate_controls
|
|
19
19
|
from metahq_core.logger import setup_logger
|
|
20
|
-
from metahq_core.
|
|
20
|
+
from metahq_core.relations_loader import RelationsLoader
|
|
21
21
|
from metahq_core.util.helpers import merge_list_values
|
|
22
22
|
from metahq_core.util.progress import progress_wrapper
|
|
23
|
-
from metahq_core.util.supported import get_ontology_families
|
|
23
|
+
from metahq_core.util.supported import get_default_log_dir, get_ontology_families
|
|
24
24
|
|
|
25
25
|
if TYPE_CHECKING:
|
|
26
26
|
import logging
|
|
@@ -69,7 +69,7 @@ class AnnotationsConverter:
|
|
|
69
69
|
control_col="MONDO:0000000",
|
|
70
70
|
logger=None,
|
|
71
71
|
loglevel=20,
|
|
72
|
-
logdir=
|
|
72
|
+
logdir=get_default_log_dir(),
|
|
73
73
|
verbose=False,
|
|
74
74
|
):
|
|
75
75
|
self.anno: Annotations = anno
|
|
@@ -276,8 +276,8 @@ class AnnotationsConverter:
|
|
|
276
276
|
relatives=["ancestors", "descendants"],
|
|
277
277
|
verbose=self.verbose,
|
|
278
278
|
)
|
|
279
|
-
up_mat, cols, up_ids = propagator.propagate_up(
|
|
280
|
-
down_mat, _, _ = propagator.propagate_down(
|
|
279
|
+
up_mat, cols, up_ids = propagator.propagate_up()
|
|
280
|
+
down_mat, _, _ = propagator.propagate_down()
|
|
281
281
|
|
|
282
282
|
neg_mask = (up_mat == 0) & (down_mat == 0)
|
|
283
283
|
up_mat[neg_mask] = -1
|