Reinstate CubeList._repr_html_()#4976
Conversation
|
Pure tests to start with -- proving that the test for |
|
... and that should fix it. |
|
Ok, naming @trexfeathers and @lbdreyer as possible reviewers. We need to consider the implications for this going in a 3.3.1 release. |
|
Regarding
Rather than editing latest.rst. I think you just need to edit the 3.3.rst to add a section for bug fixes (as we did in https://github.com/SciTools/iris/pull/4604/files) and then add your whats new entry to this? |
Ok thanks, that makes sense ! |
lbdreyer
left a comment
There was a problem hiding this comment.
Tests look great! Just a few small comments
| def test_two_with_same_name(self, cube): | ||
| # If a cube has two _DimensionalMetadata objects with the same name, the | ||
| def test_two_with_same_name(self, simplecube): | ||
| # If a simplecube has two _DimensionalMetadata objects with the same name, the |
There was a problem hiding this comment.
I don't think you need to update these comments as "If a cube has two _DimensionalMetadata objects..." makes sense
There was a problem hiding this comment.
👍 Rename+replace gone too far !
| class TestReprs: | ||
| """ | ||
| Confirm that str(cube), repr(cube) and cube.summary() work by creating a fresh | ||
| fresh :class:`iris._representation.cube_printout.CubePrinter` object, and using it |
There was a problem hiding this comment.
You have the word fresh twice here
"work by creating a fresh fresh :class:iris._representation.cube_printout.CubePrinter"
|
|
||
| target = "iris.experimental.representation.CubeListRepresentation" | ||
| instance_mock = mock.MagicMock( | ||
| repr_html=mock.MagicMock() # return_value='') # NB this must return a string |
There was a problem hiding this comment.
Is this true as the return value doesn't seem to be being used?
There was a problem hiding this comment.
👍 good spot !
Copied from the 'cube' case, where it did matter -- will fix.
|
Thanks @lbdreyer N.B. I am just about to check actual notebook output, but I tidied my conda + it is taking ages to build a test env ... |
|
Ok I think this will work now : |
Co-authored-by: lbdreyer <lbdreyer@users.noreply.github.com>
|
Whoops, Looks like there was a problem with the docs build from this merge: https://readthedocs.org/projects/scitools-iris/builds/18152663/ |
Some kind of HDF error, could be a bit of a random glitch ? |
|
Ok it has built, but my new whatsnew is not properly contained in the dropdown section |
* v3.3.x: Update whatsnew for 3.3.1 release (SciTools#5002) Port dependency fixes to `v3.3.x`. (SciTools#4992) Fix name loader problem (SciTools#4933) Reinstate CubeList._repr_html_() (SciTools#4976) # Conflicts: # .github/workflows/ci-tests.yml # requirements/ci/nox.lock/py310-linux-64.lock # requirements/ci/nox.lock/py38-linux-64.lock # requirements/ci/nox.lock/py39-linux-64.lock # requirements/ci/py310.yml # requirements/ci/py38.yml # requirements/ci/py39.yml # setup.cfg
🚀 Pull Request
To address #4973
NOTE: aiming this at a bugfix release, so it is derived from, and targetting '3.3.x' branch.
TODO: