Open JohnMrziglod opened 6 years ago
@olemke and @lkluft , I would like to test the file handler of MHS, etc. Do you know a good way of doing this? For instance, is it possible to ship an original MHS file as test case?
Since it's likely that other similar test files need to be added in the future and they're of considerable size, it is not feasible to have them inside the typhon repository itself.
After discussion with @lkluft, we came to the conclusion that we should have a separate typhon-testfiles repository which can be optionally checked out alongside typhon. If this repository is present (location could also be set by the user via an environment variable TYPHONTESTFILES
) the tests that require these additional files are executed and otherwise skipped.
I like this idea of separation. But wouldn't it be more consistent to move all test scripts and files (i.e. typhon/tests) to that repository?
The tests should always be part of the main package. Tests that need larger input files to run are an exception. Usually tests don't need any input files at all. Not being able to run tests without checking out a second package would be very inconvenient. Having them separate from the main typhon package would also require two pull requests to add code and tests. We already get complaints that doing one pull request to commit code is too much of a hassle, requiring two would be a death sentence for test contributions.
Owing to the recent development of these classes, there are just a few tests working and most of them are obsolete. Hence, they need a review and many tests must be added. This issue acts as a ToDo list for tests and will be updated in future.
FileSet and FileHandler
FileSet.align
MHS_HDF.read
AVHRR_HDF.read
CloudSat.read
Collocator, Collocations and related functions
Collocator.collocate
Collocator.collocate_filesets
orCollocations.search
collapse
expand
SPAREICE
SPAREICE.retrieve
SPAREICE.retrieve_from_collocations