prisma-api 0.3.2__tar.gz → 0.3.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prisma_api
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A package for interacting with PrISMa Platform APIs. PrISMa is a holistic system for numerical synthesis and assessment of Metal-Organic Frameworks and their applications, for Direct Air Capture of CO2. For more information, see: https://prisma.hw.ac.uk.
5
5
  Author-email: RCCS-CaptureTeam <team@prisma-platform.org>
6
6
  License: GNUv3
@@ -1,4 +1,4 @@
1
- __version__ = "0.3.2"
1
+ __version__ = "0.3.3"
2
2
 
3
3
 
4
4
  from prisma_api.prisma_api import prisma_api as init # Main prisma_api class for initialisation
@@ -132,6 +132,14 @@ class PrismaAPIv2:
132
132
  """
133
133
  return self._get(f"/flowsheets/{name}/")
134
134
 
135
+ def get_flowsheet_bundle(self) -> dict:
136
+ """
137
+ GET /api/v2/flowsheets/dac_min/bundle/
138
+
139
+ Returns the bundled flowsheet payload for the dac_min object.
140
+ """
141
+ return self._get("/flowsheets/dac_min/bundle/")
142
+
135
143
  # ── Catalog ───────────────────────────────────────────────────────────────
136
144
 
137
145
  def list_materials(self, name: str | None = None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prisma_api
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: A package for interacting with PrISMa Platform APIs. PrISMa is a holistic system for numerical synthesis and assessment of Metal-Organic Frameworks and their applications, for Direct Air Capture of CO2. For more information, see: https://prisma.hw.ac.uk.
5
5
  Author-email: RCCS-CaptureTeam <team@prisma-platform.org>
6
6
  License: GNUv3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "prisma_api"
7
- version = "0.3.2"
7
+ version = "0.3.3"
8
8
  description = "A package for interacting with PrISMa Platform APIs. PrISMa is a holistic system for numerical synthesis and assessment of Metal-Organic Frameworks and their applications, for Direct Air Capture of CO2. For more information, see: https://prisma.hw.ac.uk."
9
9
  authors = [
10
10
  {name = "RCCS-CaptureTeam", email = "team@prisma-platform.org"}
@@ -1440,3 +1440,20 @@ def test_get_flowsheet_uses_dev_mode_base_url(dev_api):
1440
1440
  json={"template_id": "dac_min"}, status=200)
1441
1441
  result = dev_api.get_flowsheet(name="dac_min")
1442
1442
  assert result["template_id"] == "dac_min"
1443
+
1444
+
1445
+ @resp_lib.activate
1446
+ def test_get_flowsheet_bundle_returns_dict(api):
1447
+ expected = {"template_id": "dac_min", "bundle": {"nodes": [], "edges": []}}
1448
+ resp_lib.add(resp_lib.GET, f"{PROD_BASE}/flowsheets/dac_min/bundle/",
1449
+ json=expected, status=200)
1450
+ result = api.get_flowsheet_bundle()
1451
+ assert result == expected
1452
+
1453
+
1454
+ @resp_lib.activate
1455
+ def test_get_flowsheet_bundle_uses_dev_mode_base_url(dev_api):
1456
+ resp_lib.add(resp_lib.GET, f"{dev_api._base_url()}/flowsheets/dac_min/bundle/",
1457
+ json={"template_id": "dac_min"}, status=200)
1458
+ result = dev_api.get_flowsheet_bundle()
1459
+ assert result["template_id"] == "dac_min"
File without changes
File without changes
File without changes