Skip to content

Commit 7dfe553

Browse files
committed
Fix pattern path in lenia and flow_lenia notebooks
1 parent efad022 commit 7dfe553

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

examples/20_lenia.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"cell_type": "markdown",
119119
"metadata": {},
120120
"source": [
121-
"This section demonstrates how to visualize well-known Lenia creatures by loading rule parameters and patterns from `cax/systems/lenia/assets`.\n",
121+
"This section demonstrates how to visualize well-known Lenia creatures by loading rule parameters and patterns from `cax/systems/lenia/patterns`.\n",
122122
"\n",
123123
"You can also experiment with combining rule parameters from one soliton with the pattern of another to observe novel emergent behaviors."
124124
]
@@ -129,8 +129,8 @@
129129
"metadata": {},
130130
"outputs": [],
131131
"source": [
132-
"assets = [\"5N7KKM\", \"5N7KKM_gyrating\", \"5N7KKM_twin\", \"VT049W\"]\n",
133-
"asset = assets[0]"
132+
"patterns = [\"5N7KKM\", \"5N7KKM_gyrating\", \"5N7KKM_twin\", \"VT049W\"]\n",
133+
"pattern = patterns[0]"
134134
]
135135
},
136136
{
@@ -140,7 +140,7 @@
140140
"outputs": [],
141141
"source": [
142142
"# Rule Params\n",
143-
"with resources.files(f\"cax.cs.lenia.assets.{asset}\").joinpath(\"rule_params.pickle\").open(\"rb\") as f:\n",
143+
"with resources.files(f\"cax.cs.lenia.patterns.{pattern}\").joinpath(\"rule_params.pickle\").open(\"rb\") as f:\n",
144144
"\trule_params = pickle.load(f)"
145145
]
146146
},
@@ -151,7 +151,7 @@
151151
"outputs": [],
152152
"source": [
153153
"# Pattern\n",
154-
"with resources.files(f\"cax.cs.lenia.assets.{asset}\").joinpath(\"pattern.pickle\").open(\"rb\") as f:\n",
154+
"with resources.files(f\"cax.cs.lenia.patterns.{pattern}\").joinpath(\"pattern.pickle\").open(\"rb\") as f:\n",
155155
"\tpattern = pickle.load(f)"
156156
]
157157
},

examples/21_flow_lenia.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"cell_type": "markdown",
114114
"metadata": {},
115115
"source": [
116-
"This section demonstrates how to visualize well-known Lenia creatures by loading rule parameters and patterns from `cax/systems/lenia/assets`.\n",
116+
"This section demonstrates how to visualize well-known Lenia creatures by loading rule parameters and patterns from `cax/systems/lenia/patterns`.\n",
117117
"\n",
118118
"You can run either the VT049W or 5N7KKM section below. You can also experiment with combining rule parameters from one soliton with the pattern of another to observe novel emergent behaviors."
119119
]
@@ -124,8 +124,8 @@
124124
"metadata": {},
125125
"outputs": [],
126126
"source": [
127-
"assets = [\"5N7KKM\", \"5N7KKM_gyrating\", \"5N7KKM_twin\", \"VT049W\"]\n",
128-
"asset = assets[0]"
127+
"patterns = [\"5N7KKM\", \"5N7KKM_gyrating\", \"5N7KKM_twin\", \"VT049W\"]\n",
128+
"pattern = patterns[0]"
129129
]
130130
},
131131
{
@@ -135,7 +135,7 @@
135135
"outputs": [],
136136
"source": [
137137
"# Rule Params\n",
138-
"with resources.files(f\"cax.cs.lenia.assets.{asset}\").joinpath(\"rule_params.pickle\").open(\"rb\") as f:\n",
138+
"with resources.files(f\"cax.cs.lenia.patterns.{pattern}\").joinpath(\"rule_params.pickle\").open(\"rb\") as f:\n",
139139
"\trule_params = pickle.load(f)"
140140
]
141141
},
@@ -146,7 +146,7 @@
146146
"outputs": [],
147147
"source": [
148148
"# Pattern\n",
149-
"with resources.files(f\"cax.cs.lenia.assets.{asset}\").joinpath(\"pattern.pickle\").open(\"rb\") as f:\n",
149+
"with resources.files(f\"cax.cs.lenia.patterns.{pattern}\").joinpath(\"pattern.pickle\").open(\"rb\") as f:\n",
150150
"\tpattern = pickle.load(f)"
151151
]
152152
},

pyproject.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[build-system]
2-
requires = ["hatchling"]
3-
build-backend = "hatchling.build"
4-
51
[project]
62
name = "cax"
73
version = "0.3.1"
@@ -36,10 +32,10 @@ classifiers = [
3632

3733
[project.optional-dependencies]
3834
dev = [
39-
"pytest>=8.3.0",
40-
"pytest-cov>=5.0.0",
41-
"ruff>=0.6.0",
42-
"mypy>=1.11.0",
35+
"pytest>=8.3.0",
36+
"pytest-cov>=5.0.0",
37+
"ruff>=0.6.0",
38+
"mypy>=1.11.0",
4339
]
4440
examples = [
4541
"torchvision>=0.21.0",
@@ -53,6 +49,10 @@ examples = [
5349
[project.urls]
5450
Homepage = "https://github.com/maxencefaldor/cax"
5551

52+
[build-system]
53+
requires = ["hatchling"]
54+
build-backend = "hatchling.build"
55+
5656
[tool.ruff]
5757
src = ["src", "tests"]
5858
target-version = "py311"

0 commit comments

Comments
 (0)