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

Remove bugs when reading 360 day calendar LBCs #3743

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

nhsavage
Copy link
Contributor

@nhsavage nhsavage commented Jun 17, 2020

For #3741. This code now is able to read the sample LBC files with a 360 day calendar. I am now using this pull request to run the standard tests and seek further advice on adding extra tests (there don't seem to be any LBC files at the moment in the Iris data collection) and on whether it is desirable to check the values of LBTIM in some way.

@nhsavage
Copy link
Contributor Author

ok - so half of the Travis CI tests failed, I'd like some help in interpreting those failures too, as on a quick scan, I can't see what the problem is

@nhsavage
Copy link
Contributor Author

I now see what the error is
iris.tests.unit.fileformats.ff.test_FF2PP.Test__adjust_field_for_lbc is no longer raising an error. I had not looked at this issue so now I will go back and look at that

@trexfeathers
Copy link
Contributor

ok - so half of the Travis CI tests failed, I'd like some help in interpreting those failures too, as on a quick scan, I can't see what the problem is

  • Within this PR: click on Details for the Travis CI section of the PR checks
  • From the list of build jobs in the body of the Travis build's page: click on any of these marked as failing (you can click anywhere on the desired line)
  • Within the job log section of the build job's page: click the circle in the top right of the log, which takes you to the bottom of the log
  • Scroll up a little, and you will find details/traceback for any test failures directly below the list of test successes

@nhsavage
Copy link
Contributor Author

ok, so all that is now failing is black. I am confused - I thought that Iris automatically applied black when I commit? How can I fix this?

@nhsavage
Copy link
Contributor Author

so now I have all the tests passing the next question is what additional tests should I be adding to the code? At the moment, the tests for LBCs are all based on mock. Should we add some real data as well? Also I would like to see tests for: 360 day calendar and variable resolution LBCs in addition to the fairly standard version we have here.

@trexfeathers
Copy link
Contributor

Hi @nhsavage, thanks for your work on this; it's good to see the open source model working as intended.

Since you are within the Met Office, it would be good to discuss your outstanding questions in detail at our next surgery on Thursday 2nd July. Does that work for you? We wouldn't plan to merge this between now and then anyway (due to some other significant changes currently in the works).

@nhsavage
Copy link
Contributor Author

nhsavage commented Jun 19, 2020 via email

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @nhsavage. Following offline discussion, we have agreed that this PR needs:

  • A minor change to lbtim_default
  • A few more unit tests, with mock headers representing a wider range of examples of LBC files. Use your judgement on how many is appropriate 🙂

As a follow-on I have also raised #3748 to further enhance LBC test coverage in future.

Once the requested changes have been made, I'm keen to get a review from another user experienced with LBC's. We can see if we can find someone with a GitHub account, or get them to open one!

@@ -577,12 +577,8 @@ def _adjust_field_for_lbc(self, field):
# Set LBTIM to indicate the specific time encoding for LBCs,
# i.e. t1=forecast, t2=reference
lbtim_default = 11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lbtim_default = 11
lbtim_default = pp.SplittableInt(11)

@pp-mo
Copy link
Member

pp-mo commented Mar 29, 2023

@SciTools/peloton any chance of progressing this @nhsavage ?

@nhsavage
Copy link
Contributor Author

@SciTools/peloton any chance of progressing this @nhsavage ?

Probably not realistically. At the time of the last activity, I hadn't use mocking in tests before and so was stuck. I don't have any time specifically to work on this (it is useful but not essential to our work to do this and we have managed for 3 years without it. Is there any demand for this feature/fix from anyone except me? If not I suggest we close this

@codecov
Copy link

codecov bot commented Mar 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (main@6d24b30). Click here to learn what that means.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3743   +/-   ##
=======================================
  Coverage        ?   89.27%           
=======================================
  Files           ?       88           
  Lines           ?    22257           
  Branches        ?     4867           
=======================================
  Hits            ?    19870           
  Misses          ?     1641           
  Partials        ?      746           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@CLAassistant
Copy link

CLAassistant commented Apr 8, 2024

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

5 participants