pyconvexity 0.3.8.post5__py3-none-any.whl → 0.3.8.post6__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 pyconvexity might be problematic. Click here for more details.

pyconvexity/_version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.3.8post5"
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,5 +1,5 @@
1
1
  pyconvexity/__init__.py,sha256=eiAFroO4n-z8F0jTLpJgBIO7vtSxu9ovu3G2N-qqpUo,4783
2
- pyconvexity/_version.py,sha256=hAXE8ndUYHyK3gOK1hBR1ri9H4YX_KTmcufHouTLgTo,27
2
+ pyconvexity/_version.py,sha256=jO5GlIb68CD0eDfWJLp-lwidoi1UzGwf4_unGDQim90,27
3
3
  pyconvexity/timeseries.py,sha256=4p1Tdpa1otqDvCq2zppA4tw660sF_XWb8Xobib-cCms,11340
4
4
  pyconvexity/core/__init__.py,sha256=MgVa5rrRWIi2w1UI1P4leiBntvHeeOPv0Thm0DEXBHo,1209
5
5
  pyconvexity/core/database.py,sha256=M02q4UkJqAPeTXuwng9I7kHm16reJ7eq7wccWxnhE5I,15227
@@ -31,8 +31,8 @@ pyconvexity/models/attributes.py,sha256=LTvYF0hl56HeLjS8ZVocZWLhbLRTNhmZ5gUKxf93
31
31
  pyconvexity/models/carriers.py,sha256=-nmasYvsaUeYPY1B0QdzfF_eph2HUFb5n3KF3CFd-YI,3700
32
32
  pyconvexity/models/components.py,sha256=wWRdX6vErZrQhhLTnHBLDOnkmLjbHY2e9J9ITZJi3F8,18287
33
33
  pyconvexity/models/network.py,sha256=2oEZOeVotyAs-SJl-b73zJKzSBvJEa6n1ryM0wV-Nko,14762
34
- pyconvexity/models/results.py,sha256=9IKgO4bve94OGHgUGUcxvFpySGRW8-K3Wwvv9RXEF2k,4031
35
- pyconvexity/models/scenarios.py,sha256=oF_xSOjrKMmUTzSR4oBAKKqWyudOGewW6DvZBa5IKXw,4125
34
+ pyconvexity/models/results.py,sha256=zEbrFj7ReEBnKJz_Kpf__HfIuHoVsZvLpMoL4RobCYE,4030
35
+ pyconvexity/models/scenarios.py,sha256=6pTfMusCQ6bwPUUFR_Wi1PUk3ZgCwG21uoTy667mZaM,3928
36
36
  pyconvexity/solvers/__init__.py,sha256=zoVf6T2Tmyj2XOeiVbEvaIMOX584orqCz1q9t1oXy0M,674
37
37
  pyconvexity/solvers/pypsa/__init__.py,sha256=KZqYDo7CvwB-5Kp784xxxtdn5kRcmn3gGSRlaQdDA4c,554
38
38
  pyconvexity/solvers/pypsa/api.py,sha256=si2VAvotQKk-hcNtT3bIWV0CE4EzSER94mxehPFm7M8,18015
@@ -43,7 +43,7 @@ pyconvexity/solvers/pypsa/solver.py,sha256=7jaksRKMaQuFYWb7Pl7rw7Pu0kO5DPysQX2Jt
43
43
  pyconvexity/solvers/pypsa/storage.py,sha256=T-0qEryiEy_8G4KiscPoiiWvTPd_OGqpLczW0_Xm85E,87331
44
44
  pyconvexity/validation/__init__.py,sha256=_6SVqXkaDFqmagub_O064Zm_QIdBrOra-Gvvbo9vM4I,549
45
45
  pyconvexity/validation/rules.py,sha256=6Kak12BVfUpjmgB5B7Wre55eGc5e1dvIdFca-vN-IFI,9296
46
- pyconvexity-0.3.8.post5.dist-info/METADATA,sha256=Sls9yFmzwrnujuODybzOPn5Z7s-8DoikRaHfto5sbuM,4886
47
- pyconvexity-0.3.8.post5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
- pyconvexity-0.3.8.post5.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
49
- pyconvexity-0.3.8.post5.dist-info/RECORD,,
46
+ pyconvexity-0.3.8.post6.dist-info/METADATA,sha256=fKPUW65mNFxOCENHZuic30W1bbph8wORCzM56uFoP-U,4886
47
+ pyconvexity-0.3.8.post6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
48
+ pyconvexity-0.3.8.post6.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
49
+ pyconvexity-0.3.8.post6.dist-info/RECORD,,