scrall 0.9.2__tar.gz → 0.9.3__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 (31) hide show
  1. {scrall-0.9.2/src/scrall.egg-info → scrall-0.9.3}/PKG-INFO +1 -1
  2. {scrall-0.9.2 → scrall-0.9.3}/pyproject.toml +1 -1
  3. scrall-0.9.3/src/scrall/__init__.py +1 -0
  4. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/parse/scrall.peg +2 -2
  5. {scrall-0.9.2 → scrall-0.9.3/src/scrall.egg-info}/PKG-INFO +1 -1
  6. {scrall-0.9.2 → scrall-0.9.3}/src/scrall.egg-info/SOURCES.txt +1 -0
  7. {scrall-0.9.2 → scrall-0.9.3}/tests/test_calls.py +1 -1
  8. scrall-0.9.3/tests/test_decision_scalar_expr.py +65 -0
  9. {scrall-0.9.2 → scrall-0.9.3}/tests/test_decision_wrap.py +1 -1
  10. {scrall-0.9.2 → scrall-0.9.3}/tests/test_operation.py +1 -1
  11. scrall-0.9.2/src/scrall/__init__.py +0 -1
  12. {scrall-0.9.2 → scrall-0.9.3}/LICENSE +0 -0
  13. {scrall-0.9.2 → scrall-0.9.3}/MANIFEST.in +0 -0
  14. {scrall-0.9.2 → scrall-0.9.3}/README.md +0 -0
  15. {scrall-0.9.2 → scrall-0.9.3}/setup.cfg +0 -0
  16. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/__main__.py +0 -0
  17. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/exceptions.py +0 -0
  18. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/log.conf +0 -0
  19. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/parse/__init__.py +0 -0
  20. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/parse/parser.py +0 -0
  21. {scrall-0.9.2 → scrall-0.9.3}/src/scrall/parse/visitor.py +0 -0
  22. {scrall-0.9.2 → scrall-0.9.3}/src/scrall.egg-info/dependency_links.txt +0 -0
  23. {scrall-0.9.2 → scrall-0.9.3}/src/scrall.egg-info/entry_points.txt +0 -0
  24. {scrall-0.9.2 → scrall-0.9.3}/src/scrall.egg-info/requires.txt +0 -0
  25. {scrall-0.9.2 → scrall-0.9.3}/src/scrall.egg-info/top_level.txt +0 -0
  26. {scrall-0.9.2 → scrall-0.9.3}/tests/test_decision_wrap_false.py +0 -0
  27. {scrall-0.9.2 → scrall-0.9.3}/tests/test_delete.py +0 -0
  28. {scrall-0.9.2 → scrall-0.9.3}/tests/test_ping_actions.py +0 -0
  29. {scrall-0.9.2 → scrall-0.9.3}/tests/test_selection.py +0 -0
  30. {scrall-0.9.2 → scrall-0.9.3}/tests/test_signals.py +0 -0
  31. {scrall-0.9.2 → scrall-0.9.3}/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.2
3
+ Version: 0.9.3
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.2"
7
+ version = "0.9.3"
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.3"
@@ -44,8 +44,8 @@ RENAME = '>>'
44
44
 
45
45
  // Decision action
46
46
  decision = scalar_expr true_result false_result?
47
- true_result = DECISION_OP LINEWRAP? SP? component_statement_set
48
- false_result = SP FALSE_RESULT_OP LINEWRAP? SP? component_statement_set // Else
47
+ true_result = DECISION_OP LINEWRAP? SP? component_statement_set SP*
48
+ false_result = FALSE_RESULT_OP LINEWRAP? SP? component_statement_set // Else
49
49
  FALSE_RESULT_OP = ':'
50
50
 
51
51
  // Switch action
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scrall
3
- Version: 0.9.2
3
+ Version: 0.9.3
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,7 @@ 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_scalar_expr.py
20
21
  tests/test_decision_wrap.py
21
22
  tests/test_decision_wrap_false.py
22
23
  tests/test_delete.py
@@ -33,7 +33,7 @@ actions = [
33
33
  ]
34
34
 
35
35
  @pytest.mark.parametrize("text, expected", actions)
36
- def test_signal_action(text, expected):
36
+ def test_call_action(text, expected):
37
37
  parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
38
38
  print(parse)
39
39
  assert parse[0] == expected
@@ -0,0 +1,65 @@
1
+ """ test_decision_scalar_expr.py -- Ensure scalar expression works as true result in a decision"""
2
+
3
+ # This verifies that we don't have a regression on a bug fix where scalar_expr true results were eating the colon
4
+ # and failing the parse
5
+
6
+ import pytest
7
+ from scrall.parse.parser import ScrallParser
8
+ from scrall.parse.visitor import *
9
+
10
+ actions = [
11
+ ("fwd dest? =>> fwd dest : {\n"
12
+ " rev dest .= Ping( dir: Travel direction.opposite )\n"
13
+ " !rev dest? Travel direction.toggle : =>> rev dest\n"
14
+ "}",
15
+ Execution_Unit_a(
16
+ statement_set=Seq_Statement_Set_a(
17
+ input_tokens=[],
18
+ statement=Decision_a(
19
+ input=N_a(name='fwd dest'),
20
+ true_result=Comp_Statement_Set_a(
21
+ statement=Output_Flow_a(output=N_a(name='fwd dest')), block=None),
22
+ false_result=Comp_Statement_Set_a(
23
+ statement=None, block=[
24
+ Execution_Unit_a(
25
+ statement_set=Seq_Statement_Set_a(
26
+ input_tokens=[],
27
+ statement=Inst_Assignment_a(
28
+ lhs=Flow_Output_a(name=N_a(name='rev dest'), exp_type=None), card='1',
29
+ rhs=INST_a(components=
30
+ [N_a(name='Ping'),
31
+ Criteria_Selection_a(
32
+ card='ALL',
33
+ criteria=BOOL_a(op='==',
34
+ operands=[N_a(name='dir'),
35
+ INST_PROJ_a(
36
+ iset=N_a(name='Travel direction'),
37
+ projection=Projection_a(
38
+ expand=None,
39
+ attrs=[N_a(name='opposite')]))]))]), X=(31, 81)), block=None),
40
+ output_token=None),
41
+ Execution_Unit_a(
42
+ statement_set=Seq_Statement_Set_a(
43
+ input_tokens=[],
44
+ statement=Decision_a(
45
+ input=BOOL_a(op='NOT', operands=N_a(name='rev dest')),
46
+ true_result=Comp_Statement_Set_a(
47
+ statement=Call_a(
48
+ call=N_a(name='Travel direction'),
49
+ op_chain=Op_chain_a(components=[N_a(name='toggle')])), block=None),
50
+ false_result=Comp_Statement_Set_a(
51
+ statement=Output_Flow_a(
52
+ output=N_a(name='rev dest')), block=None)), block=None),
53
+ output_token=None)
54
+ ]
55
+ )
56
+ ), block=None
57
+ ), output_token=None),
58
+ )
59
+ ]
60
+
61
+ @pytest.mark.parametrize("text, expected", actions)
62
+ def test_decision_scalar_true_result(text, expected):
63
+ parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
64
+ print(parse)
65
+ assert parse[0] == expected
@@ -33,7 +33,7 @@ expected_parse = Execution_Unit_a(
33
33
  "choice? {\n *cat\n}",
34
34
  "choice?\n { *cat }",
35
35
  ])
36
- def test_signal_action(text):
36
+ def test_decision_wrap(text):
37
37
  parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
38
38
  print(parse)
39
39
  assert parse[0] == expected_parse
@@ -24,7 +24,7 @@ actions = [
24
24
 
25
25
 
26
26
  @pytest.mark.parametrize("text, expected", actions)
27
- def test_ping_action(text, expected):
27
+ def test_operation(text, expected):
28
28
  parse = ScrallParser.parse_text(scrall_text=text, debug=False)[0]
29
29
  print(parse)
30
30
  assert parse[0] == expected
@@ -1 +0,0 @@
1
- version = "0.9.2"
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