Skip to content

Conversation

jklenzing
Copy link
Member

@jklenzing jklenzing commented Apr 1, 2020

Description

Addresses #22 and #24.

  • Uses the new pysat_testmodel object in test_utils_extract to more closely simulate how the code will be used.
  • Updates custom.add to custom.attach in collect_inst_model_pairs to match pysat 3.0.0 syntax.
  • Implements netcdf fixes in travis environment documented in Netcdf4 export pysat#401 and BUG/TST: netCDF4 failure in travis CI pysat#383. These were keeping pysat from loading.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality
    to not work as expected)

How Has This Been Tested?

Tested locally and on Travis CI using pytest.

Test Configuration:

  • Mac OSX 10.15.4
  • python 3.7.3

Checklist:

  • Make sure you are merging into the develop (not master) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes

@jklenzing
Copy link
Member Author

@aburrell, I can wrap the custom.attach statement with a try / except to also let older versions of pysat to run for now, if you prefer. Not sure which branches you're using for development.

Also looking into a long-term solution for the Travis CI environment issues over at pysat to simplify code and testing for other packages.

@jklenzing jklenzing requested a review from aburrell April 1, 2020 19:13
@jklenzing jklenzing mentioned this pull request Apr 1, 2020
10 tasks
@jklenzing jklenzing added the bug Something isn't working label Apr 1, 2020
@aburrell
Copy link
Member

aburrell commented Apr 1, 2020

Also looking into a long-term solution for the Travis CI environment issues over at pysat to simplify code and testing for other packages.

Good to hear.

Moving to attach is fine, but that does mean we should probably remove the python 2.7 support.

@jklenzing
Copy link
Member Author

OK. Will do that here.

@jklenzing
Copy link
Member Author

The error in the PR is due to something new in develop. Looks like the updates from #28 no longer give a ValueError when there is no data. Writing up an issue.

@jklenzing jklenzing merged commit b611896 into develop Apr 1, 2020
@jklenzing jklenzing deleted the test_bugfix branch April 1, 2020 22:27
@aburrell
Copy link
Member

aburrell commented Apr 2, 2020

How nice to have actual unit tests so we can adapt them for new behaviour. The test should be changed to IOError, probably.

@jklenzing
Copy link
Member Author

It's very nice to have tests! If I run collect_inst_model_pairs in ipython without the model_load_kwargs keyword, no error is generated. Should we generate an error, or remove the test?

@aburrell
Copy link
Member

aburrell commented Apr 2, 2020

We should be testing all possible error raises, so no, let's not remove the test. Let's generate the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants