pyconvexity 0.3.8.post5__tar.gz → 0.3.8.post6__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 pyconvexity might be problematic. Click here for more details.

Files changed (56) hide show
  1. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/PKG-INFO +1 -1
  2. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/pyproject.toml +2 -2
  3. pyconvexity-0.3.8.post6/src/pyconvexity/_version.py +1 -0
  4. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/results.py +1 -1
  5. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/scenarios.py +8 -13
  6. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity.egg-info/PKG-INFO +1 -1
  7. pyconvexity-0.3.8.post5/src/pyconvexity/_version.py +0 -1
  8. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/README.md +0 -0
  9. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/setup.cfg +0 -0
  10. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/__init__.py +0 -0
  11. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/core/__init__.py +0 -0
  12. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/core/database.py +0 -0
  13. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/core/errors.py +0 -0
  14. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/core/types.py +0 -0
  15. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/README.md +0 -0
  16. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/__init__.py +0 -0
  17. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/__pycache__/__init__.cpython-313.pyc +0 -0
  18. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/loaders/__init__.py +0 -0
  19. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/loaders/__pycache__/__init__.cpython-313.pyc +0 -0
  20. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/loaders/__pycache__/cache.cpython-313.pyc +0 -0
  21. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/loaders/cache.py +0 -0
  22. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/schema/01_core_schema.sql +0 -0
  23. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/schema/02_data_metadata.sql +0 -0
  24. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/schema/03_validation_data.sql +0 -0
  25. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/schema/04_scenario_schema.sql +0 -0
  26. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/schema/migrate_add_geometries.sql +0 -0
  27. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/sources/__init__.py +0 -0
  28. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/sources/__pycache__/__init__.cpython-313.pyc +0 -0
  29. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/sources/__pycache__/gem.cpython-313.pyc +0 -0
  30. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/data/sources/gem.py +0 -0
  31. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/io/__init__.py +0 -0
  32. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/io/excel_exporter.py +0 -0
  33. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/io/excel_importer.py +0 -0
  34. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/io/netcdf_exporter.py +0 -0
  35. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/io/netcdf_importer.py +0 -0
  36. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/__init__.py +0 -0
  37. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/attributes.py +0 -0
  38. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/carriers.py +0 -0
  39. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/components.py +0 -0
  40. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/models/network.py +0 -0
  41. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/__init__.py +0 -0
  42. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/__init__.py +0 -0
  43. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/api.py +0 -0
  44. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/batch_loader.py +0 -0
  45. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/builder.py +0 -0
  46. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/constraints.py +0 -0
  47. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/solver.py +0 -0
  48. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/solvers/pypsa/storage.py +0 -0
  49. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/timeseries.py +0 -0
  50. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/validation/__init__.py +0 -0
  51. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity/validation/rules.py +0 -0
  52. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity.egg-info/SOURCES.txt +0 -0
  53. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity.egg-info/dependency_links.txt +0 -0
  54. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity.egg-info/requires.txt +0 -0
  55. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/src/pyconvexity.egg-info/top_level.txt +0 -0
  56. {pyconvexity-0.3.8.post5 → pyconvexity-0.3.8.post6}/tests/test_core_types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyconvexity
3
- Version: 0.3.8.post5
3
+ Version: 0.3.8.post6
4
4
  Summary: Python library for energy system modeling and optimization with PyPSA
5
5
  Author-email: Convexity Team <info@convexity.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyconvexity"
7
- version = "0.3.8post5"
7
+ version = "0.3.8post6"
8
8
  description = "Python library for energy system modeling and optimization with PyPSA"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -81,7 +81,7 @@ profile = "black"
81
81
  line_length = 100
82
82
 
83
83
  [tool.mypy]
84
- python_version = "0.3.8post5"
84
+ python_version = "0.3.8post6"
85
85
  warn_return_any = true
86
86
  warn_unused_configs = true
87
87
  disallow_untyped_defs = true
@@ -0,0 +1 @@
1
+ __version__ = "0.3.8post6"
@@ -59,7 +59,7 @@ def get_solve_results(
59
59
  SELECT results_json, metadata_json, solve_status, objective_value, solve_time_seconds
60
60
  FROM network_solve_results
61
61
  WHERE network_id = ? AND scenario_id = ?
62
- ORDER BY created_at DESC
62
+ ORDER BY solved_at DESC
63
63
  LIMIT 1
64
64
  """, (network_id, scenario_id))
65
65
 
@@ -23,7 +23,6 @@ class Scenario:
23
23
  description: Optional[str]
24
24
  is_master: bool
25
25
  created_at: str
26
- updated_at: Optional[str] = None
27
26
 
28
27
 
29
28
  def list_scenarios(conn: sqlite3.Connection, network_id: int) -> List[Scenario]:
@@ -38,7 +37,7 @@ def list_scenarios(conn: sqlite3.Connection, network_id: int) -> List[Scenario]:
38
37
  List of Scenario objects ordered by master first, then by creation date
39
38
  """
40
39
  cursor = conn.execute("""
41
- SELECT id, network_id, name, description, is_master, created_at, updated_at
40
+ SELECT id, network_id, name, description, is_master, created_at
42
41
  FROM scenarios
43
42
  WHERE network_id = ?
44
43
  ORDER BY is_master DESC, created_at
@@ -52,8 +51,7 @@ def list_scenarios(conn: sqlite3.Connection, network_id: int) -> List[Scenario]:
52
51
  name=row[2],
53
52
  description=row[3],
54
53
  is_master=bool(row[4]),
55
- created_at=row[5],
56
- updated_at=row[6]
54
+ created_at=row[5]
57
55
  ))
58
56
 
59
57
  return scenarios
@@ -75,7 +73,7 @@ def get_scenario_by_name(conn: sqlite3.Connection, network_id: int, name: str) -
75
73
  ValidationError: If scenario doesn't exist
76
74
  """
77
75
  cursor = conn.execute("""
78
- SELECT id, network_id, name, description, is_master, created_at, updated_at
76
+ SELECT id, network_id, name, description, is_master, created_at
79
77
  FROM scenarios
80
78
  WHERE network_id = ? AND name = ?
81
79
  """, (network_id, name))
@@ -90,8 +88,7 @@ def get_scenario_by_name(conn: sqlite3.Connection, network_id: int, name: str) -
90
88
  name=row[2],
91
89
  description=row[3],
92
90
  is_master=bool(row[4]),
93
- created_at=row[5],
94
- updated_at=row[6]
91
+ created_at=row[5]
95
92
  )
96
93
 
97
94
 
@@ -110,7 +107,7 @@ def get_scenario_by_id(conn: sqlite3.Connection, scenario_id: int) -> Scenario:
110
107
  ValidationError: If scenario doesn't exist
111
108
  """
112
109
  cursor = conn.execute("""
113
- SELECT id, network_id, name, description, is_master, created_at, updated_at
110
+ SELECT id, network_id, name, description, is_master, created_at
114
111
  FROM scenarios
115
112
  WHERE id = ?
116
113
  """, (scenario_id,))
@@ -125,8 +122,7 @@ def get_scenario_by_id(conn: sqlite3.Connection, scenario_id: int) -> Scenario:
125
122
  name=row[2],
126
123
  description=row[3],
127
124
  is_master=bool(row[4]),
128
- created_at=row[5],
129
- updated_at=row[6]
125
+ created_at=row[5]
130
126
  )
131
127
 
132
128
 
@@ -145,7 +141,7 @@ def get_master_scenario(conn: sqlite3.Connection, network_id: int) -> Scenario:
145
141
  ValidationError: If master scenario doesn't exist
146
142
  """
147
143
  cursor = conn.execute("""
148
- SELECT id, network_id, name, description, is_master, created_at, updated_at
144
+ SELECT id, network_id, name, description, is_master, created_at
149
145
  FROM scenarios
150
146
  WHERE network_id = ? AND is_master = TRUE
151
147
  """, (network_id,))
@@ -160,6 +156,5 @@ def get_master_scenario(conn: sqlite3.Connection, network_id: int) -> Scenario:
160
156
  name=row[2],
161
157
  description=row[3],
162
158
  is_master=bool(row[4]),
163
- created_at=row[5],
164
- updated_at=row[6]
159
+ created_at=row[5]
165
160
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyconvexity
3
- Version: 0.3.8.post5
3
+ Version: 0.3.8.post6
4
4
  Summary: Python library for energy system modeling and optimization with PyPSA
5
5
  Author-email: Convexity Team <info@convexity.com>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- __version__ = "0.3.8post5"