valanga 0.1.8__tar.gz → 0.1.10__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.
Files changed (23) hide show
  1. {valanga-0.1.8 → valanga-0.1.10}/PKG-INFO +1 -1
  2. {valanga-0.1.8 → valanga-0.1.10}/pyproject.toml +1 -1
  3. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/representation_factory.py +12 -10
  4. {valanga-0.1.8 → valanga-0.1.10}/src/valanga.egg-info/PKG-INFO +1 -1
  5. {valanga-0.1.8 → valanga-0.1.10}/LICENSE +0 -0
  6. {valanga-0.1.8 → valanga-0.1.10}/README.md +0 -0
  7. {valanga-0.1.8 → valanga-0.1.10}/setup.cfg +0 -0
  8. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/__init__.py +0 -0
  9. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/evaluations.py +0 -0
  10. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/evaluator_types.py +0 -0
  11. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/game.py +0 -0
  12. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/over_event.py +0 -0
  13. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/policy.py +0 -0
  14. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/progress_messsage.py +0 -0
  15. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/py.typed +0 -0
  16. {valanga-0.1.8 → valanga-0.1.10}/src/valanga/represention_for_evaluation.py +0 -0
  17. {valanga-0.1.8 → valanga-0.1.10}/src/valanga.egg-info/SOURCES.txt +0 -0
  18. {valanga-0.1.8 → valanga-0.1.10}/src/valanga.egg-info/dependency_links.txt +0 -0
  19. {valanga-0.1.8 → valanga-0.1.10}/src/valanga.egg-info/requires.txt +0 -0
  20. {valanga-0.1.8 → valanga-0.1.10}/src/valanga.egg-info/top_level.txt +0 -0
  21. {valanga-0.1.8 → valanga-0.1.10}/tests/test_over_event.py +0 -0
  22. {valanga-0.1.8 → valanga-0.1.10}/tests/test_placeholder.py +0 -0
  23. {valanga-0.1.8 → valanga-0.1.10}/tests/test_representation_factory.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: valanga
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: Shared types and utilities for evaluation
5
5
  Author-email: Victor Gabillon <victorgabillon@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "valanga"
7
- version = "0.1.8"
7
+ version = "0.1.10"
8
8
  description = "Shared types and utilities for evaluation"
9
9
  requires-python = ">=3.13"
10
10
  dependencies = []
@@ -5,18 +5,20 @@ Factory for creating content representations from game states and state modifica
5
5
  from dataclasses import dataclass
6
6
  from typing import Protocol
7
7
 
8
+ from valanga.represention_for_evaluation import ContentRepresentation
9
+
8
10
  from .game import State
9
11
 
10
12
 
11
- class CreateFromState[StateT: State, RepT](Protocol):
13
+ class CreateFromState[StateT: State, EvalIn](Protocol):
12
14
  """
13
15
  Protocol for creating a state representation from a state.
14
16
  """
15
17
 
16
- def __call__(self, state: StateT) -> RepT: ...
18
+ def __call__(self, state: StateT) -> ContentRepresentation[StateT, EvalIn]: ...
17
19
 
18
20
 
19
- class CreateFromStateAndModifications[StateT: State, StateModT, RepT](Protocol):
21
+ class CreateFromStateAndModifications[StateT: State, EvalIn, StateModT](Protocol):
20
22
  """
21
23
  Protocol for creating a state representation from a state and modifications.
22
24
  """
@@ -25,29 +27,29 @@ class CreateFromStateAndModifications[StateT: State, StateModT, RepT](Protocol):
25
27
  self,
26
28
  state: StateT,
27
29
  state_modifications: StateModT,
28
- previous_state_representation: RepT,
29
- ) -> RepT: ...
30
+ previous_state_representation: ContentRepresentation[StateT, EvalIn],
31
+ ) -> ContentRepresentation[StateT, EvalIn]: ...
30
32
 
31
33
 
32
34
  @dataclass
33
- class RepresentationFactory[StateT: State, StateModT, RepT]:
35
+ class RepresentationFactory[StateT: State, EvalIn, StateModT]:
34
36
  """Factory for creating content representations from states and state modifications.
35
37
  Attributes:
36
38
  create_from_state: Function to create a content representation from a state.
37
39
  create_from_state_and_modifications: Function to create a content representation from a state and state modifications.
38
40
  """
39
41
 
40
- create_from_state: CreateFromState[StateT, RepT]
42
+ create_from_state: CreateFromState[StateT, EvalIn]
41
43
  create_from_state_and_modifications: CreateFromStateAndModifications[
42
- StateT, StateModT, RepT
44
+ StateT, EvalIn, StateModT
43
45
  ]
44
46
 
45
47
  def create_from_transition(
46
48
  self,
47
49
  state: StateT,
48
- previous_state_representation: RepT | None,
50
+ previous_state_representation: ContentRepresentation[StateT, EvalIn] | None,
49
51
  modifications: StateModT | None,
50
- ) -> RepT:
52
+ ) -> ContentRepresentation[StateT, EvalIn]:
51
53
  """Creates a content representation from a state transition.
52
54
  Args:
53
55
  state: The current state of the game.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: valanga
3
- Version: 0.1.8
3
+ Version: 0.1.10
4
4
  Summary: Shared types and utilities for evaluation
5
5
  Author-email: Victor Gabillon <victorgabillon@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes