Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config #129

Merged
merged 19 commits into from
Mar 20, 2025
Merged

Config #129

merged 19 commits into from
Mar 20, 2025

Conversation

sepandhaghighi
Copy link
Owner

Reference Issues/PRs

#3

What does this implement/fix? Explain your changes.

  • --config argument added
  • README.md modified

Any other comments?

@sepandhaghighi sepandhaghighi self-assigned this Mar 19, 2025
@sepandhaghighi sepandhaghighi added the enhancement New feature or request label Mar 19, 2025
@sepandhaghighi sepandhaghighi added this to the nafas v1.1 milestone Mar 19, 2025
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.33%. Comparing base (863f264) to head (675be1d).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #129      +/-   ##
==========================================
+ Coverage   97.04%   97.33%   +0.30%     
==========================================
  Files           2        2              
  Lines         236      262      +26     
  Branches       23       29       +6     
==========================================
+ Hits          229      255      +26     
  Misses          5        5              
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sepandhaghighi sepandhaghighi marked this pull request as ready for review March 19, 2025 16:11
Copy link
Collaborator

@sadrasabouri sadrasabouri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good generally, I left some minor comments.
Other alternative names for config could be:

  • program
  • custom-program
  • program-file
  • path-to-program

README.md Outdated
"unit": 2,
"pre": 3,
"cycle": 10,
"ratio":{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ratio": { instead of "ratio":{

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in d001f87

if args.config:
result = load_config(args.config)
if result["status"]:
program_name, level, program_data = result["data"]["program_name"], result["data"]["program_level"], result["data"]["program_data"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it into two lines for more readability.

data = result["data"]
program_name, level, program_data = data["program_name"], data["program_level"], data["program_data"]

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in d001f87

@@ -28,13 +32,20 @@ def main():
if silent_flag:
tprint("Silent Mode")
description_print()
_ = input("Press any key to continue.")
clear_screen()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not super important but I wanted to know if you accidentally removed the clear_screen()?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it wasn't removed by accident; it was redundant.

"unit": 2,
"pre": 3,
"cycle": 10,
"ratio":{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ratio": {

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 48131ab

"unit": 2,
"pre": 3,
"cycle": 10.2,
"ratio":{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ratio": {

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 48131ab

"unit": 2,
"pre": 3,
"cycle": 10,
"ratio":{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ratio": {

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 48131ab

nafas/params.py Outdated
@@ -38,6 +38,8 @@

BAD_INPUT_MESSAGE = "[Error] Bad input!"

CONFIG_LOAD_ERROR_MESSAGE = "[Error] Failed to load configuration file!"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Error] Failed to load the configuration file!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in c2903f3

nafas/params.py Outdated
"inhale": (int, float),
"exhale": (int, float),
"retain": (int, float),
"sustain": (int, float)},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sustain": (int, float),
},

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 8cd7044

"data": {
"program_name": config_data['name'],
"program_level": "Custom",
"program_data": program_data}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                "program_data": program_data
            }
        }

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 675be1d

@sadrasabouri sadrasabouri merged commit b01399b into dev Mar 20, 2025
26 checks passed
@sadrasabouri sadrasabouri deleted the config branch March 20, 2025 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants