Skip to content

Commit 940bc74

Browse files
committed
move TimexLCA parameter docstrings to init
1 parent bdaeb56 commit 940bc74

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

timex_lca/timex_lca.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -57,23 +57,6 @@ class TimexLCA:
5757
but without additional temporal dynamics of the biosphere flows
5858
3) a dynamic time-explicit LCA score (`TimexLCA.dynamic_score`), with dynamic inventory and dynamic charaterization factors. These are provided for radiative forcing and GWP but can also be user-defined.
5959
60-
Parameters
61-
----------
62-
demand : dict[object: float]
63-
The demand for which the LCA will be calculated. The keys can be Brightway `Node`
64-
instances, `(database, code)` tuples, or integer ids.
65-
method : tuple
66-
Tuple defining the LCIA method, such as `('foo', 'bar')` or default methods, such as `("EF v3.1", "climate change", "global warming potential (GWP100)")`
67-
database_date_dict : dict, optional
68-
Dictionary mapping database names to dates.
69-
edge_filter_function : Callable, optional
70-
Function to skip edges in the graph traversal. Default is to skip all edges within background databases.
71-
temporal_grouping : str, optional
72-
Time resolution for grouping exchanges over time in the timeline. Default is 'year', other options are 'month', 'day', 'hour'.
73-
interpolation_type : str, optional
74-
Type of interpolation when sourcing the new producers in the time-explicit background databases. Default is 'linear',
75-
which means linear interpolation between the closest 2 databases, other options are 'closest', which selects only the closest database.
76-
7760
Example
7861
-------
7962
@@ -100,8 +83,25 @@ def __init__(
10083
temporal_grouping: str = "year",
10184
interpolation_type: str = "linear",
10285
) -> None:
103-
"""__init__ initializes the `TimexLCA` object, and calculates a static LCA. It also initializes an instance of the `TimelineBuilder`, and stores useful subsets of ids.
104-
Parameters are described in the `TimexLCA` class docstring.
86+
"""
87+
Initializes the `TimexLCA` object. Calculates a static LCA, creates time mapping dicts for activities and biosphere flows, and stores useful subsets of ids in the node_id_collection_dict.
88+
89+
Parameters
90+
----------
91+
demand : dict[object: float]
92+
The demand for which the LCA will be calculated. The keys can be Brightway `Node`
93+
instances, `(database, code)` tuples, or integer ids.
94+
method : tuple
95+
Tuple defining the LCIA method, such as `('foo', 'bar')` or default methods, such as `("EF v3.1", "climate change", "global warming potential (GWP100)")`
96+
database_date_dict : dict, optional
97+
Dictionary mapping database names to dates.
98+
edge_filter_function : Callable, optional
99+
Function to skip edges in the graph traversal. Default is to skip all edges within background databases.
100+
temporal_grouping : str, optional
101+
Time resolution for grouping exchanges over time in the timeline. Default is 'year', other options are 'month', 'day', 'hour'.
102+
interpolation_type : str, optional
103+
Type of interpolation when sourcing the new producers in the time-explicit background databases. Default is 'linear',
104+
which means linear interpolation between the closest 2 databases, other options are 'closest', which selects only the closest database.
105105
106106
"""
107107
self.demand = demand
@@ -433,7 +433,7 @@ class and then multiplying it with the dynamic supply array. The dynamic invento
433433
self.temporal_grouping,
434434
self.database_date_dict,
435435
self.database_date_dict_static_only,
436-
)
436+
)
437437
self.dynamic_biomatrix = (
438438
self.dynamic_biosphere_builder.build_dynamic_biosphere_matrix()
439439
)

0 commit comments

Comments
 (0)