Skip to content

Commit

Permalink
Merge pull request #17 from robcalon/bugfix/1.3.0
Browse files Browse the repository at this point in the history
Bugfix/1.3.0
  • Loading branch information
robcalon authored Oct 17, 2023
2 parents 579bfa1 + 8093583 commit 40806df
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "pyetm"
version = "1.3.0"
version = "1.3.1"

description = "Python-ETM Connector"
authors = [{name = "Rob Calon", email = "[email protected]"}]
Expand Down
4 changes: 3 additions & 1 deletion src/pyetm/client/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def get_input_parameters(
return parameters

# set missing defaults
parameters["user"] = parameters["user"].fillna(parameters["default"])
parameters.loc[:, "user"] = parameters.loc[:, "user"].fillna(
parameters["default"]
)

# subset user set inputs
user = parameters["user"]
Expand Down
4 changes: 0 additions & 4 deletions src/pyetm/sessions/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ def __init__(
# # set session
self._session: ClientSession | None = None

# start loop thread if not already running
if not self.loop_thread.is_alive():
self.loop_thread.start()

async def __aenter__(self):
"""enter async context manager"""

Expand Down
4 changes: 2 additions & 2 deletions src/pyetm/utils/interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def interpolate(

# merge inputs and mask get input parameters
inputs = pd.concat([cln.input_parameters for cln in clients], axis=1, keys=years)
params = clients[0].get_input_parameters(include_disabled=True, detailed=True)
params = clients[0].get_input_parameters(include_disabled=False, detailed=True)

# split input parameters by value type
mask = params["unit"].isin(["enum", "x"])
mask = params["unit"].isin(["enum", "x", "bool"])
cinputs, dinputs = inputs.loc[~mask], inputs.loc[mask]

# check for equality of discrete values
Expand Down

0 comments on commit 40806df

Please sign in to comment.