Closed gapintheclouds closed 2 years ago
@barbarabrooks please can you advise us on this issue. The bit of code that tests the file name is:
https://github.com/ncasuk/amf-check-writer/blob/master/amf_check_writer/amf_checker.py#L17-L31
It assumes that you either get "
_
_<option1>_
_<option1>_<option2>_
Let us know :-)
OK
so line 20
should be
There is a hyphen separating day and hour.
After
so you can have
Thanks @barbarabrooks, that's clearer. I just reviewed the _vocabularies.xlsx file at:
It looks like we don't have exact/exhaustive options for each <optionN>
component so I don't think we should try to do vocab-checking against them. We should just make sure the structure is correct.
@gapintheclouds : please see @barbarabrooks's response above. Please implement that as a regex - and write a few more unit tests to check that it works okay. Thanks
Thanks.
@barbarabrooks : For the date/time string. I guess we should allow any of the following:
\
Is that correct? Or should the time always be \
@gapintheclouds: as part of this work, please do the following:
tests.py
from amf_check_writer/
to tests/test_check_writer.py
- don't worry about getting these runningtests/test_filename.py
- with lots of quick tests to check regex for filename is doing the right thing.Fix now implemented.
When running
amf-checker
using the following filename it doesn't accept the filename:It works if the file is renamed to
ncas-anemometer-1_ral_29001225_mean-winds_corrected_monkey_v0.1.nc
. It only allows filenames with both<option1>
and<option2>
not just one option.Is this correct behaviour?