euets-calculator 1.0.3__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.
- euets_calculator-1.0.3/CITATION.cff +20 -0
- euets_calculator-1.0.3/LICENSE +21 -0
- euets_calculator-1.0.3/MANIFEST.in +1 -0
- euets_calculator-1.0.3/PKG-INFO +146 -0
- euets_calculator-1.0.3/README.md +117 -0
- euets_calculator-1.0.3/pyproject.toml +45 -0
- euets_calculator-1.0.3/setup.cfg +4 -0
- euets_calculator-1.0.3/src/euets_calculator/__init__.py +9 -0
- euets_calculator-1.0.3/src/euets_calculator/cli.py +375 -0
- euets_calculator-1.0.3/src/euets_calculator/engines/allocation_engine.py +215 -0
- euets_calculator-1.0.3/src/euets_calculator/engines/cii_engine.py +343 -0
- euets_calculator-1.0.3/src/euets_calculator/engines/ets_engine.py +315 -0
- euets_calculator-1.0.3/src/euets_calculator/engines/fuelleu_engine.py +358 -0
- euets_calculator-1.0.3/src/euets_calculator/models/fuel.py +21 -0
- euets_calculator-1.0.3/src/euets_calculator/models/voyage.py +30 -0
- euets_calculator-1.0.3/src/euets_calculator/schemas/allocation.py +52 -0
- euets_calculator-1.0.3/src/euets_calculator/schemas/ets.py +79 -0
- euets_calculator-1.0.3/src/euets_calculator.egg-info/PKG-INFO +146 -0
- euets_calculator-1.0.3/src/euets_calculator.egg-info/SOURCES.txt +26 -0
- euets_calculator-1.0.3/src/euets_calculator.egg-info/dependency_links.txt +1 -0
- euets_calculator-1.0.3/src/euets_calculator.egg-info/entry_points.txt +2 -0
- euets_calculator-1.0.3/src/euets_calculator.egg-info/requires.txt +12 -0
- euets_calculator-1.0.3/src/euets_calculator.egg-info/top_level.txt +1 -0
- euets_calculator-1.0.3/tests/test_accuracy.py +226 -0
- euets_calculator-1.0.3/tests/test_comprehensive.py +1382 -0
- euets_calculator-1.0.3/tests/test_ets_engine.py +117 -0
- euets_calculator-1.0.3/tests/test_fueleu_audit.py +60 -0
- euets_calculator-1.0.3/tests/test_fueleu_precision_audit.py +40 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
type: software
|
|
4
|
+
title: "EU ETS Maritime Compliance Calculator"
|
|
5
|
+
version: "1.0.3"
|
|
6
|
+
date-released: 2026-11-29
|
|
7
|
+
license: MIT
|
|
8
|
+
abstract: "A Python package and command-line tool for EU ETS, FuelEU Maritime and CII maritime compliance calculations."
|
|
9
|
+
authors:
|
|
10
|
+
- name: "Ingeniat Estudios y Proyectos SL"
|
|
11
|
+
website: "https://ingeniat.pro"
|
|
12
|
+
repository-code: "https://github.com/ingeniat-es/euets-calculator"
|
|
13
|
+
url: "https://ingeniat.pro/eu-ets-calculator/"
|
|
14
|
+
keywords:
|
|
15
|
+
- maritime
|
|
16
|
+
- eu-ets
|
|
17
|
+
- fueleu
|
|
18
|
+
- cii
|
|
19
|
+
- carbon
|
|
20
|
+
- compliance
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ingeniat Estudios y Proyectos SL
|
|
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include CITATION.cff
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: euets-calculator
|
|
3
|
+
Version: 1.0.3
|
|
4
|
+
Summary: EU ETS, FuelEU Maritime and CII compliance calculator for shipowners
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://ingeniat.pro
|
|
7
|
+
Project-URL: Documentation, https://ingeniat.pro/eu-ets-calculator/
|
|
8
|
+
Project-URL: Source, https://github.com/ingeniat-es/euets-calculator
|
|
9
|
+
Keywords: maritime,eu-ets,fueleu,cii,carbon,offshore,engineering
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Scientific/Engineering
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: click>=8.1
|
|
19
|
+
Requires-Dist: pydantic>=2.0
|
|
20
|
+
Provides-Extra: test
|
|
21
|
+
Requires-Dist: pytest>=7.0; extra == "test"
|
|
22
|
+
Requires-Dist: pytest-cov>=4.0; extra == "test"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: click>=8.1; extra == "dev"
|
|
25
|
+
Requires-Dist: pydantic>=2.0; extra == "dev"
|
|
26
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# EU ETS Maritime Compliance Calculator
|
|
31
|
+
|
|
32
|
+
A Python package and command-line tool for maritime carbon compliance calculations.
|
|
33
|
+
|
|
34
|
+
Version 1.0.3 · Python ≥ 3.10 · MIT · [ingeniat.pro](https://ingeniat.pro)
|
|
35
|
+
|
|
36
|
+
## What it does
|
|
37
|
+
|
|
38
|
+
| Engine | Regulation | Computes |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| EU ETS | Directive 2003/87/EC | Emissions, EUA costs, phase-in |
|
|
41
|
+
| FuelEU | Regulation (EU) 2023/1805 | Well-to-wake GHG intensity, compliance balance, penalty |
|
|
42
|
+
| CII | IMO MARPOL Annex VI | Rating (A–E) and corrective measures |
|
|
43
|
+
| Allocation | BIMCO clauses | Charterparty cost split |
|
|
44
|
+
|
|
45
|
+
## Install
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install -e .
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
For an isolated development environment:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
python3 -m venv .venv
|
|
55
|
+
source .venv/bin/activate
|
|
56
|
+
pip install -e ".[dev]"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Command line
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# EU ETS
|
|
63
|
+
euets-calc ets --imo 9123456 --voyage-id V001 --fuel-type VLSFO \
|
|
64
|
+
--quantity 1000 --voyage-type INTRA --phase-in-year 2025 --eua-price 80
|
|
65
|
+
|
|
66
|
+
# FuelEU
|
|
67
|
+
euets-calc fuel-eu --imo 9123456 --voyage-id V001 --fuel-type VLSFO \
|
|
68
|
+
--quantity 1000 --compliance-year 2030
|
|
69
|
+
|
|
70
|
+
# CII
|
|
71
|
+
euets-calc cii --imo 9123456 --vessel-type Container --co2 5000 \
|
|
72
|
+
--cargo-capacity 10000 --distance 50000 --year 2026
|
|
73
|
+
|
|
74
|
+
# Charterparty allocation
|
|
75
|
+
euets-calc allocate --imo 9123456 --voyage-id V001 --fuel-type VLSFO \
|
|
76
|
+
--quantity 1000 --charter-start 2025-01-01 --charter-end 2025-12-31 \
|
|
77
|
+
--off-hire-days 5 --clause-type BIMCO_SHORTNM
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Full command list: `euets-calc --help` (9 commands).
|
|
81
|
+
|
|
82
|
+
## Python API
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from decimal import Decimal
|
|
86
|
+
from euets_calculator.engines.ets_engine import ETSEngine
|
|
87
|
+
from euets_calculator.models.fuel import FuelRecord
|
|
88
|
+
|
|
89
|
+
engine = ETSEngine()
|
|
90
|
+
results = engine.compute(
|
|
91
|
+
[FuelRecord("9123456", "V001", "VLSFO", Decimal("1000"))],
|
|
92
|
+
phase_in_year=2025,
|
|
93
|
+
eua_price_eur_per_tCO2=Decimal("80"),
|
|
94
|
+
coverage_factor=Decimal("1.0"),
|
|
95
|
+
)
|
|
96
|
+
for result in results:
|
|
97
|
+
print(result.emissions_tCO2, result.computed_cost_eur)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Features
|
|
101
|
+
|
|
102
|
+
- Decimal precision throughout — no floating-point error in financial quantities
|
|
103
|
+
- SHA-256 audit hashes on every computation
|
|
104
|
+
- FuelEU exact, unrounded regulatory values for auditability
|
|
105
|
+
- BIMCO SHORTNM and SHIPMAN charterparty allocation
|
|
106
|
+
- Twelve-plus fuel types with regulatory emission factors
|
|
107
|
+
- Correct phase-in schedules and IMO CII rating vectors
|
|
108
|
+
- 165 passing tests
|
|
109
|
+
|
|
110
|
+
## Layout
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
├── pyproject.toml
|
|
114
|
+
├── src/euets_calculator/
|
|
115
|
+
│ ├── cli.py
|
|
116
|
+
│ ├── engines/ # ets, fuelleu, cii, allocation
|
|
117
|
+
│ ├── models/ # FuelRecord, Voyage
|
|
118
|
+
│ └── schemas/ # ETS and allocation results
|
|
119
|
+
├── tests/
|
|
120
|
+
├── examples/
|
|
121
|
+
└── docs/
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## Documentation
|
|
125
|
+
|
|
126
|
+
- [`docs/QUICK_START.md`](docs/QUICK_START.md) — common commands
|
|
127
|
+
- [`docs/USER_GUIDE.md`](docs/USER_GUIDE.md) — formulas, parameters and examples
|
|
128
|
+
- [`docs/API_REFERENCE.md`](docs/API_REFERENCE.md) — full API reference
|
|
129
|
+
- [`docs/OPERATION.md`](docs/OPERATION.md) — operational notes
|
|
130
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — version history
|
|
131
|
+
|
|
132
|
+
## Testing
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
python3 -m pytest -q
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Citation
|
|
139
|
+
|
|
140
|
+
If you use this package in research or a published calculation, cite the software via [`CITATION.cff`](CITATION.cff):
|
|
141
|
+
|
|
142
|
+
> Ingeniat Estudios y Proyectos SL (2026). *EU ETS Maritime Compliance Calculator*, version 1.0.3. https://github.com/ingeniat-es/euets-calculator
|
|
143
|
+
|
|
144
|
+
## License
|
|
145
|
+
|
|
146
|
+
MIT — Copyright 2026 Ingeniat Estudios y Proyectos SL.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# EU ETS Maritime Compliance Calculator
|
|
2
|
+
|
|
3
|
+
A Python package and command-line tool for maritime carbon compliance calculations.
|
|
4
|
+
|
|
5
|
+
Version 1.0.3 · Python ≥ 3.10 · MIT · [ingeniat.pro](https://ingeniat.pro)
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
| Engine | Regulation | Computes |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| EU ETS | Directive 2003/87/EC | Emissions, EUA costs, phase-in |
|
|
12
|
+
| FuelEU | Regulation (EU) 2023/1805 | Well-to-wake GHG intensity, compliance balance, penalty |
|
|
13
|
+
| CII | IMO MARPOL Annex VI | Rating (A–E) and corrective measures |
|
|
14
|
+
| Allocation | BIMCO clauses | Charterparty cost split |
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install -e .
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
For an isolated development environment:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
python3 -m venv .venv
|
|
26
|
+
source .venv/bin/activate
|
|
27
|
+
pip install -e ".[dev]"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Command line
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# EU ETS
|
|
34
|
+
euets-calc ets --imo 9123456 --voyage-id V001 --fuel-type VLSFO \
|
|
35
|
+
--quantity 1000 --voyage-type INTRA --phase-in-year 2025 --eua-price 80
|
|
36
|
+
|
|
37
|
+
# FuelEU
|
|
38
|
+
euets-calc fuel-eu --imo 9123456 --voyage-id V001 --fuel-type VLSFO \
|
|
39
|
+
--quantity 1000 --compliance-year 2030
|
|
40
|
+
|
|
41
|
+
# CII
|
|
42
|
+
euets-calc cii --imo 9123456 --vessel-type Container --co2 5000 \
|
|
43
|
+
--cargo-capacity 10000 --distance 50000 --year 2026
|
|
44
|
+
|
|
45
|
+
# Charterparty allocation
|
|
46
|
+
euets-calc allocate --imo 9123456 --voyage-id V001 --fuel-type VLSFO \
|
|
47
|
+
--quantity 1000 --charter-start 2025-01-01 --charter-end 2025-12-31 \
|
|
48
|
+
--off-hire-days 5 --clause-type BIMCO_SHORTNM
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Full command list: `euets-calc --help` (9 commands).
|
|
52
|
+
|
|
53
|
+
## Python API
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from decimal import Decimal
|
|
57
|
+
from euets_calculator.engines.ets_engine import ETSEngine
|
|
58
|
+
from euets_calculator.models.fuel import FuelRecord
|
|
59
|
+
|
|
60
|
+
engine = ETSEngine()
|
|
61
|
+
results = engine.compute(
|
|
62
|
+
[FuelRecord("9123456", "V001", "VLSFO", Decimal("1000"))],
|
|
63
|
+
phase_in_year=2025,
|
|
64
|
+
eua_price_eur_per_tCO2=Decimal("80"),
|
|
65
|
+
coverage_factor=Decimal("1.0"),
|
|
66
|
+
)
|
|
67
|
+
for result in results:
|
|
68
|
+
print(result.emissions_tCO2, result.computed_cost_eur)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Features
|
|
72
|
+
|
|
73
|
+
- Decimal precision throughout — no floating-point error in financial quantities
|
|
74
|
+
- SHA-256 audit hashes on every computation
|
|
75
|
+
- FuelEU exact, unrounded regulatory values for auditability
|
|
76
|
+
- BIMCO SHORTNM and SHIPMAN charterparty allocation
|
|
77
|
+
- Twelve-plus fuel types with regulatory emission factors
|
|
78
|
+
- Correct phase-in schedules and IMO CII rating vectors
|
|
79
|
+
- 165 passing tests
|
|
80
|
+
|
|
81
|
+
## Layout
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
├── pyproject.toml
|
|
85
|
+
├── src/euets_calculator/
|
|
86
|
+
│ ├── cli.py
|
|
87
|
+
│ ├── engines/ # ets, fuelleu, cii, allocation
|
|
88
|
+
│ ├── models/ # FuelRecord, Voyage
|
|
89
|
+
│ └── schemas/ # ETS and allocation results
|
|
90
|
+
├── tests/
|
|
91
|
+
├── examples/
|
|
92
|
+
└── docs/
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Documentation
|
|
96
|
+
|
|
97
|
+
- [`docs/QUICK_START.md`](docs/QUICK_START.md) — common commands
|
|
98
|
+
- [`docs/USER_GUIDE.md`](docs/USER_GUIDE.md) — formulas, parameters and examples
|
|
99
|
+
- [`docs/API_REFERENCE.md`](docs/API_REFERENCE.md) — full API reference
|
|
100
|
+
- [`docs/OPERATION.md`](docs/OPERATION.md) — operational notes
|
|
101
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — version history
|
|
102
|
+
|
|
103
|
+
## Testing
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
python3 -m pytest -q
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Citation
|
|
110
|
+
|
|
111
|
+
If you use this package in research or a published calculation, cite the software via [`CITATION.cff`](CITATION.cff):
|
|
112
|
+
|
|
113
|
+
> Ingeniat Estudios y Proyectos SL (2026). *EU ETS Maritime Compliance Calculator*, version 1.0.3. https://github.com/ingeniat-es/euets-calculator
|
|
114
|
+
|
|
115
|
+
## License
|
|
116
|
+
|
|
117
|
+
MIT — Copyright 2026 Ingeniat Estudios y Proyectos SL.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta:__legacy__"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "euets-calculator"
|
|
7
|
+
version = "1.0.3"
|
|
8
|
+
license = {text = "MIT"}
|
|
9
|
+
description = "EU ETS, FuelEU Maritime and CII compliance calculator for shipowners"
|
|
10
|
+
keywords = ["maritime", "eu-ets", "fueleu", "cii", "carbon", "offshore", "engineering"]
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Intended Audience :: Science/Research",
|
|
15
|
+
"License :: OSI Approved :: MIT License",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Topic :: Scientific/Engineering",
|
|
18
|
+
]
|
|
19
|
+
requires-python = ">=3.10"
|
|
20
|
+
dependencies = [
|
|
21
|
+
# Required by the euets-calc console script (cli.py imports click unconditionally)
|
|
22
|
+
"click>=8.1",
|
|
23
|
+
"pydantic>=2.0",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
test = ["pytest>=7.0", "pytest-cov>=4.0"]
|
|
28
|
+
dev = [
|
|
29
|
+
# superset used by `make install`
|
|
30
|
+
"click>=8.1",
|
|
31
|
+
"pydantic>=2.0",
|
|
32
|
+
"pytest>=7.0",
|
|
33
|
+
"pytest-cov>=4.0",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[project.scripts]
|
|
37
|
+
euets-calc = "euets_calculator.cli:main"
|
|
38
|
+
|
|
39
|
+
[project.urls]
|
|
40
|
+
Homepage = "https://ingeniat.pro"
|
|
41
|
+
Documentation = "https://ingeniat.pro/eu-ets-calculator/"
|
|
42
|
+
Source = "https://github.com/ingeniat-es/euets-calculator"
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.packages.find]
|
|
45
|
+
where = ["src"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""EU ETS Maritime Compliance Calculator."""
|
|
2
|
+
__version__ = "1.0.3"
|
|
3
|
+
|
|
4
|
+
from euets_calculator.engines.ets_engine import ETSEngine
|
|
5
|
+
from euets_calculator.engines.allocation_engine import CharterpartyAllocationEngine
|
|
6
|
+
from euets_calculator.engines.fuelleu_engine import FuelEUEngine
|
|
7
|
+
from euets_calculator.engines.cii_engine import CIIEngine
|
|
8
|
+
|
|
9
|
+
__all__ = ["ETSEngine", "CharterpartyAllocationEngine", "FuelEUEngine", "CIIEngine"]
|