ryansurf / cli-surf

Get surf and ocean data from the command line interface
7 stars 10 forks source link

Clean up code #3

Open ryansurf opened 2 months ago

ryansurf commented 2 months ago

helper.py is a little messy. Functions can be consolidated and simplified. Feel free to make any changes so its more simple!

main.py can also use some work

GUKWAT commented 2 months ago

Will add more details to the docstrings after refactoring the code to make it more readable

ryansurf commented 2 months ago

@GUKWAT Sounds good, submit a PR whenever you're done!

mamamia96 commented 1 week ago

Would I be able to take a crack at cleaning up helper.py?

ryansurf commented 1 week ago

@mamamia96 Yes! Let me know if you have any issues

GUKWAT commented 6 days ago

image Currently changing the if statements in the helper.py into dictionaries to make the code more readable

mamamia96 commented 5 days ago

I can wait to make any changes until @GUKWAT is done :) didn't mean to step on any toes here

ryansurf commented 5 days ago

@GUKWAT nice! How is it going? Running into any issues? Im here to help if necessary :smile:

ryansurf commented 5 days ago

I can wait to make any changes until @GUKWAT is done :) didn't mean to step on any toes here

Sorry about that, I should've asked @GUKWAT how they were doing on this. Thank you for being patient!!

GUKWAT commented 4 days ago

@ryansurf @mamamia96 That's alright, I have pushed the code with the changes I have made for your review. Changed the if statements to dictionary mapping conditions which makes the code cleaner and more efficient for the following functions def set_output_values def print_ocean_data def print_forecast