microecs 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {microecs-0.3.3 → microecs-0.3.4}/PKG-INFO +2 -10
- {microecs-0.3.3 → microecs-0.3.4}/microecs/query_result.py +3 -3
- {microecs-0.3.3 → microecs-0.3.4}/microecs/world.py +3 -3
- {microecs-0.3.3 → microecs-0.3.4}/microecs.egg-info/PKG-INFO +2 -10
- {microecs-0.3.3 → microecs-0.3.4}/setup.py +1 -1
- {microecs-0.3.3 → microecs-0.3.4}/LICENSE.TXT +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/README.md +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs/__init__.py +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs/component.py +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs/pool.py +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs/utils.py +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs.egg-info/SOURCES.txt +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs.egg-info/dependency_links.txt +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs.egg-info/requires.txt +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/microecs.egg-info/top_level.txt +0 -0
- {microecs-0.3.3 → microecs-0.3.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: microecs
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: MicroECS: Minimal Entity Component System (ECS) in python and numpy
|
|
5
5
|
Home-page: https://gitlab.com/meehai/microecs
|
|
6
6
|
License: MIT
|
|
@@ -9,14 +9,6 @@ Description-Content-Type: text/markdown
|
|
|
9
9
|
License-File: LICENSE.TXT
|
|
10
10
|
Requires-Dist: numpy>=2.2.0
|
|
11
11
|
Requires-Dist: loggez>=0.8
|
|
12
|
-
Dynamic: description
|
|
13
|
-
Dynamic: description-content-type
|
|
14
|
-
Dynamic: home-page
|
|
15
|
-
Dynamic: license
|
|
16
|
-
Dynamic: license-file
|
|
17
|
-
Dynamic: requires-dist
|
|
18
|
-
Dynamic: requires-python
|
|
19
|
-
Dynamic: summary
|
|
20
12
|
|
|
21
13
|
# MicroECS
|
|
22
14
|
|
|
@@ -122,6 +122,6 @@ class QueryResult:
|
|
|
122
122
|
return self._len
|
|
123
123
|
|
|
124
124
|
def __repr__(self):
|
|
125
|
-
return (f"[QueryResult]\n- Entities: {len(self.entity_ids)}
|
|
126
|
-
f"\n-
|
|
127
|
-
f"\n- Dtypes: {list(self._field_dtypes.values())}")
|
|
125
|
+
return (f"[QueryResult]\n- Entities: {len(self.entity_ids)} (pools: {len(self.pool_list)})"
|
|
126
|
+
f"\n- Fields: {self._fields}"
|
|
127
|
+
f"\n- Shapes: {list(self._field_shapes.values())}\n- Dtypes: {list(self._field_dtypes.values())}")
|
|
@@ -24,7 +24,7 @@ class World:
|
|
|
24
24
|
self.pool_to_components: dict[Pool, list[ComponentType]] = {}
|
|
25
25
|
# components management
|
|
26
26
|
self.component_names = [x.__name__ for x in components]
|
|
27
|
-
self.component_types =
|
|
27
|
+
self.component_types = set(components)
|
|
28
28
|
self.component_to_bit: dict[ComponentType, int] = {t: 2**i for i, t in enumerate(components)} # bit for querying
|
|
29
29
|
self.component_to_shapes: dict[ComponentType, list[Shape]] = {
|
|
30
30
|
c: [f.metadata["shape"] for f in fields(c)] for c in components}
|
|
@@ -174,8 +174,8 @@ class World:
|
|
|
174
174
|
# other low-level methods
|
|
175
175
|
|
|
176
176
|
def _check_components_against_pool(self, components: list[ComponentType], **entity_fields):
|
|
177
|
-
assert len(cs := components) > 0, f"Entity has no components: {self.component_names}"
|
|
178
|
-
assert
|
|
177
|
+
assert len(cs := set(components)) > 0, f"Entity has no components: {self.component_names}"
|
|
178
|
+
assert (diff := cs - self.component_types) == set(), f"Missing comps:\n{cs=}\n{self.component_types=}\n{diff=}"
|
|
179
179
|
expected_fields = set()
|
|
180
180
|
for component in components:
|
|
181
181
|
for _field in self.component_to_field_names[component]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: microecs
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: MicroECS: Minimal Entity Component System (ECS) in python and numpy
|
|
5
5
|
Home-page: https://gitlab.com/meehai/microecs
|
|
6
6
|
License: MIT
|
|
@@ -9,14 +9,6 @@ Description-Content-Type: text/markdown
|
|
|
9
9
|
License-File: LICENSE.TXT
|
|
10
10
|
Requires-Dist: numpy>=2.2.0
|
|
11
11
|
Requires-Dist: loggez>=0.8
|
|
12
|
-
Dynamic: description
|
|
13
|
-
Dynamic: description-content-type
|
|
14
|
-
Dynamic: home-page
|
|
15
|
-
Dynamic: license
|
|
16
|
-
Dynamic: license-file
|
|
17
|
-
Dynamic: requires-dist
|
|
18
|
-
Dynamic: requires-python
|
|
19
|
-
Dynamic: summary
|
|
20
12
|
|
|
21
13
|
# MicroECS
|
|
22
14
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|