Skip to content

extend Metar constructor strict to cover all ParserErrors#55

Merged
akrherz merged 1 commit into
python-metar:masterfrom
akrherz:issue51
Aug 20, 2018
Merged

extend Metar constructor strict to cover all ParserErrors#55
akrherz merged 1 commit into
python-metar:masterfrom
akrherz:issue51

Conversation

@akrherz

@akrherz akrherz commented Aug 17, 2018

Copy link
Copy Markdown
Collaborator

closes #51

@akrherz

akrherz commented Aug 17, 2018

Copy link
Copy Markdown
Collaborator Author

This is intended as a bandaid until we fully remove the try: catch: in the next release. #56

@codecov-io

codecov-io commented Aug 17, 2018

Copy link
Copy Markdown

Codecov Report

Merging #55 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
+ Coverage   70.53%   70.59%   +0.05%     
==========================================
  Files           4        4              
  Lines        1008     1010       +2     
==========================================
+ Hits          711      713       +2     
  Misses        297      297
Impacted Files Coverage Δ
metar/Metar.py 66.29% <100%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94a48ea...70fec54. Read the comment docs.

@coveralls

coveralls commented Aug 17, 2018

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 44

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 70.594%

Totals Coverage Status
Change from base Build 41: 0.06%
Covered Lines: 713
Relevant Lines: 1010

💛 - Coveralls

@akrherz

akrherz commented Aug 17, 2018

Copy link
Copy Markdown
Collaborator Author

Adding a test here that actually generates an exception is rather funny, since if we have parsing code that raises exceptions, we should fix that bug! 🙂

I'm an idiot, I'll await a bit to wake up some more and see about adding a test

@akrherz

akrherz commented Aug 17, 2018

Copy link
Copy Markdown
Collaborator Author

I have a test in and realize now that known Exceptions can come from other places than just Metar, this all will take some consideration for the API.

@akrherz

akrherz commented Aug 17, 2018

Copy link
Copy Markdown
Collaborator Author

Thanks @phobson , I'd like to see if @WeatherGod chimes in on this prior to merging. Will wait a bit while I work on a PR for a formal release. Or are we still not close enough for what you need for cloudside to use?

@akrherz akrherz changed the title extent Metar constructor strict to cover all ParserErrors extend Metar constructor strict to cover all ParserErrors Aug 17, 2018
@phobson

phobson commented Aug 17, 2018

Copy link
Copy Markdown
Collaborator

With current master, here's what the most recent changes have allowed me to do in cloudside :)

Geosyntec/cloudside#35 (note all the deletions!)

@phobson

phobson commented Aug 20, 2018

Copy link
Copy Markdown
Collaborator

To clear: strictly speaking, this change is not necessary for cloudside to function as intended, but may help preventing ASOS's weirder codes from being completely ignored.

Punting on this in favor of more robust error handling would be fine by me.

@akrherz

akrherz commented Aug 20, 2018

Copy link
Copy Markdown
Collaborator Author

Thanks @phobson , this change does not impact previous code behavior, so will take this PR now so to proceed with a release.

@akrherz akrherz merged commit 5b4e2e9 into python-metar:master Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow ParserErrors to not raise

4 participants