Skip to content

Commit

Permalink
Cautions (#116)
Browse files Browse the repository at this point in the history
* doc : NAFAS_CAUTIONS added

* fix : description_print function updated

* doc : CHANGELOG.md updated

* fix : tests updated
  • Loading branch information
sepandhaghighi authored Dec 31, 2024
1 parent 7fdbbb8 commit a6527ba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added
- Energizing program
- `PROGRAMS.md`
- Cautions message
### Changed
- `README.md` modified
- `AUTHORS.md` updated
Expand Down
3 changes: 2 additions & 1 deletion nafas/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"""nafas functions."""

import time
from nafas.params import NAFAS_DESCRIPTION, NAFAS_NOTICE, STANDARD_MENU, STANDARD_MENU_ORDER, STEP_MAP
from nafas.params import NAFAS_DESCRIPTION, NAFAS_NOTICE, NAFAS_CAUTIONS, STANDARD_MENU, STANDARD_MENU_ORDER, STEP_MAP
from nafas.params import PROGRAMS, PROGRAM_DESCRIPTION, SOUND_MAP, STEP_TEMPLATE, CYCLE_TEMPLATE
from nafas.params import SOUND_WARNING_MESSAGE, EXIT_MESSAGE, BAD_INPUT_MESSAGE, PROGRAM_END_MESSAGE
from nafas.params import MINUTES_TEMPLATE, SECONDS_TEMPLATE, PROGRAM_TIME_TEMPLATE
Expand Down Expand Up @@ -149,6 +149,7 @@ def description_print():
"""
print("\n".join(justify(NAFAS_DESCRIPTION.split(), 100)))
print(NAFAS_NOTICE)
print(NAFAS_CAUTIONS)


def program_description_print(program_name, level, program_data):
Expand Down
8 changes: 8 additions & 0 deletions nafas/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
3. When exhaling through your mouth, it is recommended to fold the lips
"""

NAFAS_CAUTIONS = """
Cautions:
1. If you have any breathing or respiratory issues, consult your doctor before using Nafas
2. If you have asthma or high blood pressure should not hold the breath
3. If you feel dizzy, nauseous, or lightheaded stop practicing and rest
"""

NAFAS_VERSION = "0.8"

SOUND_WARNING_MESSAGE = "Your device is not compatible with our underlying sound-playing library. You can refer to https://github.com/openscilab/nava."
Expand Down
7 changes: 7 additions & 0 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
2. Exhaling, you can use both nose and mouth
3. When exhaling through your mouth, it is recommended to fold the lips
<BLANKLINE>
<BLANKLINE>
Cautions:
<BLANKLINE>
1. If you have any breathing or respiratory issues, consult your doctor before using Nafas
2. If you have asthma or high blood pressure should not hold the breath
3. If you feel dizzy, nauseous, or lightheaded stop practicing and rest
<BLANKLINE>
>>> print("\\n".join(justify(["123"], 2)))
123
>>> print("\\n".join(justify(["123"], 1)))
Expand Down

0 comments on commit a6527ba

Please sign in to comment.