From 052304e0219fd4ece089d35e3ba1632217e65d54 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 28 Dec 2024 15:35:43 +0330 Subject: [PATCH 1/4] fix : program_description_print function updated --- nafas/functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nafas/functions.py b/nafas/functions.py index 9785853..594fe03 100644 --- a/nafas/functions.py +++ b/nafas/functions.py @@ -165,10 +165,10 @@ def program_description_print(program_name, level, program_data): """ cycle = program_data["cycle"] ratio = program_data["ratio"] + unit = program_data["unit"] sequence = [] for index, item in enumerate(ratio): - if item != 0: - sequence.append(STEP_MAP[index]) + sequence.append("{0}({1})".format(STEP_MAP[index], item)) sequence = ", ".join(sequence) total_time = time_calc(program_data) line() From f8ef7d935e5fc70ae4131f7c1eaec82369ebba6c Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 28 Dec 2024 15:37:24 +0330 Subject: [PATCH 2/4] fix : unit added to PROGRAM_DESCRIPTION --- nafas/functions.py | 1 + nafas/params.py | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/nafas/functions.py b/nafas/functions.py index 594fe03..37f9be0 100644 --- a/nafas/functions.py +++ b/nafas/functions.py @@ -177,6 +177,7 @@ def program_description_print(program_name, level, program_data): program_name, level, str(cycle), + str(unit), time_convert(total_time), sequence)) line() diff --git a/nafas/params.py b/nafas/params.py index 2456c73..c571ad7 100644 --- a/nafas/params.py +++ b/nafas/params.py @@ -34,9 +34,11 @@ Number of Cycles : {2} -Total Time : {3} +Unit : {3} seconds -Sequence : {4} +Total Time : {4} + +Sequence : {5} """ MINUTES_TEMPLATE = "{:02.0f} minutes" From 37fb3a17df7793fc35e6d686ee70d697ed8fb4ea Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 28 Dec 2024 15:41:08 +0330 Subject: [PATCH 3/4] fix : tests updated --- test/test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test.py b/test/test.py index e5c77bf..791cd94 100644 --- a/test/test.py +++ b/test/test.py @@ -97,9 +97,11 @@ Number of Cycles : 35 +Unit : 3 seconds + Total Time : 07 minutes, 03 seconds -Sequence : Inhale, Exhale +Sequence : Inhale(1), Retain(0), Exhale(3), Sustain(0) ###################################################################### >>> run({'cycle': 2, 'pre': 3, 'unit': 1, 'ratio': [1, 0, 3, 0]}) From b31e3e5701e1be0825ac61dc271bba4620690e59 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 28 Dec 2024 15:42:50 +0330 Subject: [PATCH 4/4] doc : CHANGELOG.md updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac2538e..5d1d43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `README.md` modified - `AUTHORS.md` updated - Exit bug fixed +- Program details updated ## [0.8] - 2024-11-04 ### Added - Balancing program