Closed nfb2021 closed 1 year ago
I see that the pipeline for windows tests is not working in master right now. I will fix this. Afterwards you update your branch with the changes in master and then the tests should run here as well.
Regarding test data, it's fine to add a new file to check the new changes. Generally we should keep the number of test files low, so maybe if we don't need all of the newly added files, you can delete some of them?
and please add one sentence on the fixed bug to CHANGELOG.rst (under unreleased changes)
ok, looks good. Tests are passing now. Do you still want to change anything here?
ok, looks good. Tests are passing now. Do you still want to change anything here?
I implemented all changes you requested, so as of now I am happy with how it is. Once I have the CEOP data I will try it and if something needs to be done, I will have a look at it
I just noticed two more things :) 1) the folder .vscode is still there, I assume because you committed before updating the .gitignore file. There is a command to delete an (ignore) folder from the git history. Can you check that? I want to avoid having that in the upstream repo 2) The folder RISMA_test_data should either be deleted if it's not needed anymore or integrated into the actual test data if you want to include reading the data as part of the available tests. Both are fine for me. If you want to include the data, please copy the network folder to e.g. test/test_data/Data_seperate_files_header_20170810_20180809, make sure in the tests, that the RISMA data is correctly read, and if necessary update the tests.
I just noticed two more things :)
1. the folder .vscode is still there, I assume because you committed before updating the .gitignore file. There is a command to delete an (ignore) folder from the git history. Can you check that? I want to avoid having that in the upstream repo
It should be removed now from git
2. The folder RISMA_test_data should either be deleted if it's not needed anymore or integrated into the actual test data if you want to include reading the data as part of the available tests. Both are fine for me. If you want to include the data, please copy the network folder to e.g. test/test_data/Data_seperate_files_header_20170810_20180809, make sure in the tests, that the RISMA data is correctly read, and if necessary update the tests.
I just deleted the directory. With everything going on with the pull request that is already quite some input. Adapting the tests is something for the next time
great, thanks.
General:
There was a Problem with reading data from the RISMA network. This data only contained soil moisture as variable and was of format "header & files". Further, this data was dowloaded from the ISMN webpage May 22, 23 at 09:00.
Problem:
To my understanding, all sensor files of the "header & files" format should contain four columns: date/time, data, new flag, old flag. For some RISMA sensor files the last column, old flag, contained strings such as:
The method
__read_csv()
of theDataFile
class could not parse these sensor files and threw following error: pandas.errors.ParserError: Error tokenizing data. C error: Expected 5 fields in line 23, saw 9. This phenomenon only occurred with some RISMA sensor files, other networks were fine.Fix:
__read_csv()
method to take keyword arguments**kwargs
as inputreadf()
calling thepandas.read_csv()
with a method of same name, that takes input argumentsdelim_whitespace=None, sep=None, low_memory=None
pd.read_csv()
, to fit the problems mentioned above__read_format_header_values()
method correctly to call the__read_csv()
in itsreturn
statementNote: