Skip to content

Commit

Permalink
added dev environment, fix polars native expr.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamamer20 committed Jul 9, 2024
1 parent bf1ccd9 commit f6413b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/scripts/readme_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,9 @@ def give_money(self):

# Add the income to the other agents
# 1. Using native expressions
"""self.agents = self.agents.with_columns(
pl.when(pl.col("unique_id").is_in(new_wealth["unique_id"]))
.then(pl.col("wealth") + new_wealth["wealth"])
.otherwise(pl.col("wealth"))
)"""
"""self.agents = self.agents.join(new_wealth, on="unique_id", how="left").fill_null(
0
).with_columns(wealth=pl.col("wealth") + pl.col("len")).drop("len")"""

# 2. Using the set method
"""self.set(
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,8 @@ dev = [
"mesa",
]

[tool.hatch.envs.dev] #Allows installing dev as virtual env
features = ["dev"]

[tool.hatch.build.targets.wheel]
packages = ["mesa_frames"]

0 comments on commit f6413b1

Please sign in to comment.