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

Improved formatting of notes section of METAR parser #1908

Merged
merged 3 commits into from Jun 21, 2021

Conversation

23ccozad
Copy link
Contributor

Introduces bullet points in notes section of parse_metar_file() docs, making it much easier to read.

Old formatting of notes section for parse_metar_file():

img1

Improved formatting with this PR:

img2

Checklist

@23ccozad 23ccozad marked this pull request as ready for review June 10, 2021 19:45
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

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

This looks really good (and a lot more readable)! This is an opportunity to fix up some inconsistent things in here too: skyc1, wind_spd actually come out in the dataframe as low_cloud_type, wind_speed in the returned columns of df (there are others too.) We also add a few new columns before returning, only one of which is (incorrectly) mentioned in the docstring. You could dig through those a bit and get the names -> columns -> docs all lined up. I'd also invite you to make the same formatting change for parse_metar_to_dataframe. Thanks for putting this together!

@23ccozad
Copy link
Contributor Author

Docs should now be all lined up for parse_metar_to_dataframe(), parse_metar_to_named_tuple(), parse_metar_file(). But another set of eyes is always helpful, so please let me know if I missed anything.

@23ccozad 23ccozad added the Area: Docs Affects documentation label Jun 10, 2021
* 'dew_point_temperature': Dew point, measured in degrees Celsius
* 'altimeter': Altimeter value, measured in inches of mercury, float
* 'present_weather': Current weather symbol, integer
* 'past_weather': Past weather (1 of 2), integer
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be current_wx1_symbol - looks like I missed getting these changed in the PR that I did to modify the naming convention to be inline with what we said should be coming out of the METAR parser. So we'll want to change that here so that present_weather becomes current_wx1_symbol, past_weather becomes current_wx2_symbol, and past_weather2 becomes current_wx3_symbol.

@23ccozad 23ccozad requested a review from dcamron June 11, 2021 14:52
dcamron
dcamron previously approved these changes Jun 11, 2021
Copy link
Member

@dcamron dcamron left a comment

Choose a reason for hiding this comment

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

Looks great to me!

Copy link
Member

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

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

This looks really good. I just found a few existing deficiencies that would be good to clean up while we're here.

* 'cloud_coverage': Cloud cover measured in oktas, taken from maximum of sky cover values
* 'air_temperature': Temperature, measured in degrees Celsius
* 'dew_point_temperature': Dew point, measured in degrees Celsius
* 'altimeter': Altimeter value, measured in inches of mercury, float
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove the float here and under air_pressure_at_sea_level since they're the only ones that list it. I doubt it's helping anyone.

Copy link
Member

Choose a reason for hiding this comment

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

(and of course in the other places as well)

* 'air_temperature': Temperature, measured in degrees Celsius
* 'dew_point_temperature': Dew point, measured in degrees Celsius
* 'altimeter': Altimeter value, measured in inches of mercury, float
* 'current_wx1_symbol': Current weather symbol (1 of 3), integer
Copy link
Member

Choose a reason for hiding this comment

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

How about instead of just integer, we go with WMO integer code and reference WMO 306 Vol 1 Part A (Attachment IV)? Would also be good to update the our existing reference since it looks like they moved it on us?

Copy link
Member

Choose a reason for hiding this comment

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

(and of course in the other places as well)

Updates parse_metar_to_dataframe() to return a dataframe with columns named current_wx1_symbol, current_wx2_symbol, and current_wx3_symbol, instead of current_weather, past_weather, and past_weather2
@23ccozad
Copy link
Contributor Author

Not quite sure why flake8 doesn't like my usage of [WMO306]_ 🤔

@dopplershift
Copy link
Member

If you look at setup.cfg, we already ignore RST306 for a few files. I think time to add this to the list. Or try to fix peterjc/flake8-rst-docstrings#26. (Not actually proposing that.)

@dopplershift dopplershift added the Type: Bug Something is not working like it should label Jun 21, 2021
@dopplershift dopplershift added this to the 1.1.0 milestone Jun 21, 2021
@dopplershift dopplershift merged commit c005c61 into Unidata:main Jun 21, 2021
@23ccozad 23ccozad deleted the metar_parser_docs branch June 28, 2021 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Docs Affects documentation Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

METAR Parser Documentation Improvement
4 participants