pyaerocom icon indicating copy to clipboard operation
pyaerocom copied to clipboard

Bug in imports

Open thorbjoernl opened this issue 1 year ago • 1 comments

Describe the bug

There are some imports at the top of calc_example_coldata.py which don't go anywhere:

import pyaerocom.testdata_access as td
from pyaerocom.conftest import CHECK_PATHS

This issue also occurs in create_subset_ebas.py

To Reproduce NA

Expected behavior NA

Screenshots NA

Additional context

thorbjoernl avatar May 13 '24 11:05 thorbjoernl

It looks like the relevant code was moved to a fixture as part of commit ac861d8765fd2e06bf3f17bc526cac97f79da691 which means that this is now part of the test code, not part of Pyaerocom proper. Not sure how to resolve the wrong imports, or how to get data for the tutorials.

thorbjoernl avatar May 14 '24 06:05 thorbjoernl

This is also makes a problem with metno/pyaerocom-tutorials#10

I'll block PR 10 and 7 from pyaerocom-tutorials until this issue is fixed

dulte avatar May 31 '24 11:05 dulte

I talked to @lewisblake, and one solution to this and the bugs in creates in the the tutorials, is to make a small command line command to download the data. I'm not sure what the best practice for this is, especially since the download code is in the testing part of the code base. Maybe you, @avaldebe, have some idea how to do this?

dulte avatar May 31 '24 12:05 dulte

The necessary functionality for the tutorials (downloading of testdata-minimal) should now be in place. This leaves the broken imports in the two files mentioned above. I tried fixing the data loading in calc_example_coldata.py but it breaks further down in the script in something related to the plotting. Nobody has noticed the import problem or any other problems with these files for quite some time (the original change that broke these files is from early 2022) so I think it is safe to say that these can be removed.

thorbjoernl avatar Jun 05 '24 13:06 thorbjoernl