-
Notifications
You must be signed in to change notification settings - Fork 4
Add refactor lessons as extra material #48
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
Conversation
|
I've finished the first 2 sections. I'll work on the Code Abstractions and MVC lessons tomorrow. |
| >> self.dir_path = dir_path | ||
| >> | ||
| >> def load_catchment_data(self): | ||
| >> data_file_paths = glob.glob(os.path.join(self.dir_path, 'rain_data_2015*.json')) |
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.
So I think these lessons are looking really good, my one niggle is with the arguments for how the files are being read - the controller still asks for 'Input CSV(s) containing measurement data', and is still only looking at the directory path and whether it ends with .json or .csv. I'm not sure how best to fix it, I think there should at least be some suggestion of how to fix this, or maybe some additional optional arguments in the next section (say -j puts it in json mode)?
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.
I agree that it's poor practice to look at the file endings for this work. We perhaps could include an exercise in the last lesson, for the students to replace this file ending check with a flag instead? I'll look at the options for this.
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.
But, for now, shall we merge this material? (and I'll add that exercise as another PR)
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.
Yeah, this is more of a comment than a requirement, happy for it to be merged as is
Adapting the code refactor lessons from carpentries-incubator#297
This material will be adapted for our use case. The new code is given: https://github.com/carpentries-incubator/python-intermediate-rivercatchment/tree/full-data-analysis