Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-2588

Catch RuntimeError on matplotlib.pyplot import and remove more unprotected/unnecesary pyplot imports

    XMLWordPrintable

    Details

    • Team:
      SQuaRE

      Description

      Catch RuntimeError in addition to ImportError when testing for matplotlib with things like:

      from matplotlib import pyplot
      import matplotlib.pyplot as plt
      

      I have some weird issue on my laptop where

      from matplotlib import pyplot
      

      throws a RuntimeError when DISPLAY is unset.
      scons unsets DISPLAY when compiling.

      This bug has allowed me to notice a few unncessary imports of pyplot, particular in test cases.

        Attachments

          Issue Links

            Activity

            Hide
            rowen Russell Owen added a comment -
            Show
            rowen Russell Owen added a comment - Michael Wood-Vasey correct
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            meas_modelfit tickets/DM-2588 has been merged into master.

            meas_algorithms tickets/DM-2588 remains unmerged.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - meas_modelfit tickets/ DM-2588 has been merged into master . meas_algorithms tickets/ DM-2588 remains unmerged.
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            Just to reassure everyone, I did a test Jenkins build with tickets/DM-2588 and it passed.

            [Yes, this technically means that I tested {{meas_modelfit}} and {{meas_algorithms}} under tickets/DM-2588 for each, even though what I merged is just tickets/DM-2588 for {{meas_modelfit}}, but trust me, it's going to be fine.]

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - Just to reassure everyone, I did a test Jenkins build with tickets/ DM-2588 and it passed. [Yes, this technically means that I tested {{meas_modelfit}} and {{meas_algorithms}} under tickets/DM-2588 for each, even though what I merged is just tickets/DM-2588 for {{meas_modelfit}}, but trust me, it's going to be fine.]
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            I'm formally leaving the change in meas_alogirthms tickets/DM-2588 as unmerged as "won't fix".

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - I'm formally leaving the change in meas_alogirthms tickets/ DM-2588 as unmerged as "won't fix".
            Hide
            wmwood-vasey Michael Wood-Vasey added a comment -

            meas_modelfit changes accepted

            The addition of catching RuntimeError in the matplotlib import in meas_algorithms was not accepted. This problem has not apparently caught anyone else in the past year, so I will leave this part of the issue as won't fix, but overall this issue is now Done.

            Show
            wmwood-vasey Michael Wood-Vasey added a comment - meas_modelfit changes accepted The addition of catching RuntimeError in the matplotlib import in meas_algorithms was not accepted. This problem has not apparently caught anyone else in the past year, so I will leave this part of the issue as won't fix, but overall this issue is now Done.

              People

              Assignee:
              wmwood-vasey Michael Wood-Vasey
              Reporter:
              wmwood-vasey Michael Wood-Vasey
              Reviewers:
              Jim Bosch
              Watchers:
              Jim Bosch, John Swinbank, Mario Juric, Michael Wood-Vasey, Robert Lupton, Russell Owen, Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                    Jenkins

                    No builds found.