Skip to content

Commit 5268057

Browse files
committed
init
1 parent f0dd2fa commit 5268057

1,628 files changed

Lines changed: 289428 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

features/ascent_complexity.feature

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Feature: complexity ascent
2+
Feature that reaugment the complexity order of the data
3+
4+
Rule: Reuse type as ultimate target
5+
One complexity order relates to one reuse type.
6+
When the complexity order reached by the user meets reuse type targeted by the user
7+
then the data redesign method has fulfilled its mission
8+
9+
Rule: Graphic interactions
10+
Complexity ascent can only happen through graphic interactions
11+
with clear and distinct entites, attributes and entities.
12+
13+
Scenario: complexity ascent
14+
Given feature
15+
* memory worked
16+
* tidy data worked
17+
* one day at least passed since the last complexity descent
18+
* user reached the lowest complexity order
19+
When the user asks for complexity ascent
20+
Then he gets an appointment with the data expert
21+
Then the expert he will play the role of a copilot
22+
When users agrees
23+
Then he is showed complexity ascent tolls
24+
When the user is done using one tool
25+
Then the expert/copilot evaluate the new complexity order
26+
Then he shows the user reuses option now available
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Feature: get down from upper to lower complexity order
2+
The user wants to reuse a dataset to create a new indicator.
3+
The user found out that the complexity order of the datasets is 3.
4+
He wants to lower the complexity order to 2, so he gets in touch with a data expert.
5+
He meets the expert and at the end of the process, the complexity order of the dataset is 2.
6+
7+
Rule: One user, one expert
8+
One user can only be in touch with one expert throughout the whole process.
9+
10+
Scenario: complexity descent
11+
Given the user used the measure complexity feature
12+
When the user wants to lower the complexity order of the dataset
13+
Then he gets in touch with a data expert
14+
When the appointment starts
15+
Then the expert asks the user what indicator he wants to create
16+
When the user answers
17+
Then the expert asks the user what dataset he wants to use
18+
When the user answers
19+
Then the expert asks the user what complexity order he wants to reach
20+
When the user answers
21+
Then the expert begins the process of lowering the complexity order
22+
When the process is over
23+
Then the complexity order of the dataset is lowered
24+
Then he explains what the user can do with such complexity order
25+
Then the appointment ends
26+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Feature: measure dataset complexity order
2+
The user wants to know how complex the datasets he intends to use are.
3+
The feature will give the user an approximation of such complexity
4+
by displaying the complexity order of the data.
5+
6+
Rule: One dataset, one measure, one reuse
7+
The user can only measure the complexity of one dataset at a time.
8+
9+
Scenario: measure complexity order of a dataset
10+
Given the user has a dataset
11+
When the user asks for the complexity order of the dataset
12+
Then the user will be given the complexity order of the dataset

features/memory.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Feature: complexity memory
2+
The system remembers the variable, entity and value cast aside
3+
during the complexity descent process.
4+
5+
Rule: Simplification, not oblivion
6+
Data complexity is not obliviated during the complexity descent process
7+
but simplified, which means it is just taking new shape.
8+
9+
Scenario: keep entity, variable and value deleted in memory
10+
When the expert deletes an entity, variable or value
11+
Then the system remembers the deleted entity, variable or value
12+
And the system shows the deleted entity, variable or value to the user
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
from behave import given, when, then
2+
3+
class Context:
4+
def __init__(self):
5+
self.memory_worked = False
6+
self.tidy_data_worked = False
7+
self.passed_one_day = False
8+
self.user_reached_lowest_complexity = False
9+
self.user_asks_for_ascent = False
10+
self.appointment_scheduled = False
11+
self.copilot_role_set = False
12+
self.user_agrees = False
13+
self.tools_shown = False
14+
self.tool_used = False
15+
self.new_complexity_evaluated = False
16+
self.reuses_shown = False
17+
18+
context = Context()
19+
20+
# Given steps
21+
@given("feature")
22+
def step_feature(context):
23+
pass
24+
25+
@given("memory worked")
26+
def step_memory_worked(context):
27+
context.memory_worked = True
28+
29+
@given("tidy data worked")
30+
def step_tidy_data_worked(context):
31+
context.tidy_data_worked = True
32+
33+
@given("one day at least passed since the last complexity descent")
34+
def step_passed_one_day(context):
35+
context.passed_one_day = True
36+
37+
@given("user reached the lowest complexity order")
38+
def step_user_reached_lowest_complexity(context):
39+
context.user_reached_lowest_complexity = True
40+
41+
# When steps
42+
@when("the user asks for complexity ascent")
43+
def step_user_asks_for_ascent(context):
44+
context.user_asks_for_ascent = True
45+
46+
@when("users agrees")
47+
def step_users_agrees(context):
48+
context.user_agrees = True
49+
50+
@when("the user is done using one tool")
51+
def step_user_done_using_tool(context):
52+
context.tool_used = True
53+
54+
# Then steps
55+
@then("he gets an appointment with the data expert")
56+
def step_get_appointment_with_expert(context):
57+
assert context.memory_worked, "Memory feature didn't work"
58+
assert context.tidy_data_worked, "Tidy data feature didn't work"
59+
assert context.passed_one_day, "Not enough time has passed since last descent"
60+
assert context.user_reached_lowest_complexity, "User hasn't reached lowest complexity"
61+
assert context.user_asks_for_ascent, "User didn't ask for ascent"
62+
context.appointment_scheduled = True
63+
64+
@then("the expert he will play the role of a copilot")
65+
def step_expert_plays_copilot_role(context):
66+
assert context.appointment_scheduled, "Appointment not scheduled"
67+
context.copilot_role_set = True
68+
69+
@then("he is showed complexity ascent tools")
70+
def step_show_ascent_tools(context):
71+
assert context.copilot_role_set, "Copilot role not set"
72+
assert context.user_agrees, "User didn't agree"
73+
context.tools_shown = True
74+
75+
@then("the expert/copilot evaluate the new complexity order")
76+
def step_evaluate_new_complexity(context):
77+
assert context.tools_shown, "Tools not shown"
78+
assert context.tool_used, "User didn't use tool"
79+
context.new_complexity_evaluated = True
80+
81+
@then("he shows the user reuses option now available")
82+
def step_show_available_reuses(context):
83+
assert context.new_complexity_evaluated, "Complexity not evaluated"
84+
context.reuses_shown = True
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from behave import given, when, then
2+
3+
class Context:
4+
def __init__(self):
5+
self.expert_action = None
6+
self.deleted_item = None
7+
self.system_memory = []
8+
self.deleted_item_shown = False
9+
10+
context = Context()
11+
12+
# When steps
13+
@when("the expert deletes an entity, variable or value")
14+
def step_expert_deletes_entity_variable_value(context):
15+
context.expert_action = "delete"
16+
17+
# Then steps
18+
@then("the system remembers the deleted entity, variable or value")
19+
def step_system_remembers_deleted_item(context):
20+
assert context.expert_action == "delete", "Expert action not set"
21+
context.deleted_item = "example_deleted_item" # Replace with actual deleted item
22+
context.system_memory.append(context.deleted_item)
23+
24+
@then("the system shows the deleted entity, variable or value to the user")
25+
def step_system_shows_deleted_item_to_user(context):
26+
assert context.deleted_item, "Deleted item not remembered"
27+
assert context.deleted_item in context.system_memory, "Deleted item not in memory"
28+
context.deleted_item_shown = True
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
from behave import given, when, then
2+
3+
class Context:
4+
def __init__(self):
5+
self.feature_used = False
6+
self.lower_complexity = False
7+
self.appointment_started = False
8+
self.user_answered_indicator = False
9+
self.user_answered_dataset = False
10+
self.user_answered_order = False
11+
self.process_started = False
12+
self.process_completed = False
13+
self.explanation_given = False
14+
15+
context = Context()
16+
17+
# Given steps
18+
@given("the user used the measure complexity feature")
19+
def step_user_used_measure_complexity_feature(context):
20+
context.feature_used = True
21+
22+
# When steps
23+
@when("the user wants to lower the complexity order of the dataset")
24+
def step_user_wants_to_lower_complexity_order(context):
25+
context.lower_complexity = True
26+
27+
@when("the appointment starts")
28+
def step_appointment_starts(context):
29+
context.appointment_started = True
30+
31+
@when("the user answers")
32+
def step_user_answers(context):
33+
if "what indicator" in context.active_step.text:
34+
context.user_answered_indicator = True
35+
elif "what dataset" in context.active_step.text:
36+
context.user_answered_dataset = True
37+
elif "what complexity order" in context.active_step.text:
38+
context.user_answered_order = True
39+
40+
@when("the expert begins the process of lowering the complexity order")
41+
def step_expert_begins_lowering_complexity(context):
42+
assert context.appointment_started, "Appointment hasn't started"
43+
assert context.user_answered_indicator, "User didn't answer indicator question"
44+
assert context.user_answered_dataset, "User didn't answer dataset question"
45+
assert context.user_answered_order, "User didn't answer complexity order question"
46+
context.process_started = True
47+
48+
@when("the process is over")
49+
def step_process_is_over(context):
50+
assert context.process_started, "Process hasn't started"
51+
context.process_completed = True
52+
53+
@when("he explains what the user can do with such complexity order")
54+
def step_explain_user_capabilities(context):
55+
assert context.process_completed, "Process isn't completed"
56+
context.explanation_given = True
57+
58+
# Then steps
59+
@then("he gets in touch with a data expert")
60+
def step_user_gets_in_touch_with_data_expert(context):
61+
assert context.feature_used, "User didn't use the feature"
62+
63+
@then("the expert asks the user what indicator he wants to create")
64+
def step_expert_asks_user_about_indicator(context):
65+
assert context.appointment_started, "Appointment hasn't started"
66+
67+
@then("the expert asks the user what dataset he wants to use")
68+
def step_expert_asks_user_about_dataset(context):
69+
assert context.user_answered_indicator, "User didn't answer indicator question"
70+
71+
@then("the expert asks the user what complexity order he wants to reach")
72+
def step_expert_asks_user_about_complexity_order(context):
73+
assert context.user_answered_dataset, "User didn't answer dataset question"
74+
75+
@then("the complexity order of the dataset is lowered")
76+
def step_complexity_order_lowered(context):
77+
assert context.process_completed, "Process isn't completed"
78+
79+
@then("he explains what the user can do with such complexity order")
80+
def step_explain_user_capabilities(context):
81+
assert context.explanation_given, "Explanation not given"
82+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from behave import given, when, then
2+
3+
@given("the user has a dataset")
4+
def step_user_has_dataset(context):
5+
# You can set up the dataset here, if needed
6+
context.dataset = ...
7+
8+
@when("the user asks for the complexity order of the dataset")
9+
def step_user_asks_for_complexity_order(context):
10+
# Perform the action to calculate the complexity order of the dataset
11+
context.complexity_order = calculate_complexity_order(context.dataset)
12+
13+
@then("the user will be given the complexity order of the dataset")
14+
def step_user_given_complexity_order(context):
15+
expected_complexity_order = ...
16+
assert context.complexity_order == expected_complexity_order, \
17+
f"Expected complexity order: {expected_complexity_order}, Actual complexity order: {context.complexity_order}"
18+
19+
# You can define the calculate_complexity_order function here
20+
def calculate_complexity_order(dataset):
21+
# Implement the logic to calculate the complexity order
22+
...

features/steps/tidy_data.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from behave import given, when, then
2+
3+
class Context:
4+
def __init__(self):
5+
self.complexity_memory_feature_worked = False
6+
self.messy_data = None
7+
self.tidy_tables = None
8+
self.icon_displayed = False
9+
10+
context = Context()
11+
12+
# Given steps
13+
@given("complexity memory feature worked")
14+
def step_complexity_memory_feature_worked(context):
15+
context.complexity_memory_feature_worked = True
16+
17+
# When steps
18+
@when("the user uses the system")
19+
def step_user_uses_the_system(context):
20+
assert context.complexity_memory_feature_worked, "Complexity memory feature didn't work"
21+
context.messy_data = [] # Define the messy data here
22+
23+
@then("the system retrieves the messy data")
24+
def step_system_retrieves_messy_data(context, table):
25+
context.messy_data = table
26+
27+
@then("turns it into a tidy format")
28+
def step_turns_into_tidy_format(context, *tables):
29+
context.tidy_tables = tables
30+
31+
@then("the user sees an icon showing when the state of the data tidying process")
32+
def step_user_sees_icon_display(context):
33+
context.icon_displayed = True

features/tidy_data.feature

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Feature: tidy data
2+
Feature that turns messy data cast aside during
3+
the complexity descent process into tidy data.
4+
5+
Scenario: tidy data cast aside
6+
Given complexity memory feature worked
7+
When the users uses the system
8+
Then the system retrieves the messy data
9+
10+
| Entity | Attribute | Value | Order ID | Product Name | Quantity | Total Amount | Method | Address | Method | Amount |
11+
| Customer | Name | John | | | | | | | | |
12+
| | Phone | 555-123-4567 | | | | | | | | |
13+
| | Address | 123 Main St | | | | | | | | |
14+
| Order | | | 987654 | | | | | | | |
15+
| | | | | Widget | | | | | | |
16+
| | | | | | 3 | | | | | |
17+
| | | | | | | $150.00 | | | | |
18+
| Shipping | | | | | | | Express | | | |
19+
| | | | | | | | | 456 Elm St | | |
20+
| Payment | | | | | | | | | Credit Card | |
21+
| | | | | | | | | | | $150.00 |
22+
23+
24+
Then turns it into a tidy format
25+
26+
| Entity | Attribute | Value |
27+
| Customer | Name | John |
28+
| Customer | Phone Number | 555-123-4567 |
29+
| Customer | Address | 123 Main St |
30+
31+
32+
| Entity | Attribute | Value |
33+
| Order | Order ID | 987654 |
34+
| Order | Product Name | Widget |
35+
| Order | Quantity | 3 |
36+
| Order | Total Amount | $150.00 |
37+
38+
39+
| Entity | Attribute | Value |
40+
| Shipping | Method | Express |
41+
| Shipping | Address | 456 Elm St |
42+
43+
44+
| Entity | Attribute | Value |
45+
| Payment | Method | Credit Card |
46+
| Payment | Amount | $150.00 |
47+
48+
49+
And the user sees an icon showing when the state of the data tidying process

0 commit comments

Comments
 (0)