Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Extraction of the example data results in an error #29

Open
lettlini opened this issue Mar 1, 2023 · 4 comments
Open

Extraction of the example data results in an error #29

lettlini opened this issue Mar 1, 2023 · 4 comments

Comments

@lettlini
Copy link
Collaborator

lettlini commented Mar 1, 2023

This error occurs in the Example_OLR_Tracking_satellite.ipynb notebook upon trying to download and extract the example data.

It is caused by the fact that while zipfile.Zipfile is called the corresponding module is never imported.
Fixing this problem is probably trivial, however I would like to know what the preferred method of extracting the temporary zipfile is as there are two possibilities:

@w-k-jones
Copy link
Member

Good catch! I think it would be best to use the same method we use in the main tobac repository:

https://github.com/tobac-project/tobac/blob/43060c2ecc25df64a04eb889b25d653d8e538037/examples/Example_OLR_Tracking_satellite/Example_OLR_Tracking_satellite.ipynb?short_path=27769cc#L90-L102

This also automatically checks for the data and downloads it if missing, which is nicer than commenting out/uncommenting code blocks.

We should look into updating the tobac-tutorials notebooks to bring them up to date with the main repository. Could you look into whether we can merge the changes in directly?

@lettlini
Copy link
Collaborator Author

lettlini commented Mar 1, 2023

We should look into updating the tobac-tutorials notebooks to bring them up to date with the main repository. Could you look into whether we can merge the changes in directly?

Because the notebooks in the main repository use a more robust & consistent approach to downloading / extracting the example data I think this is the best way to deal with this issue.

I will have a look at this at the beginning of next week

@lettlini
Copy link
Collaborator Author

lettlini commented Mar 8, 2023

After thinking about this again I would like to suggest that we wait with this until we have transitioned to notebooks without output (cf. issue in main repository). This would make the process of merging different versions of the same notebook much easier.

Another quick solution would be to simply update the download and extraction of example data according to the approach chosen in the main repository.

I would also like to hear your thoughts on this @w-k-jones

@w-k-jones
Copy link
Member

I think the idea of making the notebooks easier to merge without output is a good one. I've been thinking about how we could use this repository as a sort of "draft" for preparing more polished examples to add to the main repository, so making sure we can easily merge changes is important

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants