codecarbon 3.2.4__tar.gz → 3.2.5__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.
- {codecarbon-3.2.4 → codecarbon-3.2.5}/PKG-INFO +1 -1
- codecarbon-3.2.5/codecarbon/_version.py +1 -0
- codecarbon-3.2.5/codecarbon/data/private_infra/nordic_emissions.json +69 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon.egg-info/PKG-INFO +1 -1
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon.egg-info/SOURCES.txt +1 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/pyproject.toml +2 -1
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_package_integrity.py +10 -0
- codecarbon-3.2.4/codecarbon/_version.py +0 -1
- {codecarbon-3.2.4 → codecarbon-3.2.5}/LICENSE +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/README.md +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/cli/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/cli/auth.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/cli/cli_utils.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/cli/main.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/cli/monitor.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/api_client.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/cloud.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/config.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/cpu.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/electricitymaps_api.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/emissions.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/gpu.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/gpu_amd.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/gpu_device.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/gpu_nvidia.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/measure.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/powermetrics.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/rapl.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/resource_tracker.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/schemas.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/units.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/core/util.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/canada_provinces.geojson +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/cloud/impact.csv +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/hardware/cpu_dataset_builder/amd_cpu_scrapper.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/hardware/cpu_dataset_builder/intel_cpu_scrapper.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/hardware/cpu_dataset_builder/merge_scrapped_cpu_power.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/hardware/cpu_power.csv +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/private_infra/2016/usa_emissions.json +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/private_infra/2023/canada_energy_mix.json +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/private_infra/carbon_intensity_per_source.json +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/private_infra/global_energy_mix.json +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/emissions_tracker.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/geography.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/hardware.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/logger.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/ram.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/scheduler.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/external/task.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/input.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/lock.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/base_output.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/emissions_data.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/file.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/http.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/logger.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/metrics/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/metrics/logfire.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/metrics/metric_docs.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/output_methods/metrics/prometheus.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/py.typed +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/assets/__init__.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/assets/car_icon.png +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/assets/house_icon.png +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/assets/tv_icon.png +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/carbonboard.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/carbonboard_on_api.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/components.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/data.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/viz/units.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon.egg-info/dependency_links.txt +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon.egg-info/entry_points.txt +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon.egg-info/requires.txt +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon.egg-info/top_level.txt +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/setup.cfg +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_api_call.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_cloud.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_config.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_core_util.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_cpu.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_cpu_load.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_custom_handler.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_electricitymaps_api.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_electricitymaps_backward_compatibility.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_electricitymaps_config_backward_compatibility.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_emissions.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_emissions_tracker.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_emissions_tracker_constant.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_emissions_tracker_flush.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_energy.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_geography.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_gpu.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_gpu_amd.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_gpu_nvidia.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_input.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_lock.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_logger.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_logging_output.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_offline_emissions_tracker.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_powermetrics.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_ram.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_rapl_mmio_scanning.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_rapl_parameters.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_rapl_permissions.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_resource_tracker.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_tracking_inference.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_unsupported_gpu.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_utilization_tracking.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_viz_data.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_viz_units.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/testdata.py +0 -0
- {codecarbon-3.2.4 → codecarbon-3.2.5}/tests/testutils.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.2.5"
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {
|
|
3
|
+
"SE1": {
|
|
4
|
+
"emission_factor": 18.0,
|
|
5
|
+
"unit": "gCO2eq/kWh",
|
|
6
|
+
"description": "Sweden Bidding Zone 1 (Northern Sweden)",
|
|
7
|
+
"year": 2024
|
|
8
|
+
},
|
|
9
|
+
"SE2": {
|
|
10
|
+
"emission_factor": 18.0,
|
|
11
|
+
"unit": "gCO2eq/kWh",
|
|
12
|
+
"description": "Sweden Bidding Zone 2 (Central Sweden)",
|
|
13
|
+
"year": 2024
|
|
14
|
+
},
|
|
15
|
+
"SE3": {
|
|
16
|
+
"emission_factor": 18.0,
|
|
17
|
+
"unit": "gCO2eq/kWh",
|
|
18
|
+
"description": "Sweden Bidding Zone 3 (Southern Sweden)",
|
|
19
|
+
"year": 2024
|
|
20
|
+
},
|
|
21
|
+
"SE4": {
|
|
22
|
+
"emission_factor": 18.0,
|
|
23
|
+
"unit": "gCO2eq/kWh",
|
|
24
|
+
"description": "Sweden Bidding Zone 4 (Stockholm region)",
|
|
25
|
+
"year": 2024
|
|
26
|
+
},
|
|
27
|
+
"NO1": {
|
|
28
|
+
"emission_factor": 18.0,
|
|
29
|
+
"unit": "gCO2eq/kWh",
|
|
30
|
+
"description": "Norway Bidding Zone 1 (Oslo)",
|
|
31
|
+
"year": 2024
|
|
32
|
+
},
|
|
33
|
+
"NO2": {
|
|
34
|
+
"emission_factor": 18.0,
|
|
35
|
+
"unit": "gCO2eq/kWh",
|
|
36
|
+
"description": "Norway Bidding Zone 2 (Southern Norway)",
|
|
37
|
+
"year": 2024
|
|
38
|
+
},
|
|
39
|
+
"NO3": {
|
|
40
|
+
"emission_factor": 18.0,
|
|
41
|
+
"unit": "gCO2eq/kWh",
|
|
42
|
+
"description": "Norway Bidding Zone 3 (Central Norway)",
|
|
43
|
+
"year": 2024
|
|
44
|
+
},
|
|
45
|
+
"NO4": {
|
|
46
|
+
"emission_factor": 18.0,
|
|
47
|
+
"unit": "gCO2eq/kWh",
|
|
48
|
+
"description": "Norway Bidding Zone 4 (Northern Norway)",
|
|
49
|
+
"year": 2024
|
|
50
|
+
},
|
|
51
|
+
"NO5": {
|
|
52
|
+
"emission_factor": 18.0,
|
|
53
|
+
"unit": "gCO2eq/kWh",
|
|
54
|
+
"description": "Norway Bidding Zone 5 (Western Norway)",
|
|
55
|
+
"year": 2024
|
|
56
|
+
},
|
|
57
|
+
"FI": {
|
|
58
|
+
"emission_factor": 72.0,
|
|
59
|
+
"unit": "gCO2eq/kWh",
|
|
60
|
+
"description": "Finland",
|
|
61
|
+
"year": 2025
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"metadata": {
|
|
65
|
+
"source": "Based on historical averages from ENTSO-E data",
|
|
66
|
+
"last_updated": "2026-01-24",
|
|
67
|
+
"notes": "Static emission factors for Nordic regions. Sweden and Norway have very low carbon intensity due to high renewable energy (primarily hydro and nuclear). Finland has higher emissions due to greater fossil fuel dependency."
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -45,6 +45,7 @@ codecarbon/data/hardware/cpu_dataset_builder/intel_cpu_scrapper.py
|
|
|
45
45
|
codecarbon/data/hardware/cpu_dataset_builder/merge_scrapped_cpu_power.py
|
|
46
46
|
codecarbon/data/private_infra/carbon_intensity_per_source.json
|
|
47
47
|
codecarbon/data/private_infra/global_energy_mix.json
|
|
48
|
+
codecarbon/data/private_infra/nordic_emissions.json
|
|
48
49
|
codecarbon/data/private_infra/2016/usa_emissions.json
|
|
49
50
|
codecarbon/data/private_infra/2023/canada_energy_mix.json
|
|
50
51
|
codecarbon/external/__init__.py
|
|
@@ -61,6 +61,7 @@ codecarbon = [
|
|
|
61
61
|
"data/canada_provinces.geojson",
|
|
62
62
|
"data/private_infra/global_energy_mix.json",
|
|
63
63
|
"data/private_infra/carbon_intensity_per_source.json",
|
|
64
|
+
"data/private_infra/nordic_emissions.json",
|
|
64
65
|
"data/private_infra/2016/usa_emissions.json",
|
|
65
66
|
"data/private_infra/2023/canada_energy_mix.json",
|
|
66
67
|
"viz/assets/car_icon.png",
|
|
@@ -146,7 +147,7 @@ docs-check-drift = "python scripts/check-docs-drift.py"
|
|
|
146
147
|
carbonboard = "python codecarbon/viz/carbonboard.py"
|
|
147
148
|
|
|
148
149
|
[tool.bumpver]
|
|
149
|
-
current_version = "3.2.
|
|
150
|
+
current_version = "3.2.5"
|
|
150
151
|
version_pattern = "MAJOR.MINOR.PATCH[_TAGNUM]"
|
|
151
152
|
|
|
152
153
|
[tool.bumpver.file_patterns]
|
|
@@ -3,6 +3,8 @@ Test that verifies the package includes all necessary data files.
|
|
|
3
3
|
This test should be run against the installed package, not the source.
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
|
+
from importlib import resources as importlib_resources
|
|
7
|
+
|
|
6
8
|
import pandas as pd
|
|
7
9
|
import pytest
|
|
8
10
|
|
|
@@ -72,6 +74,14 @@ def test_global_energy_mix_data_included():
|
|
|
72
74
|
assert len(global_energy_data) > 0, "Global energy mix data should not be empty"
|
|
73
75
|
|
|
74
76
|
|
|
77
|
+
def test_nordic_emissions_data_included():
|
|
78
|
+
"""Test that nordic emissions data file is included in the package."""
|
|
79
|
+
nordic_file = importlib_resources.files("codecarbon").joinpath(
|
|
80
|
+
"data/private_infra/nordic_emissions.json"
|
|
81
|
+
)
|
|
82
|
+
assert nordic_file.is_file(), f"Nordic emissions file missing: {nordic_file}"
|
|
83
|
+
|
|
84
|
+
|
|
75
85
|
def test_country_specific_data_access():
|
|
76
86
|
"""Test that we can access country-specific data if available."""
|
|
77
87
|
ds = DataSource()
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.2.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/private_infra/2023/canada_energy_mix.json
RENAMED
|
File without changes
|
{codecarbon-3.2.4 → codecarbon-3.2.5}/codecarbon/data/private_infra/carbon_intensity_per_source.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codecarbon-3.2.4 → codecarbon-3.2.5}/tests/test_electricitymaps_config_backward_compatibility.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|