scrall 0.9.0__tar.gz → 0.9.1__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.

Potentially problematic release.


This version of scrall might be problematic. Click here for more details.

Files changed (29) hide show
  1. {scrall-0.9.0/src/scrall.egg-info → scrall-0.9.1}/PKG-INFO +1 -1
  2. {scrall-0.9.0 → scrall-0.9.1}/pyproject.toml +1 -1
  3. scrall-0.9.1/src/scrall/__init__.py +1 -0
  4. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/parse/scrall.peg +1 -1
  5. {scrall-0.9.0 → scrall-0.9.1/src/scrall.egg-info}/PKG-INFO +1 -1
  6. {scrall-0.9.0 → scrall-0.9.1}/src/scrall.egg-info/SOURCES.txt +2 -0
  7. scrall-0.9.1/tests/test_decision_wrap.py +39 -0
  8. scrall-0.9.1/tests/test_decision_wrap_false.py +47 -0
  9. {scrall-0.9.0 → scrall-0.9.1}/tests/test_signals.py +22 -2
  10. scrall-0.9.0/src/scrall/__init__.py +0 -1
  11. {scrall-0.9.0 → scrall-0.9.1}/LICENSE +0 -0
  12. {scrall-0.9.0 → scrall-0.9.1}/MANIFEST.in +0 -0
  13. {scrall-0.9.0 → scrall-0.9.1}/README.md +0 -0
  14. {scrall-0.9.0 → scrall-0.9.1}/setup.cfg +0 -0
  15. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/__main__.py +0 -0
  16. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/exceptions.py +0 -0
  17. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/log.conf +0 -0
  18. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/parse/__init__.py +0 -0
  19. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/parse/parser.py +0 -0
  20. {scrall-0.9.0 → scrall-0.9.1}/src/scrall/parse/visitor.py +0 -0
  21. {scrall-0.9.0 → scrall-0.9.1}/src/scrall.egg-info/dependency_links.txt +0 -0
  22. {scrall-0.9.0 → scrall-0.9.1}/src/scrall.egg-info/entry_points.txt +0 -0
  23. {scrall-0.9.0 → scrall-0.9.1}/src/scrall.egg-info/requires.txt +0 -0
  24. {scrall-0.9.0 → scrall-0.9.1}/src/scrall.egg-info/top_level.txt +0 -0
  25. {scrall-0.9.0 → scrall-0.9.1}/tests/test_calls.py +0 -0
  26. {scrall-0.9.0 → scrall-0.9.1}/tests/test_delete.py +0 -0
  27. {scrall-0.9.0 → scrall-0.9.1}/tests/test_ping_actions.py +0 -0
  28. {scrall-0.9.0 → scrall-0.9.1}/tests/test_selection.py +0 -0
  29. {scrall-0.9.0 → scrall-0.9.1}/tests/test_state_actions.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.9.0
3
+ Version: 0.9.1
4
4
  Summary: Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML
5
5
  Author-email: Leon Starr <leon_starr@modelint.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "scrall"
7
- version = "0.9.0"
7
+ version = "0.9.1"
8
8
  description = "Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML"
9
9
  readme = "README.md"
10
10
  authors = [{ name = "Leon Starr", email = "leon_starr@modelint.com" }]
@@ -0,0 +1 @@
1
+ version = "0.9.1"
@@ -1,5 +1,5 @@
1
1
  activity = LINEWRAP* execution_unit* EOF
2
- execution_unit = LINEWRAP* statement_set sequence_token? LINEWRAP+
2
+ execution_unit = LINEWRAP* statement_set sequence_token? (SP+ / LINEWRAP*)
3
3
  statement_set = SP* sequenced_statement_set / component_statement_set
4
4
  sequenced_statement_set = sequence_token* (block / statement)
5
5
  component_statement_set = block / LINEWRAP* statement
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.9.0
3
+ Version: 0.9.1
4
4
  Summary: Starr's Concise Relational Action Language - For Shlaer-Mellor Executable UML
5
5
  Author-email: Leon Starr <leon_starr@modelint.com>
6
6
  License: MIT License
@@ -17,6 +17,8 @@ src/scrall/parse/parser.py
17
17
  src/scrall/parse/scrall.peg
18
18
  src/scrall/parse/visitor.py
19
19
  tests/test_calls.py
20
+ tests/test_decision_wrap.py
21
+ tests/test_decision_wrap_false.py
20
22
  tests/test_delete.py
21
23
  tests/test_ping_actions.py
22
24
  tests/test_selection.py
@@ -0,0 +1,39 @@
1
+ """ test_decision_wrap.py -- Test line wrapping """
2
+
3
+ import pytest
4
+ from scrall.parse.parser import ScrallParser
5
+ from scrall.parse.visitor import *
6
+
7
+ # The expected result is teh same for each input case
8
+ expected_parse = Execution_Unit_a(
9
+ statement_set=Seq_Statement_Set_a(
10
+ input_tokens=[],
11
+ statement=Decision_a(
12
+ input=N_a(name='choice'),
13
+ true_result=Comp_Statement_Set_a(
14
+ statement=None,
15
+ block=[
16
+ Execution_Unit_a(
17
+ statement_set=Seq_Statement_Set_a(
18
+ input_tokens=[],
19
+ statement=New_inst_a(
20
+ cname=N_a(name='cat'), attrs=[], rels=None),
21
+ block=None
22
+ ),
23
+ output_token=None
24
+ )
25
+ ]), false_result=None), block=None
26
+ ), output_token=None
27
+ )
28
+
29
+ # Different line wrapping of the same content
30
+ @pytest.mark.parametrize("text", [
31
+ "choice? { *cat }",
32
+ "choice? {\n*cat }",
33
+ "choice? {\n *cat\n}",
34
+ "choice?\n { *cat }",
35
+ ])
36
+ def test_signal_action(text):
37
+ parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
38
+ print(parse)
39
+ assert parse[0] == expected_parse
@@ -0,0 +1,47 @@
1
+ """ test_decision_wrap_false.py -- Test line wrapping with true false decision cases """
2
+
3
+ import pytest
4
+ from scrall.parse.parser import ScrallParser
5
+ from scrall.parse.visitor import *
6
+
7
+ # The expected result is teh same for each input case
8
+ expected_parse = Execution_Unit_a(
9
+ statement_set=Seq_Statement_Set_a(
10
+ input_tokens=[],
11
+ statement=Decision_a(
12
+ input=N_a(name='choice'),
13
+ true_result=Comp_Statement_Set_a(
14
+ statement=None,
15
+ block=[
16
+ Execution_Unit_a(
17
+ statement_set=Seq_Statement_Set_a(
18
+ input_tokens=[],
19
+ statement=New_inst_a(
20
+ cname=N_a(name='cat'), attrs=[], rels=None),
21
+ block=None), output_token=None
22
+ )
23
+ ]),
24
+ false_result=Comp_Statement_Set_a(
25
+ statement=None,
26
+ block=[
27
+ Execution_Unit_a(
28
+ statement_set=Seq_Statement_Set_a(
29
+ input_tokens=[],
30
+ statement=New_inst_a(
31
+ cname=N_a(name='dog'), attrs=[], rels=None),
32
+ block=None), output_token=None
33
+ )
34
+ ])
35
+ ), block=None), output_token=None)
36
+
37
+ # Different line wrapping of the same content
38
+ @pytest.mark.parametrize("text", [
39
+ "choice? { *cat } : { *dog }",
40
+ "choice? { *cat } : {\n *dog\n }",
41
+ "choice? { *cat } : {\n *dog }",
42
+ "choice? { *cat } :\n {\n *dog\n }",
43
+ ])
44
+ def test_signal_action(text):
45
+ parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
46
+ print(parse)
47
+ assert parse[0] == expected_parse
@@ -2,8 +2,8 @@
2
2
 
3
3
  import pytest
4
4
  from scrall.parse.parser import ScrallParser
5
- from scrall.parse.visitor import Execution_Unit_a, Signal_a, Signal_Dest_a, N_a, INST_a, PATH_a, R_a, \
6
- Seq_Statement_Set_a, Supplied_Parameter_a, External_Signal_a
5
+ from scrall.parse.visitor import (Execution_Unit_a, Signal_a, Signal_Dest_a, N_a, INST_a, PATH_a, R_a,
6
+ Seq_Statement_Set_a, Supplied_Parameter_a, External_Signal_a, Decision_a, Comp_Statement_Set_a)
7
7
 
8
8
  actions = [
9
9
  ("Time to close ->* me",
@@ -53,6 +53,26 @@ actions = [
53
53
  block=None),
54
54
  output_token=None)
55
55
  ),
56
+ ("destination aslev?\n"
57
+ " Transfer created -> : No destination -> me",
58
+ Execution_Unit_a(
59
+ statement_set=Seq_Statement_Set_a(
60
+ input_tokens=[],
61
+ statement=Decision_a(
62
+ input=N_a(name='destination aslev'),
63
+ true_result=Comp_Statement_Set_a(
64
+ statement=Signal_a(
65
+ event='Transfer created',
66
+ supplied_params=[], dest=None), block=None),
67
+ false_result=Comp_Statement_Set_a(
68
+ statement=Signal_a(
69
+ event='No destination',
70
+ supplied_params=[],
71
+ dest=Signal_Dest_a(
72
+ target_iset=N_a(name='me'), assigner_dest=None, delay=0, cancel=False
73
+ )), block=None
74
+ )), block=None), output_token=None)
75
+ ),
56
76
  ]
57
77
 
58
78
 
@@ -1 +0,0 @@
1
- version = "0.9.0"
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