Skip to content

Save metadata to csv - #290

Merged
kollivier merged 21 commits into
learningequality:masterfrom
richard-dinh:save_metadata_to_csv
Oct 23, 2020
Merged

Save metadata to csv#290
kollivier merged 21 commits into
learningequality:masterfrom
richard-dinh:save_metadata_to_csv

Conversation

@richard-dinh

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread ricecooker/classes/nodes.py Outdated
Comment thread ricecooker/commands.py Outdated
Comment thread ricecooker/commands.py Outdated
Comment thread ricecooker/chefs.py Outdated
Comment thread ricecooker/utils/youtube.py Outdated
Comment thread ricecooker/chefs.py Outdated
Comment thread ricecooker/chefs.py Outdated
Comment thread ricecooker/classes/nodes.py Outdated
Comment thread ricecooker/chefs.py Outdated
Comment thread ricecooker/chefs.py Outdated
Comment thread ricecooker/chefs.py Outdated
Comment thread ricecooker/classes/nodes.py Outdated
Comment thread ricecooker/classes/nodes.py Outdated
Comment thread ricecooker/classes/nodes.py Outdated
# if len(structure_list) < 1:
# structure_list = [current_level]
# else:
structure_list = list(structure_list)

@kollivier kollivier Oct 19, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line can be removed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I tried printing the structure list out with this line removed and it was printing out incorrectly. Seems that it was still passing in by reference

Capture

@kollivier kollivier Oct 19, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah, thanks, so it looks like what I read about list() as a function arg creating a new list each time was false. So let's make sure that any list or dict objects with default values default to None and that we set it when it is None the top of the function, like so:

if structure_list is None:
    structure_list = []

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated list to be named as branch_structure_list for now as it is keeping track of the structure of each branch. Can name it to something different in the future

Comment thread ricecooker/chefs.py Outdated

@kollivier kollivier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for all your hard work on this! LGTM! :)

@kollivier
kollivier merged commit a0d68cc into learningequality:master Oct 23, 2020
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.

2 participants