Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.8.0
hooks:
- id: ruff-format
types_or: [python, pyi, jupyter]
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.42.0
rev: v0.43.0
hooks:
- id: markdownlint-fix
- repo: https://github.com/kynan/nbstripout
Expand Down
2 changes: 1 addition & 1 deletion src/muse/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"AbstractAgent",
"Agent",
"InvestingAgent",
"factory",
"agents_factory",
"create_agent",
"factory",
]

from muse.agents.agent import AbstractAgent, Agent, InvestingAgent
Expand Down
12 changes: 6 additions & 6 deletions src/muse/decisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ def weighted_sum(objectives: Dataset, parameters: Any, **kwargs) -> DataArray:
"""

__all__ = [
"register_decision",
"mean",
"weighted_sum",
"lexical_comparison",
"retro_lexical_comparison",
"epsilon_constraints",
"factory",
"lexical_comparison",
"mean",
"register_decision",
"retro_epsilon_constraints",
"retro_lexical_comparison",
"single_objective",
"factory",
"weighted_sum",
]
from collections.abc import Mapping, MutableMapping, Sequence
from typing import (
Expand Down
4 changes: 2 additions & 2 deletions src/muse/demand_share.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def demand_share(
"""

__all__ = [
"new_and_retro",
"DEMAND_SHARE_SIGNATURE",
"factory",
"new_and_retro",
"register_demand_share",
"unmet_demand",
"unmet_forecasted_demand",
"DEMAND_SHARE_SIGNATURE",
]
from collections.abc import Hashable, Mapping, MutableMapping, Sequence
from typing import (
Expand Down
16 changes: 8 additions & 8 deletions src/muse/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,20 +74,20 @@ def search_space_initializer(
"""

__all__ = [
"compress",
"currently_existing_tech",
"currently_referenced_tech",
"factory",
"register_filter",
"register_initializer",
"identity",
"initialize_from_technologies",
"maturity",
"reduce_asset",
"similar_technology",
"register_filter",
"register_initializer",
"same_enduse",
"same_fuels",
"currently_existing_tech",
"currently_referenced_tech",
"maturity",
"compress",
"similar_technology",
"with_asset_technology",
"initialize_from_technologies",
]

from collections.abc import Mapping, MutableMapping, Sequence
Expand Down
12 changes: 6 additions & 6 deletions src/muse/hooks.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""Pre and post hooks on agents."""

__all__ = [
"register_initial_asset_transform",
"register_final_asset_transform",
"noop",
"asset_merge_factory",
"clean",
"old_assets_only",
"housekeeping_factory",
"merge_assets",
"new_assets_only",
"housekeeping_factory",
"asset_merge_factory",
"noop",
"old_assets_only",
"register_final_asset_transform",
"register_initial_asset_transform",
]
from collections.abc import Mapping, MutableMapping
from typing import Callable, Union
Expand Down
4 changes: 2 additions & 2 deletions src/muse/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"""

__all__ = [
"register_interaction_net",
"register_agent_interaction",
"factory",
"new_to_retro_net",
"register_agent_interaction",
"register_interaction_net",
"transfer_assets",
]

Expand Down
2 changes: 1 addition & 1 deletion src/muse/investments.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def investment(
"""

__all__ = [
"INVESTMENT_SIGNATURE",
"adhoc_match_demand",
"cliff_retirement_profile",
"register_investment",
"INVESTMENT_SIGNATURE",
]
from collections.abc import Mapping, MutableMapping
from typing import (
Expand Down
12 changes: 6 additions & 6 deletions src/muse/objectives.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ def comfort(
"""

__all__ = [
"register_objective",
"capacity_to_service_demand",
"capital_costs",
"comfort",
"efficiency",
"fixed_costs",
"capital_costs",
"emission_cost",
"equivalent_annual_cost",
"factory",
"fixed_costs",
"fuel_consumption_cost",
"lifetime_levelized_cost_of_energy",
"net_present_value",
"equivalent_annual_cost",
"capacity_to_service_demand",
"factory",
"register_objective",
]

from collections.abc import Mapping, MutableMapping, Sequence
Expand Down
2 changes: 1 addition & 1 deletion src/muse/outputs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__all__ = ["sector", "sinks", "register_output_sink"]
__all__ = ["register_output_sink", "sector", "sinks"]
from muse.outputs import sector, sinks
from muse.outputs.sinks import register_output_sink
2 changes: 1 addition & 1 deletion src/muse/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ def production(
"""

__all__ = [
"PRODUCTION_SIGNATURE",
"demand_matched_production",
"factory",
"maximum_production",
"register_production",
"supply",
"PRODUCTION_SIGNATURE",
]
from collections.abc import Mapping, MutableMapping
from typing import Any, Callable, Union, cast
Expand Down
18 changes: 9 additions & 9 deletions src/muse/readers/csv.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""Ensemble of functions to read MUSE data."""

__all__ = [
"read_technodictionary",
"read_io_technodata",
"read_initial_assets",
"read_technologies",
"read_attribute_table",
"read_csv_agent_parameters",
"read_csv_timeslices",
"read_global_commodities",
"read_timeslice_shares",
"read_csv_agent_parameters",
"read_macro_drivers",
"read_initial_assets",
"read_initial_market",
"read_attribute_table",
"read_regression_parameters",
"read_io_technodata",
"read_macro_drivers",
"read_presets",
"read_regression_parameters",
"read_technodictionary",
"read_technologies",
"read_timeslice_shares",
]

from collections.abc import Sequence
Expand Down
6 changes: 3 additions & 3 deletions src/muse/regressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
from xarray import DataArray, Dataset

__all__ = [
"factory",
"Exponential",
"ExponentialAdj",
"Linear",
"Logistic",
"Loglog",
"LogisticSigmoid",
"Linear",
"Loglog",
"endogenous_demand",
"factory",
"register_regression",
]

Expand Down
6 changes: 3 additions & 3 deletions src/muse/sectors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
"""

__all__ = [
"SECTORS_REGISTERED",
"AbstractSector",
"Sector",
"PresetSector",
"LegacySector",
"PresetSector",
"Sector",
"register_sector",
"SECTORS_REGISTERED",
]
from muse.sectors.abstract import AbstractSector
from muse.sectors.legacy_sector import LegacySector
Expand Down
6 changes: 3 additions & 3 deletions src/muse/timeslices.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""Timeslice utility functions."""

__all__ = [
"reference_timeslice",
"aggregate_transforms",
"convert_timeslice",
"timeslice_projector",
"setup_module",
"reference_timeslice",
"represent_hours",
"setup_module",
"timeslice_projector",
]

from collections.abc import Mapping, Sequence
Expand Down