biocypher 0.6.2__tar.gz → 0.8.0__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 biocypher might be problematic. Click here for more details.

Files changed (44) hide show
  1. {biocypher-0.6.2 → biocypher-0.8.0}/LICENSE +1 -1
  2. {biocypher-0.6.2 → biocypher-0.8.0}/PKG-INFO +3 -3
  3. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/__init__.py +3 -13
  4. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_config/__init__.py +6 -23
  5. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_config/biocypher_config.yaml +14 -3
  6. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_core.py +360 -262
  7. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_create.py +13 -27
  8. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_deduplicate.py +4 -11
  9. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_get.py +21 -60
  10. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_logger.py +4 -16
  11. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_mapping.py +4 -17
  12. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_metadata.py +3 -15
  13. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_misc.py +14 -28
  14. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_ontology.py +127 -212
  15. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_translate.py +34 -58
  16. biocypher-0.8.0/biocypher/output/connect/_get_connector.py +40 -0
  17. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/connect/_neo4j_driver.py +9 -65
  18. biocypher-0.8.0/biocypher/output/in_memory/_get_in_memory_kg.py +34 -0
  19. biocypher-0.8.0/biocypher/output/in_memory/_in_memory_kg.py +40 -0
  20. biocypher-0.8.0/biocypher/output/in_memory/_networkx.py +44 -0
  21. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/in_memory/_pandas.py +20 -15
  22. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/_batch_writer.py +166 -179
  23. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/_get_writer.py +11 -24
  24. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/_writer.py +43 -44
  25. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/graph/_arangodb.py +7 -24
  26. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/graph/_neo4j.py +51 -56
  27. biocypher-0.8.0/biocypher/output/write/graph/_networkx.py +69 -0
  28. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/graph/_rdf.py +107 -95
  29. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/relational/_csv.py +6 -11
  30. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/relational/_postgresql.py +5 -13
  31. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/relational/_sqlite.py +3 -1
  32. {biocypher-0.6.2 → biocypher-0.8.0}/pyproject.toml +35 -50
  33. biocypher-0.6.2/biocypher/output/write/graph/_networkx.py +0 -76
  34. {biocypher-0.6.2 → biocypher-0.8.0}/README.md +0 -0
  35. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_config/test_config.yaml +0 -0
  36. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_config/test_schema_config.yaml +0 -0
  37. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_config/test_schema_config_disconnected.yaml +0 -0
  38. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/_config/test_schema_config_extended.yaml +0 -0
  39. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/__init__.py +0 -0
  40. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/connect/__init__.py +0 -0
  41. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/in_memory/__init__.py +0 -0
  42. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/__init__.py +0 -0
  43. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/graph/__init__.py +0 -0
  44. {biocypher-0.6.2 → biocypher-0.8.0}/biocypher/output/write/relational/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Saez Lab
3
+ Copyright (c) 2022-2025 BioCypher developers
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: biocypher
3
- Version: 0.6.2
3
+ Version: 0.8.0
4
4
  Summary: A unifying framework for biomedical research knowledge graphs
5
5
  Home-page: https://github.com/biocypher/biocypher
6
6
  License: MIT
7
7
  Author: Sebastian Lobentanzer
8
8
  Author-email: sebastian.lobentanzer@gmail.com
9
- Requires-Python: >=3.9,<4.0
9
+ Requires-Python: >=3.10,<4.0
10
10
  Classifier: Development Status :: 3 - Alpha
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: Science/Research
@@ -15,9 +15,9 @@ Classifier: Natural Language :: English
15
15
  Classifier: Operating System :: OS Independent
16
16
  Classifier: Programming Language :: Python
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.9
19
18
  Classifier: Programming Language :: Python :: 3.10
20
19
  Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
21
  Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
22
22
  Requires-Dist: PyYAML (>=5.0)
23
23
  Requires-Dist: appdirs
@@ -1,13 +1,3 @@
1
- #!/usr/bin/env python
2
-
3
- #
4
- # Copyright 2021, Heidelberg University Clinic
5
- #
6
- # File author(s): Sebastian Lobentanzer
7
- # ...
8
- #
9
- # Distributed under MIT licence, see the file `LICENSE`.
10
- #
11
1
  """
12
2
  BioCypher: a unifying framework for biomedical knowledge graphs.
13
3
  """
@@ -25,10 +15,10 @@ __all__ = [
25
15
  "APIRequest",
26
16
  ]
27
17
 
28
- from ._get import APIRequest, FileDownload
29
- from ._core import BioCypher
30
18
  from ._config import config, module_data
31
- from ._logger import log, logger, logfile
19
+ from ._core import BioCypher
20
+ from ._get import APIRequest, FileDownload
21
+ from ._logger import log, logfile, logger
32
22
  from ._metadata import __author__, __version__
33
23
 
34
24
 
@@ -1,13 +1,3 @@
1
- #!/usr/bin/env python
2
-
3
- #
4
- # Copyright 2021, Heidelberg University Clinic
5
- #
6
- # File author(s): Sebastian Lobentanzer
7
- # ...
8
- #
9
- # Distributed under MIT licence, see the file `LICENSE`.
10
- #
11
1
  """
12
2
  Module data directory, including:
13
3
 
@@ -15,12 +5,13 @@ Module data directory, including:
15
5
  * The default config files
16
6
  """
17
7
 
18
- from typing import Any, Optional
19
8
  import os
20
9
  import warnings
21
10
 
22
- import yaml
11
+ from typing import Any, Optional
12
+
23
13
  import appdirs
14
+ import yaml
24
15
 
25
16
  __all__ = ["module_data", "module_data_path", "read_config", "config", "reset"]
26
17
 
@@ -88,21 +79,13 @@ def read_config() -> dict:
88
79
  defaults = module_data("biocypher_config")
89
80
  user = _read_yaml(_USER_CONFIG_FILE) or {}
90
81
  # TODO account for .yml?
91
- local = (
92
- _read_yaml("biocypher_config.yaml")
93
- or _read_yaml("config/biocypher_config.yaml")
94
- or {}
95
- )
82
+ local = _read_yaml("biocypher_config.yaml") or _read_yaml("config/biocypher_config.yaml") or {}
96
83
 
97
84
  for key in defaults:
98
- value = (
99
- local[key] if key in local else user[key] if key in user else None
100
- )
85
+ value = local[key] if key in local else user[key] if key in user else None
101
86
 
102
87
  if value is not None:
103
- if isinstance(
104
- defaults[key], str
105
- ): # first level config (like title)
88
+ if isinstance(defaults[key], str): # first level config (like title)
106
89
  defaults[key] = value
107
90
  else:
108
91
  defaults[key].update(value)
@@ -30,12 +30,13 @@ biocypher:
30
30
  # switch_label_and_id: true
31
31
 
32
32
  ### Optional parameters ###
33
-
34
33
  ## Logging
35
34
  # Write log to disk
35
+
36
36
  log_to_disk: true
37
37
 
38
38
  # Activate more granular logging
39
+
39
40
  debug: true
40
41
 
41
42
  # Change the log directory
@@ -85,6 +86,14 @@ neo4j:
85
86
  array_delimiter: "|"
86
87
  quote_character: "'"
87
88
 
89
+ # How to write the labels in the export files.
90
+
91
+ labels_order: "Ascending" # Default: From more specific to more generic.
92
+ # Or:
93
+ # labels_order: "Descending" # From more generic to more specific.
94
+ # labels_order: "Alphabetical" # Alphabetically. Legacy option.
95
+ # labels_order: "Leaves" # Only the more specific label.
96
+
88
97
  ## MultiDB functionality
89
98
  ## Set to false for using community edition or older versions of Neo4j
90
99
 
@@ -102,8 +111,8 @@ neo4j:
102
111
 
103
112
  postgresql:
104
113
  ### PostgreSQL configuration ###
105
-
106
114
  # PostgreSQL connection credentials
115
+
107
116
  database_name: postgres # DB name
108
117
  user: postgres # user name
109
118
  password: postgres # password
@@ -111,6 +120,7 @@ postgresql:
111
120
  port: 5432 # port
112
121
 
113
122
  # PostgreSQL import batch writer settings
123
+
114
124
  quote_character: '"'
115
125
  delimiter: '\t'
116
126
  # import_call_bin_prefix: '' # path to "psql"
@@ -122,11 +132,12 @@ rdf:
122
132
 
123
133
  sqlite:
124
134
  ### SQLite configuration ###
125
-
126
135
  # SQLite connection credentials
136
+
127
137
  database_name: sqlite.db # DB name
128
138
 
129
139
  # SQLite import batch writer settings
140
+
130
141
  quote_character: '"'
131
142
  delimiter: '\t'
132
143
  # import_call_bin_prefix: '' # path to "sqlite3"