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

Printing/repr improvements #154

Merged
merged 3 commits into from
Sep 15, 2017
Merged

Printing/repr improvements #154

merged 3 commits into from
Sep 15, 2017

Conversation

dopplershift
Copy link
Member

This has a few improvements to string representations and printing to help when working interactively (i.e. in the notebook)

  • Add __repr__ (which is just the same as __str__) to Dataset and friends for the CDM Remote interface. This just makes it easier to get to them in the notebook
  • Add a __str__ method to catalog.datasets to make it easier to print out what datasets are available without needing to manually call list.

This enhances behavior in the notebook.
This just prints out a list of the datasets, which is pretty much what
you always want.
@CLAassistant
Copy link

CLAassistant commented Sep 14, 2017

CLA assistant check
All committers have signed the CLA.

@dopplershift
Copy link
Member Author

Well that makes me feel good, a combination of deleting our old Python 3.7 netCDF4 package and fixing a stupid test gets us green on the Python 3.7 nightly build.

No clue why it was ever deemed a good idea to use string representation
of a value to check this (maybe no numpy dependence at the time?), but
it's breaking on Python 3.7. Move to a proper test with
assert_almost_equal.
Copy link
Contributor

@jrleeman jrleeman left a comment

Choose a reason for hiding this comment

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

Looks good!

@jrleeman jrleeman merged commit d691605 into Unidata:master Sep 15, 2017
@dopplershift dopplershift deleted the printing branch September 15, 2017 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants