pyconvexity 0.4.3__py3-none-any.whl → 0.4.6__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.4.3"
1
+ __version__ = "0.4.6"
@@ -33,7 +33,8 @@ INSERT INTO attribute_validation_rules (component_type, attribute_name, display_
33
33
  ('BUS', 'q', 'Reactive Power', 'float', 'MVar', '0', 'timeseries', FALSE, FALSE, 'reactive power (positive if net generation at bus)', NULL, NULL, 'electrical', TRUE),
34
34
  ('BUS', 'v_mag_pu', 'Voltage Magnitude', 'float', 'per unit', '1', 'timeseries', FALSE, FALSE, 'Voltage magnitude, per unit of v_nom', NULL, NULL, 'electrical', TRUE),
35
35
  ('BUS', 'v_ang', 'Voltage Angle', 'float', 'radians', '0', 'timeseries', FALSE, FALSE, 'Voltage angle', NULL, NULL, 'electrical', TRUE),
36
- ('BUS', 'marginal_price', 'Marginal Price', 'float', 'currency/MWh', '0', 'timeseries', FALSE, FALSE, 'Locational marginal price from LOPF from power balance constraint', NULL, NULL, 'costs', TRUE);
36
+ ('BUS', 'marginal_price', 'Marginal Price', 'float', 'currency/MWh', '0', 'timeseries', FALSE, FALSE, 'Locational marginal price from LOPF from power balance constraint', NULL, NULL, 'costs', TRUE),
37
+ ('BUS', 'market_price', 'Market Price', 'float', 'currency/MWh', '0', 'timeseries', FALSE, FALSE, 'Custom calculated market price for the bus (independent of PyPSA marginal cost)', NULL, NULL, 'costs', TRUE);
37
38
 
38
39
  -- ============================================================================
39
40
  -- GENERATOR ATTRIBUTES
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyconvexity
3
+ Version: 0.4.6
4
+ Summary: Python library for energy system modeling and optimization with PyPSA
5
+ Author-email: Convexity Team <info@convexity.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/bayesian-energy/pyconvexity
8
+ Project-URL: Repository, https://github.com/bayesian-energy/pyconvexity
9
+ Project-URL: Issues, https://github.com/bayesian-energy/pyconvexity/issues
10
+ Project-URL: Documentation, https://pyconvexity.readthedocs.io
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: pandas>=1.5.0
23
+ Requires-Dist: numpy>=1.21.0
24
+ Requires-Dist: pyarrow>=10.0.0
25
+ Provides-Extra: pypsa
26
+ Requires-Dist: pypsa>=0.25.0; extra == "pypsa"
27
+ Requires-Dist: networkx; extra == "pypsa"
28
+ Requires-Dist: scipy; extra == "pypsa"
29
+ Requires-Dist: xarray; extra == "pypsa"
30
+ Provides-Extra: excel
31
+ Requires-Dist: openpyxl>=3.0.0; extra == "excel"
32
+ Requires-Dist: xlsxwriter>=3.0.0; extra == "excel"
33
+ Provides-Extra: netcdf
34
+ Requires-Dist: netcdf4>=1.6.0; extra == "netcdf"
35
+ Requires-Dist: xarray>=2022.3.0; extra == "netcdf"
36
+ Provides-Extra: data
37
+ Requires-Dist: country-converter>=1.0.0; extra == "data"
38
+ Requires-Dist: pyyaml>=6.0.0; extra == "data"
39
+ Provides-Extra: dev
40
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
41
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
42
+ Requires-Dist: black>=22.0.0; extra == "dev"
43
+ Requires-Dist: isort>=5.10.0; extra == "dev"
44
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
45
+ Requires-Dist: pre-commit>=2.20.0; extra == "dev"
46
+ Provides-Extra: all
47
+ Requires-Dist: pyconvexity[data,excel,netcdf,pypsa]; extra == "all"
48
+
49
+ # pyconvexity
50
+
51
+ Python library for energy system modeling and optimization with PyPSA.
52
+
53
+ [![PyPI version](https://badge.fury.io/py/pyconvexity.svg)](https://badge.fury.io/py/pyconvexity)
54
+ [![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)
55
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
56
+
57
+ ## Overview
58
+
59
+ pyconvexity is the Python library that powers [Convexity](https://bayesian.energy/convexity), providing programmatic access to energy system modeling and optimization. It stores models in SQLite databases and integrates with PyPSA for solving.
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ pip install pyconvexity
65
+ ```
66
+
67
+ With optional dependencies:
68
+
69
+ ```bash
70
+ pip install pyconvexity[pypsa] # PyPSA solver integration
71
+ pip install pyconvexity[excel] # Excel import/export
72
+ pip install pyconvexity[all] # All optional dependencies
73
+ ```
74
+
75
+ ## Quick Start
76
+
77
+ ```python
78
+ import pyconvexity as px
79
+
80
+ # Create a new model database
81
+ px.create_database_with_schema("my_model.db")
82
+
83
+ # Create a network
84
+ with px.database_context("my_model.db") as conn:
85
+ network_req = px.CreateNetworkRequest(
86
+ name="My Network",
87
+ start_time="2024-01-01 00:00:00",
88
+ end_time="2024-01-01 23:00:00",
89
+ time_resolution="PT1H",
90
+ )
91
+ px.create_network(conn, network_req)
92
+
93
+ # Create components
94
+ carrier_id = px.create_carrier(conn, name="AC")
95
+ bus_id = px.create_component(conn, "BUS", "Main Bus", carrier_id=carrier_id)
96
+
97
+ conn.commit()
98
+
99
+ # Solve the network
100
+ result = px.solve_network("my_model.db", solver_name="highs")
101
+ print(f"Success: {result['success']}, Objective: {result['objective_value']}")
102
+ ```
103
+
104
+ ## Documentation
105
+
106
+ Full documentation is available at: **[docs.bayesian.energy](https://docs.bayesian.energy/convexity/user-guide/advanced-features/pyconvexity/)**
107
+
108
+ - [API Reference](https://docs.bayesian.energy/convexity/user-guide/advanced-features/pyconvexity/api/api-reference)
109
+ - [Examples & Tutorials](https://docs.bayesian.energy/convexity/user-guide/advanced-features/pyconvexity/examples/example-1/)
110
+
111
+ ## Development
112
+
113
+ ### Setup
114
+
115
+ ```bash
116
+ git clone https://github.com/bayesian-energy/pyconvexity.git
117
+ cd pyconvexity
118
+ pip install -e ".[dev,all]"
119
+ ```
120
+
121
+ ### Running Tests
122
+
123
+ ```bash
124
+ pytest
125
+ ```
126
+
127
+ ### Documentation Deployment
128
+
129
+ API documentation is auto-generated and synced to [bayesian-docs](https://github.com/bayesian-energy/bayesian-docs).
130
+
131
+ **Generate API docs locally:**
132
+
133
+ ```bash
134
+ python scripts/generate_api_docs.py --output-dir api-docs
135
+ ```
136
+
137
+ **How it works:**
138
+ 1. On push to `main` or release, the `sync-docs.yml` workflow runs
139
+ 2. It generates API markdown from Python docstrings
140
+ 3. Commits the generated docs to the `bayesian-docs` repository
141
+
142
+ **Setup for maintainers:**
143
+ - Add `DOCS_DEPLOY_TOKEN` secret to the repo (personal access token with `repo` scope for bayesian-docs)
144
+
145
+ ## License
146
+
147
+ MIT License - see [LICENSE](LICENSE) for details.
148
+
@@ -1,5 +1,5 @@
1
1
  pyconvexity/__init__.py,sha256=TJvgkEaMHFFWhIGaOdjMgc4rHVIxHKni3Ggg1YAQziE,5347
2
- pyconvexity/_version.py,sha256=Nyg0pmk5ea9-SLCAFEIF96ByFx4-TJFtrqYPN-Zn6g4,22
2
+ pyconvexity/_version.py,sha256=bbBpXE_PBbo_SaI807mDML0QJywD0_ufCDPgAMlDHaE,22
3
3
  pyconvexity/timeseries.py,sha256=QdKbiqjAlxkJATyKm2Kelx1Ea2PsAnnCYfVLU5VER1Y,11085
4
4
  pyconvexity/core/__init__.py,sha256=gdyyHNqOc4h9Nfe9u6NA936GNzH6coGNCMgBvvvOnGE,1196
5
5
  pyconvexity/core/database.py,sha256=vwCmuN0B0xwImh6L0bFR4vNWHw_wVfYSG1KwsUjK4iY,14831
@@ -11,7 +11,7 @@ pyconvexity/data/loaders/__init__.py,sha256=6xPtOmH2n1mNby7ZjA-2Mk9F48Q246RNsyMn
11
11
  pyconvexity/data/loaders/cache.py,sha256=R-DUIiFpphjyi5EitcUZwzwUdZeqN6poYVyuNpKzB4g,7040
12
12
  pyconvexity/data/schema/01_core_schema.sql,sha256=xCCxUl65IGYxaMxAbgZVS7jVceRUJ_wOMw5c7cm6_Ww,16903
13
13
  pyconvexity/data/schema/02_data_metadata.sql,sha256=BbpTkH1s7IbZQkDBRF2kL_UR9tzMEWDBYS3VBkwDRu0,4323
14
- pyconvexity/data/schema/03_validation_data.sql,sha256=bxadwwN9Om0KYwRo3lXom33TJI5cg4n2n_X0rpK2CoA,88454
14
+ pyconvexity/data/schema/03_validation_data.sql,sha256=Y4iZ1RzqMzeaBWalecT6BRd8I3MSW5nclXJI3cE_JAQ,88663
15
15
  pyconvexity/data/sources/__init__.py,sha256=Dn6_oS7wB-vLjMj2YeXlmIl6hNjACbicimSabKxIWnc,108
16
16
  pyconvexity/data/sources/gem.py,sha256=v8OYCMsb2t-8u-YmK8vzMsgI9ArUAOAXMZZQOFpJ-nI,14923
17
17
  pyconvexity/io/__init__.py,sha256=FCyvRDfBUrrNei-y5JVod6MMN1bkPMSSfE0fpKi1aKQ,751
@@ -36,7 +36,7 @@ pyconvexity/solvers/pypsa/solver.py,sha256=oXX2kqU9AWg8GgsMOV0fYqv93XjIk8Kh-fKWb
36
36
  pyconvexity/solvers/pypsa/storage.py,sha256=9edLe46f62jvpai1mNQEKypV77L26VyFdvKgQLCEA3o,94635
37
37
  pyconvexity/validation/__init__.py,sha256=VJNZlFoWABsWwUKktNk2jbtXIepH5omvC0WtsTS7o3o,583
38
38
  pyconvexity/validation/rules.py,sha256=GiNadc8hvbWBr09vUkGiLLTmSdvtNSeGLFwvCjlikYY,9241
39
- pyconvexity-0.4.3.dist-info/METADATA,sha256=DJM9jC54RdzhfgEOaDQh0gdg6zqg3KS_89qcZIIT7TY,2013
40
- pyconvexity-0.4.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
- pyconvexity-0.4.3.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
42
- pyconvexity-0.4.3.dist-info/RECORD,,
39
+ pyconvexity-0.4.6.dist-info/METADATA,sha256=YEKMDpHrBrlWJZ8VA1DJgHrLN2oLXZNl3aojYwebRfg,4967
40
+ pyconvexity-0.4.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
+ pyconvexity-0.4.6.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
42
+ pyconvexity-0.4.6.dist-info/RECORD,,
@@ -1,47 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: pyconvexity
3
- Version: 0.4.3
4
- Summary: Python library for energy system modeling and optimization with PyPSA
5
- Author-email: Convexity Team <info@convexity.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/bayesian-energy/pyconvexity
8
- Project-URL: Repository, https://github.com/bayesian-energy/pyconvexity
9
- Project-URL: Issues, https://github.com/bayesian-energy/pyconvexity/issues
10
- Project-URL: Documentation, https://pyconvexity.readthedocs.io
11
- Classifier: Development Status :: 3 - Alpha
12
- Classifier: Intended Audience :: Science/Research
13
- Classifier: License :: OSI Approved :: MIT License
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Programming Language :: Python :: 3.9
16
- Classifier: Programming Language :: Python :: 3.10
17
- Classifier: Programming Language :: Python :: 3.11
18
- Classifier: Programming Language :: Python :: 3.12
19
- Classifier: Topic :: Scientific/Engineering
20
- Requires-Python: >=3.9
21
- Description-Content-Type: text/markdown
22
- Requires-Dist: pandas>=1.5.0
23
- Requires-Dist: numpy>=1.21.0
24
- Requires-Dist: pyarrow>=10.0.0
25
- Provides-Extra: pypsa
26
- Requires-Dist: pypsa>=0.25.0; extra == "pypsa"
27
- Requires-Dist: networkx; extra == "pypsa"
28
- Requires-Dist: scipy; extra == "pypsa"
29
- Requires-Dist: xarray; extra == "pypsa"
30
- Provides-Extra: excel
31
- Requires-Dist: openpyxl>=3.0.0; extra == "excel"
32
- Requires-Dist: xlsxwriter>=3.0.0; extra == "excel"
33
- Provides-Extra: netcdf
34
- Requires-Dist: netcdf4>=1.6.0; extra == "netcdf"
35
- Requires-Dist: xarray>=2022.3.0; extra == "netcdf"
36
- Provides-Extra: data
37
- Requires-Dist: country-converter>=1.0.0; extra == "data"
38
- Requires-Dist: pyyaml>=6.0.0; extra == "data"
39
- Provides-Extra: dev
40
- Requires-Dist: pytest>=7.0.0; extra == "dev"
41
- Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
42
- Requires-Dist: black>=22.0.0; extra == "dev"
43
- Requires-Dist: isort>=5.10.0; extra == "dev"
44
- Requires-Dist: mypy>=1.0.0; extra == "dev"
45
- Requires-Dist: pre-commit>=2.20.0; extra == "dev"
46
- Provides-Extra: all
47
- Requires-Dist: pyconvexity[data,excel,netcdf,pypsa]; extra == "all"