-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Config #129
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. 🚀 New features to boost your workflow:
|
There was a problem hiding this 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":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ratio": {
instead of "ratio":{
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in d001f87
nafas/__main__.py
Outdated
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"] |
There was a problem hiding this comment.
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"]
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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()
?
There was a problem hiding this comment.
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.
test/test_config3.json
Outdated
"unit": 2, | ||
"pre": 3, | ||
"cycle": 10, | ||
"ratio":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ratio": {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 48131ab
test/test_config2.json
Outdated
"unit": 2, | ||
"pre": 3, | ||
"cycle": 10.2, | ||
"ratio":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ratio": {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 48131ab
test/test_config1.json
Outdated
"unit": 2, | ||
"pre": 3, | ||
"cycle": 10, | ||
"ratio":{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ratio": {
There was a problem hiding this comment.
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!" |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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)}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"sustain": (int, float),
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 8cd7044
nafas/functions.py
Outdated
"data": { | ||
"program_name": config_data['name'], | ||
"program_level": "Custom", | ||
"program_data": program_data}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"program_data": program_data
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 675be1d
Reference Issues/PRs
#3
What does this implement/fix? Explain your changes.
--config
argument addedREADME.md
modifiedAny other comments?