Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There seems to be a bug in the comparison of the Gridded/run_*/CHANOBS files: some of the files are not found. #64

Closed
jmccreight opened this issue May 31, 2018 · 3 comments
Assignees
Labels
testing Issues related to model testing

Comments

@jmccreight
Copy link
Collaborator

jmccreight commented May 31, 2018

https://travis-ci.com/NCAR/wrf_hydro_nwm/builds/74928143#L583

"None, None, None, None, None"

Expected Behavior

It should find the files, they are there. Running tests/take_test.sh on this PR will reveal the issue.

Current Behavior

It dosent find the files.

@tjmills
Copy link

tjmills commented May 31, 2018

I believe this is the cause:

This logic is responsible for the None print statements
https://github.com/NCAR/wrf_hydro_nwm_public/blob/master/tests/test_2_regression.py#L107-L114

    ```if all(v is None for v in chanobs_diffs):
        has_diffs = False
    else:
        has_diffs = True
        #chanobs_diffs.remove(None)
        for the_diff in chanobs_diffs[0:5]:
            with capsys.disabled():
                print(the_diff)```

I believe whats happening is that there is a diff but in a file that is not one of the first 5 in the list. We can resolve this by stripping all None values out of the list prior to the print statements

@tjmills
Copy link

tjmills commented May 31, 2018

This I believe would fix it, will submit a PR with it when I have a chance

if all(v is None for v in chanobs_diffs):
        has_diffs = False
    else:
        has_diffs = True
        only_diffs = [the_diff for the_diff in chanobs_diffs if the_diff is not None]
        for the_diff in only_diffs[0:5]:
            with capsys.disabled():
                print(the_diff)

@kafitzgerald kafitzgerald added the testing Issues related to model testing label Jun 5, 2018
@tjmills
Copy link

tjmills commented Aug 15, 2018

This has been resolved as part of the testing refactor but I did not close with PR as I should have. Closing now

@tjmills tjmills closed this as completed Aug 15, 2018
jmccreight pushed a commit to jmccreight/wrf_hydro_nwm_public that referenced this issue Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Issues related to model testing
Projects
None yet
Development

No branches or pull requests

3 participants