biocypher 0.6.1__py3-none-any.whl → 0.7.0__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 biocypher might be problematic. Click here for more details.

biocypher/__init__.py CHANGED
@@ -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)