shrecc 0.0.1__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.
shrecc-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright © 2024 Luxembourg Institute of Science and Technology
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
shrecc-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,108 @@
1
+ Metadata-Version: 2.4
2
+ Name: shrecc
3
+ Version: 0.0.1
4
+ Summary: SHRECC: Smooth Hourly Resolution Electricity Consumption Calculation
5
+ Author-email: Sabina Bednářová <sabina.bednarova@list.lu>
6
+ Maintainer-email: Sabina Bednářová <sabina.bednarova@list.lu>
7
+ Project-URL: source, https://git.list.lu/sabina.bednarova/SHRECC
8
+ Project-URL: homepage, https://git.list.lu/sabina.bednarova/SHRECC
9
+ Project-URL: tracker, https://git.list.lu/sabina.bednarova/SHRECC/issues
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Programming Language :: Python
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Natural Language :: English
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: bw2data
23
+ Requires-Dist: pandas>=2
24
+ Requires-Dist: numpy<2,>=1.24
25
+ Requires-Dist: requests>=2.32
26
+ Requires-Dist: fs
27
+ Requires-Dist: scipy>=1.14
28
+ Requires-Dist: appdirs
29
+ Provides-Extra: testing
30
+ Requires-Dist: shrecc; extra == "testing"
31
+ Requires-Dist: pytest; extra == "testing"
32
+ Requires-Dist: pytest-cov; extra == "testing"
33
+ Requires-Dist: python-coveralls; extra == "testing"
34
+ Provides-Extra: dev
35
+ Requires-Dist: build; extra == "dev"
36
+ Requires-Dist: pre-commit; extra == "dev"
37
+ Requires-Dist: pylint; extra == "dev"
38
+ Requires-Dist: pytest; extra == "dev"
39
+ Requires-Dist: pytest-cov; extra == "dev"
40
+ Requires-Dist: pytest-randomly; extra == "dev"
41
+ Requires-Dist: setuptools; extra == "dev"
42
+ Dynamic: license-file
43
+
44
+ # SHRECC: Simple Hourly Resolution Electricity Consumption Calculation
45
+
46
+ ## Description
47
+
48
+ SHRECC package is a python package directly compatible with Brightway2 or Brightway2.5 to create time-aware electricity databases. For any given year and countries (check availability on https://api.energy-charts.info/), download and prepare data for low-voltage electricity consumption.
49
+
50
+ ## Features
51
+
52
+ - **High-resolution electricity mixes** – Generates electricity life cycle inventories (LCIs) with **hourly** resolution, enhancing accuracy for life cycle assessment (LCA).
53
+ - **Brightway2/2.5 compatibility** – Seamlessly integrates with Brightway, allowing direct use in existing LCA models.
54
+ - **Dynamic temporal representation** – Users can select electricity mixes by **hour, month, or season**, addressing fluctuations in renewable energy generation and consumption.
55
+ - **Automated data retrieval** – Pulls electricity production, trade, and consumption data from the **Energy Charts API**, ensuring up-to-date datasets.
56
+ - **Ecoinvent matching** – Aligns with **ecoinvent classifications**, converting from ENTSO-E datasets.
57
+ - **User-controlled updates** – Enables **one-time or recurring** updates, allowing continuous tracking of electricity mix evolution over time.
58
+ - **Optimized impact assessments** – Helps reduce uncertainty and improve **decision-making for electricity-intensive technologies** by considering real-time electricity mix variations.
59
+
60
+ ## Installation
61
+
62
+ ### Clone the repository
63
+
64
+ For the code: git clone [https://git.list.lu/shrecc_project/shrecc](https://git.list.lu/shrecc_project/shrecc)
65
+ For the data: [https://git.list.lu/shrecc_project/shrecc_data](https://git.list.lu/shrecc_project/shrecc_data)
66
+
67
+ ### Install dependencies
68
+
69
+ #### Using pip
70
+
71
+ If you are using a standard Python environment, install dependencies with:
72
+ ` pip install -r requirements.txt`
73
+
74
+ #### Using Conda environment
75
+
76
+ If you prefer to use Conda, create an environment from the provided environment.yml file:
77
+ `conda env create -f environment.yml`
78
+ Then activate the environment: `conda activate shrecc`
79
+ Alternatively, if the environment already exists and you want to update it: `conda env update --file environment.yml --prune`
80
+
81
+ #### Using Conda environment (avoid Anaconda)
82
+
83
+ If you prefer to use Conda and meanwhile avoid using Anaconda, create an environment from the provided environment_clean.yml file:
84
+ `conda env create -f environment_clean.yml`
85
+
86
+ Or, if you have Mamba installed (a faster Conda alternative):
87
+
88
+ `mamba env create -f environment_clean.yml`
89
+ Then activate the environment: `conda activate shrecc_clean`
90
+ Alternatively, if the environment already exists and you want to update it: `conda env update --file environment_clean.yml --prune`
91
+
92
+ Or, with Mamba:
93
+
94
+ `mamba env update -n shrecc_clean -f environment.yml `
95
+
96
+ ## Usage
97
+
98
+ You can find usage examples in the Jupyter notebook: [notebooks/example.ipynb](notebooks/example.ipynb).
99
+
100
+ ## License
101
+
102
+ Copyright © 2024 Luxembourg Institute of Science and Technology
103
+ Licensed under the MIT License.
104
+
105
+ ## Authors
106
+
107
+ * Sabina Bednářová (<sabina.bednarova@list.lu>)
108
+ * Thomas Gibon (<thomas.gibon@list.lu>)
shrecc-0.0.1/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # SHRECC: Simple Hourly Resolution Electricity Consumption Calculation
2
+
3
+ ## Description
4
+
5
+ SHRECC package is a python package directly compatible with Brightway2 or Brightway2.5 to create time-aware electricity databases. For any given year and countries (check availability on https://api.energy-charts.info/), download and prepare data for low-voltage electricity consumption.
6
+
7
+ ## Features
8
+
9
+ - **High-resolution electricity mixes** – Generates electricity life cycle inventories (LCIs) with **hourly** resolution, enhancing accuracy for life cycle assessment (LCA).
10
+ - **Brightway2/2.5 compatibility** – Seamlessly integrates with Brightway, allowing direct use in existing LCA models.
11
+ - **Dynamic temporal representation** – Users can select electricity mixes by **hour, month, or season**, addressing fluctuations in renewable energy generation and consumption.
12
+ - **Automated data retrieval** – Pulls electricity production, trade, and consumption data from the **Energy Charts API**, ensuring up-to-date datasets.
13
+ - **Ecoinvent matching** – Aligns with **ecoinvent classifications**, converting from ENTSO-E datasets.
14
+ - **User-controlled updates** – Enables **one-time or recurring** updates, allowing continuous tracking of electricity mix evolution over time.
15
+ - **Optimized impact assessments** – Helps reduce uncertainty and improve **decision-making for electricity-intensive technologies** by considering real-time electricity mix variations.
16
+
17
+ ## Installation
18
+
19
+ ### Clone the repository
20
+
21
+ For the code: git clone [https://git.list.lu/shrecc_project/shrecc](https://git.list.lu/shrecc_project/shrecc)
22
+ For the data: [https://git.list.lu/shrecc_project/shrecc_data](https://git.list.lu/shrecc_project/shrecc_data)
23
+
24
+ ### Install dependencies
25
+
26
+ #### Using pip
27
+
28
+ If you are using a standard Python environment, install dependencies with:
29
+ ` pip install -r requirements.txt`
30
+
31
+ #### Using Conda environment
32
+
33
+ If you prefer to use Conda, create an environment from the provided environment.yml file:
34
+ `conda env create -f environment.yml`
35
+ Then activate the environment: `conda activate shrecc`
36
+ Alternatively, if the environment already exists and you want to update it: `conda env update --file environment.yml --prune`
37
+
38
+ #### Using Conda environment (avoid Anaconda)
39
+
40
+ If you prefer to use Conda and meanwhile avoid using Anaconda, create an environment from the provided environment_clean.yml file:
41
+ `conda env create -f environment_clean.yml`
42
+
43
+ Or, if you have Mamba installed (a faster Conda alternative):
44
+
45
+ `mamba env create -f environment_clean.yml`
46
+ Then activate the environment: `conda activate shrecc_clean`
47
+ Alternatively, if the environment already exists and you want to update it: `conda env update --file environment_clean.yml --prune`
48
+
49
+ Or, with Mamba:
50
+
51
+ `mamba env update -n shrecc_clean -f environment.yml `
52
+
53
+ ## Usage
54
+
55
+ You can find usage examples in the Jupyter notebook: [notebooks/example.ipynb](notebooks/example.ipynb).
56
+
57
+ ## License
58
+
59
+ Copyright © 2024 Luxembourg Institute of Science and Technology
60
+ Licensed under the MIT License.
61
+
62
+ ## Authors
63
+
64
+ * Sabina Bednářová (<sabina.bednarova@list.lu>)
65
+ * Thomas Gibon (<thomas.gibon@list.lu>)
@@ -0,0 +1,110 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "shrecc"
7
+ authors = [
8
+ { name="Sabina Bednářová", email="sabina.bednarova@list.lu" }
9
+ ]
10
+ maintainers = [
11
+ { name="Sabina Bednářová", email="sabina.bednarova@list.lu" }
12
+ ]
13
+ description = "SHRECC: Smooth Hourly Resolution Electricity Consumption Calculation"
14
+ readme = "README.md"
15
+ dynamic = ["version"]
16
+ # Add here all kinds of additional classifiers as defined under
17
+ # https://pypi.org/classifiers/
18
+ classifiers = [
19
+ "Development Status :: 4 - Beta",
20
+ "Programming Language :: Python",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Natural Language :: English",
26
+ "Operating System :: OS Independent",
27
+ "Topic :: Scientific/Engineering"
28
+ ]
29
+ requires-python = ">=3.10"
30
+ dependencies = [
31
+ # dependencies as strings with quotes, e.g. "foo"
32
+ # You can add version requirements like "foo>2.0"
33
+ "bw2data",
34
+ "pandas>=2",
35
+ "numpy>=1.24,<2",
36
+ "requests>=2.32",
37
+ "fs",
38
+ "scipy>=1.14",
39
+ "appdirs",
40
+ ]
41
+
42
+ [project.urls]
43
+ source = "https://git.list.lu/sabina.bednarova/SHRECC"
44
+ homepage = "https://git.list.lu/sabina.bednarova/SHRECC"
45
+ tracker = "https://git.list.lu/sabina.bednarova/SHRECC/issues"
46
+
47
+ [project.optional-dependencies]
48
+ # Getting recursive dependencies to work is a pain, this
49
+ # seems to work, at least for now
50
+ testing = [
51
+ "shrecc",
52
+ "pytest",
53
+ "pytest-cov",
54
+ "python-coveralls"
55
+ ]
56
+ dev = [
57
+ "build",
58
+ "pre-commit",
59
+ "pylint",
60
+ "pytest",
61
+ "pytest-cov",
62
+ "pytest-randomly",
63
+ "setuptools",
64
+ ]
65
+
66
+ [tool.setuptools]
67
+ license-files = ["LICENSE"]
68
+ include-package-data = true
69
+ packages = ["shrecc"]
70
+
71
+ [tool.setuptools.dynamic]
72
+ version = {attr = "shrecc.__version__"}
73
+
74
+ [tool.pytest.ini_options]
75
+ addopts = "--cov shrecc --cov-report term-missing --verbose"
76
+ norecursedirs = [
77
+ "dist",
78
+ "build",
79
+ ".tox"
80
+ ]
81
+ testpaths = ["tests/*.py"]
82
+
83
+ [tool.flake8]
84
+ # Some sane defaults for the code style checker flake8
85
+ max_line_length = 88
86
+ extend_ignore = ["E203", "W503"]
87
+ # ^ Black-compatible
88
+ # E203 and W503 have edge cases handled by black
89
+ exclude = [
90
+ ".tox",
91
+ "build",
92
+ "dist",
93
+ ".eggs",
94
+ "docs/conf.py",
95
+ ]
96
+
97
+ [tool.black]
98
+ line-length = 88
99
+
100
+ [tool.isort]
101
+ profile = "black"
102
+ line_length = 88
103
+ multi_line_output = 3
104
+ include_trailing_comma = true
105
+ force_grid_wrap = 0
106
+ use_parentheses = true
107
+ ensure_newline_before_comments = true
108
+
109
+ [tool.pylint.format]
110
+ max-line-length = "88"
shrecc-0.0.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,20 @@
1
+ # Copyright © 2024 Luxembourg Institute of Science and Technology
2
+ # Licensed under the MIT License (see LICENSE file for details).
3
+ # Authors: [Sabina Bednářová, Thomas Gibon]
4
+
5
+
6
+ """shrecc"""
7
+
8
+ __all__ = (
9
+ "__version__",
10
+ "create_database",
11
+ "filt_cutoff",
12
+ "get_data",
13
+ "data_processing",
14
+ "download_shrecc_data",
15
+ )
16
+ from .database import create_database, filt_cutoff
17
+ from .download import get_data, download_shrecc_data
18
+ from .treatment import data_processing
19
+
20
+ __version__ = "0.0.1"