biocypher 0.10.1__py3-none-any.whl → 0.11.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/_metadata.py CHANGED
@@ -10,7 +10,7 @@ import pathlib
10
10
 
11
11
  import toml
12
12
 
13
- _VERSION = "0.10.1"
13
+ _VERSION = "0.11.0"
14
14
 
15
15
 
16
16
  def get_metadata():
@@ -31,13 +31,26 @@ def get_metadata():
31
31
  if os.path.exists(toml_path):
32
32
  pyproject = toml.load(toml_path)
33
33
 
34
- meta = {
35
- "name": pyproject["tool"]["poetry"]["name"],
36
- "version": pyproject["tool"]["poetry"]["version"],
37
- "author": pyproject["tool"]["poetry"]["authors"],
38
- "license": pyproject["tool"]["poetry"]["license"],
39
- "full_metadata": pyproject,
40
- }
34
+ # Use modern PEP 621 format (uv/hatchling)
35
+ if "project" in pyproject:
36
+ project = pyproject["project"]
37
+ meta = {
38
+ "name": project.get("name"),
39
+ "version": project.get("version"),
40
+ "author": project.get("authors", []),
41
+ "license": project.get("license", {}).get("text"),
42
+ "full_metadata": pyproject,
43
+ }
44
+ elif "tool" in pyproject and "poetry" in pyproject["tool"]:
45
+ # Legacy Poetry format fallback (for backward compatibility)
46
+ poetry = pyproject["tool"]["poetry"]
47
+ meta = {
48
+ "name": poetry.get("name"),
49
+ "version": poetry.get("version"),
50
+ "author": poetry.get("authors", []),
51
+ "license": poetry.get("license"),
52
+ "full_metadata": pyproject,
53
+ }
41
54
 
42
55
  break
43
56