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

0.12 Backports #1444

Merged
merged 75 commits into from
Aug 5, 2020
Merged

0.12 Backports #1444

merged 75 commits into from
Aug 5, 2020

Conversation

dopplershift
Copy link
Member

Description Of Changes

Merging in all the PRs that we want on 0.12.2. This is a lot bigger than normal because of the massive CI overhaul.

This apparently will be the default and the option is going away (in
favor of opting-in to capture the output). Removing it silences a
warning.
@CLAassistant
Copy link

CLAassistant commented Aug 5, 2020

CLA assistant check
All committers have signed the CLA.

@dopplershift dopplershift added this to the 0.12.2 milestone Aug 5, 2020
Copy link
Member Author

@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.

Wow, doesn't look like much will need fixing up.

docs/index.rst Outdated
@@ -39,14 +39,8 @@ out our :doc:`Getting Started <startingguide>` guide. Development is
supported by the National Science Foundation through grants AGS-1344155,
OAC-1740315, AGS-1901712.

MetPy follows `semantic versioning <https://semver.org>`_ in its version number. With our
current 0.x version, that implies that MetPy's APIs (application programming interfaces) are
Copy link
Member Author

Choose a reason for hiding this comment

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

Probably want to roll most of this back, with the exception of the updated gallery link.

@@ -114,8 +114,9 @@ def test_convert_units(test_var):
assert units(test_var.attrs['units']) == units('degC')
Copy link
Member Author

Choose a reason for hiding this comment

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

@jthielen Can you sanity check me on this test_convert_units test? I can't see any way that this was correct, at least in the days before we had the integration between xarray and pint working like it does now. It was confusing to see the test suddenly fail, and I want to make sure that I'm right that it should have been failing all along.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The diff in this test here doesn't seem to be doing anything meaningful, unless something is broken under the hood in assert_almost_equal. Does this diff make a difference between passing and failing?

Since I'm not completely sure what is the direct cause for confusion, here are some notes below:

This particular line

assert units(test_var.attrs['units']) == units('degC')

was updated back in #1144 since Pint changed its canonical string for °C from degC to degrees_Celsius, so we can't do string comparison, but comparison of units is still fine.

But, this whole test is no longer valid after Quantity-in-xarray was introduced and after we moved away from in-place unit conversions, hence why this test on master is currently:

def test_convert_units(test_var):
    """Test conversion of units."""
    result = test_var.metpy.convert_units('degC')

    # Check that units are updated without modifying original
    assert result.metpy.units == units.degC
    assert test_var.metpy.units == units.kelvin

    # Make sure we now get an array back with properly converted values
    assert_almost_equal(result[0, 0, 0, 0], 18.44 * units.degC, 2)

This test definitely relies on assert_almost_equal automatically converting DataArrays to their corresponding unit arrays, hence why it should have worked fine before this diff, and I don't see what the diff in effect changed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it should rely on that. That test did fail on one of the earlier runs. The test passes on 0.12.1. It turns out, though, that the only reason that test passed was because we were swallowing an AttributeError when calling .to() on a DataArray. I think the right way to do this for a bugfix release is to put back the AttributeError clause in check_and_drop_units() since that change wasn't necessary (and I'm not sure where it snuck in).

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, the change to testing crept in on 771cbf0. I'll pop that off and my most recent change to the test.

dopplershift and others added 21 commits August 5, 2020 14:45
This adds a full suite of jobs to handle building docs on Linux, as well
as running tests on Linux (using PyPI) and on Windows/Mac using Conda.
Instead of relying on what's encoded in setup.py and a bunch of manual
additions (Travis) or an environment.yml (AppVeyor), we have requirement
and constraint files that get passed/swapped depending on what kind of
build we're running. This allows us to pin versions and hopefully let
dependabot manage the updates to these so that CI doesn't fail due to
the ecosystem updating.
WMO has put older versions like 2014 behind a login screen. Just update
the link to the 2018 version which still has the formula.
This one AMS journal DOI resolves to a link that produces 403 errors for
the linkchecker. It resolves in the browser, and it's a DOI so should be
stable. Just ignore.
Use our new requirement files to determine dependencies. Also remove a
bunch of cruft now that we've moved to Ubuntu 18.04 on Travis and also
no longer need to worry about building and uploading wheels.
Will update further once we have solidified what we're doing with GitHub
vs. Travis.
Thanks for the Windows builds. Also thanks for being one of the bigger
pains in my butt--I still can't get rid of the email notifications.
Uses reviewdog (a Go tool) to report flake8 error messages using GitHub
API.
Need to see if any of these extras are worth it, but we can leave these
linting things as configuration details for the actions. They're also
now more accurately reflected in linting_requirements.txt.
It's not even part of the doc dependencies any more.
This way we can at least tell what the failing line was.
This should be the final part of our new CI setup, handling updates to
our pinned dependencies.
Bumps [pyflakes](https://github.com/PyCQA/pyflakes) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/PyCQA/pyflakes/releases)
- [Changelog](https://github.com/PyCQA/pyflakes/blob/master/NEWS.rst)
- [Commits](PyCQA/pyflakes@2.1.1...2.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
dopplershift and others added 22 commits August 5, 2020 14:46
Was failing to build CartoPy without NumPy installed first.
We renamed some dependency files, so we need to make sure the hashes for
the caches reflect this.
We removed all linting from the test install, so need to remove
pytest-flake8. Also remove the totally useless and unused [dev] install
target.
Use 1.5.3 since that's what's installable on conda on Windows right now.
-Removing Inoperable 'Say Thanks' Link
Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/matplotlib/matplotlib/releases)
- [Commits](matplotlib/matplotlib@v3.2.1...v3.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
This is no longer needed since we're on newer matplotlib versions. Also,
now this fixture actually *causes* problems because matplotlib is
relying on builtin round returning an int (when not asking for digits),
which numpy's does not do.
A few items got deprecated/removed and need updating.
Trying to eliminate false alarm with small decreases in coverage caused
by deleting lines.
Since there's no interdependency between the jobs, just make them
separate workflows. This helps with the fact that you can't restart
individual job instances and can only restart a workflow.
This may or may not be faster than downloading as needed from Natural
Earth. It should at least be more reliable.
This allows it to fallback and re-use as much as possible.
Need to be able to run on 0.12.x branch
Slight change to rotation calculation results in subtle pixel-level
changes, so update the tolerances--the changes aren't big enough to
warrant new images.
@dopplershift dopplershift merged commit 1e3e962 into Unidata:0.12.x Aug 5, 2020
@dopplershift dopplershift deleted the 0.12-backports branch August 5, 2020 21:37
@mikecharles
Copy link

Hey, how long does it take for a release to become available on conda-forge?

@akrherz
Copy link
Contributor

akrherz commented Aug 6, 2020

Hey, how long does it take for a release to become available on conda-forge?

Not long now, conda-forge/metpy-feedstock#41

@dopplershift
Copy link
Member Author

Usually a matter of hours. Just getting the package recipe updated (we waited for their update bot to do make the PR to bump it) and the packages to build and show up on the Anaconda CDN. Currently the package is up on anaconda.org so it's a matter of waiting for the CDN to get them (usually about 20 minutes).

@mikecharles
Copy link

Got it, thank you!

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.

8 participants