Skip to content

Conversation

@douglowe
Copy link
Collaborator

@douglowe douglowe commented Mar 5, 2024

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

@douglowe douglowe requested review from AnjaLeBlanc and anenadic March 5, 2024 22:23
@douglowe douglowe marked this pull request as draft March 5, 2024 22:25
@douglowe douglowe mentioned this pull request Mar 5, 2024
3 tasks
@douglowe
Copy link
Collaborator Author

douglowe commented Mar 6, 2024

I've finished the first 2 sections. I'll work on the Code Abstractions and MVC lessons tomorrow.

@douglowe douglowe marked this pull request as ready for review March 10, 2024 18:27
@douglowe douglowe requested a review from Scottan March 10, 2024 18:27
>> 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'))
Copy link

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)?

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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)

Copy link

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

@douglowe douglowe merged commit dec2029 into gh-pages Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants