pyconvexity 0.4.3__py3-none-any.whl → 0.4.6.post1__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.

@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyconvexity
3
+ Version: 0.4.6.post1
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=mb7cZWFtBTYPgotnX_1oAZadFITLHrAXwTSs2Eb1dvU,28
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,14 +11,14 @@ 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
18
18
  pyconvexity/io/excel_exporter.py,sha256=9MkZAVnHvsJSmfZ12w29GhDTsYI89fCGphjdo7s_ABs,50506
19
19
  pyconvexity/io/excel_importer.py,sha256=Q5petB0WXjbw0TIR4ofG3EkjdT8lBh21yJMbEgdtXfU,59347
20
- pyconvexity/io/netcdf_exporter.py,sha256=9EUPvDSYR7RxYDfOBT7O9clpC9F4sIj1RaNayvOmb5I,7119
21
- pyconvexity/io/netcdf_importer.py,sha256=WATZutznl7uMfcbi7957qxdP5NRQs3c1dV6mhBJotdc,70783
20
+ pyconvexity/io/netcdf_exporter.py,sha256=ndbYa_b34LZQ-70Y7KXh3oLpATnARLciQHXKNpcjNoY,6828
21
+ pyconvexity/io/netcdf_importer.py,sha256=JtdfIp48F_fQIlRgWJ3XaeeqtvQRa_FeE4hjVaA623I,67189
22
22
  pyconvexity/models/__init__.py,sha256=WqDSq1Mst7iJsFytausruoM562FKlOKV0Egmnpm2900,4695
23
23
  pyconvexity/models/attributes.py,sha256=RpH3rBoHD33xBSXUEfaD-CvRj3JruolCwexo6HPMGC8,23388
24
24
  pyconvexity/models/carriers.py,sha256=L_WuDMW13k8aaA-obsDPxjmpZgZELiIAZuNtxq7YLpg,3447
@@ -28,15 +28,15 @@ pyconvexity/models/results.py,sha256=6j1H4AwVmp94L97gl_sGnE8izMxkU5o89guKIU8JdtE
28
28
  pyconvexity/models/scenarios.py,sha256=-0UPUDXf6r9mFriA-z2fD5KKMARm2PUBjLba49S9mCI,5867
29
29
  pyconvexity/solvers/__init__.py,sha256=t1gOUTqbYDCtIvKPqGVY1fjKwqJi2Od9bGeIO7bPvJE,667
30
30
  pyconvexity/solvers/pypsa/__init__.py,sha256=nudu0AOYEfPhpGHZ1Q9pUgjGeeIJd_zeULc975iyluE,555
31
- pyconvexity/solvers/pypsa/api.py,sha256=OXGfVsv76HIXMJ4b_5LSiWW1OL5Xiq5EnUzaArTuaTI,18196
32
- pyconvexity/solvers/pypsa/batch_loader.py,sha256=w525_lqanKtARKgicajhBiDwIJzkaU_HbkL1I82gDqg,12361
33
- pyconvexity/solvers/pypsa/builder.py,sha256=SOr77SmDCYKNxfb-wGHYRX5A0M7zdv_E2Sjyf82uS6Y,24208
31
+ pyconvexity/solvers/pypsa/api.py,sha256=CWKslptTlZrSbuHy916_PHhCG8nO9SCfjTXkJZylLM8,17512
32
+ pyconvexity/solvers/pypsa/batch_loader.py,sha256=ZgOcZqMnMS3TOYTq2Ly2O4cuwhNNAicu3EDq1Fj38OI,11929
33
+ pyconvexity/solvers/pypsa/builder.py,sha256=1ZU68Wtl_jQSXHzspKQDkR6bxAVU1nKvPfnPUl0aO3k,23256
34
34
  pyconvexity/solvers/pypsa/constraints.py,sha256=20WliFDhPQGMAsS4VOTU8LZJpsFpLVRHpNsZW49GTcc,16397
35
- pyconvexity/solvers/pypsa/solver.py,sha256=oXX2kqU9AWg8GgsMOV0fYqv93XjIk8Kh-fKWbQSzaig,63239
36
- pyconvexity/solvers/pypsa/storage.py,sha256=9edLe46f62jvpai1mNQEKypV77L26VyFdvKgQLCEA3o,94635
35
+ pyconvexity/solvers/pypsa/solver.py,sha256=M-s-VUCnRD8Jdh22PCUA-gWgYp1eH6_sgpoSzcv6kNQ,59762
36
+ pyconvexity/solvers/pypsa/storage.py,sha256=C8zLPXSd95LT0Aq6c00vZu1xlJHEF_l8RDUhB-s5mJ0,91704
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.post1.dist-info/METADATA,sha256=42uMFhx4muAr2ZyGYa00osp9K_ifn5l14814yYyHkis,4973
40
+ pyconvexity-0.4.6.post1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
41
+ pyconvexity-0.4.6.post1.dist-info/top_level.txt,sha256=wFPEDXVaebR3JO5Tt3HNse-ws5aROCcxEco15d6j64s,12
42
+ pyconvexity-0.4.6.post1.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"