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

Update metar.py default year, month to keyword-only and None #1523

Merged
merged 2 commits into from Oct 2, 2020
Merged

Update metar.py default year, month to keyword-only and None #1523

merged 2 commits into from Oct 2, 2020

Conversation

dcamron
Copy link
Member

@dcamron dcamron commented Oct 2, 2020

parse_metar_to_dataframe and parse_metar_file relied on defaulting year, month to datetime.now sequentially on import. Now defaults to None on import and sets unspecified year and/or month to simultaneous now on function call. Updated these to keyword-only arguments. Other than that, behaves identically to before, and not sure if we want to discuss any further default changes while already here. e.g. currently if only one of year/month is specified, this will just set the other to now and carry on with its business.

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.

Just some lint to clean up, but otherwise I think this is good to go.

@dopplershift dopplershift added this to the 1.0 milestone Oct 2, 2020
@dopplershift dopplershift added Area: IO Pertains to reading data Type: Bug Something is not working like it should labels Oct 2, 2020
`parse_metar_to_dataframe` and `parse_metar_file` relied on defaulting
to `datetime.now` sequentially in function signature. Now defaults to
`None` and on None sets unspecified year and/or month to same `now`.
@dopplershift dopplershift merged commit aa6b53d into Unidata:master Oct 2, 2020
@dcamron dcamron deleted the parse_metar_defaults branch October 2, 2020 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: IO Pertains to reading data Type: Bug Something is not working like it should
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change defaults for parse_metar_file
3 participants