Exemple #1
0
 def test_all_versions(self):
     """Test to display all versions"""
     ref = psyplot.get_versions()
     proc = spr.Popen([sys.executable, '-m', 'psyplot', '-aV'],
                      stdout=spr.PIPE, stderr=spr.PIPE)
     proc.wait()
     self.assertFalse(proc.poll(), msg=proc.stderr.read())
     d = yaml.load(proc.stdout.read(), yaml.Loader)
     d.pop('psyplot_gui', None)
     ref.pop('psyplot_gui', None)
     self.assertEqual(d, ref)
Exemple #2
0
 def show_dependencies(self, exec_=None):
     """Open a dialog that shows the dependencies"""
     if hasattr(self, 'dependencies'):
         try:
             self.dependencies.close()
         except RuntimeError:
             pass
     self.dependencies = dlg = DependenciesDialog(psyplot.get_versions(),
                                                  parent=self)
     dlg.resize(630, 420)
     if exec_:
         dlg.exec_()
Exemple #3
0
 def show_dependencies(self, exec_=None):
     """Open a dialog that shows the dependencies"""
     if hasattr(self, 'dependencies'):
         try:
             self.dependencies.close()
         except RuntimeError:
             pass
     self.dependencies = dlg = DependenciesDialog(psyplot.get_versions(),
                                                  parent=self)
     dlg.resize(630, 420)
     if exec_:
         dlg.exec_()
Exemple #4
0
 def test_all_versions(self):
     """Test to display all versions"""
     ref = psyplot.get_versions()
     proc = spr.Popen([sys.executable, '-m', 'psyplot', '-aV'],
                      stdout=spr.PIPE,
                      stderr=spr.PIPE)
     proc.wait()
     self.assertFalse(proc.poll(), msg=proc.stderr.read())
     d = yaml.load(proc.stdout.read(), yaml.Loader)
     d.pop('psyplot_gui', None)
     ref.pop('psyplot_gui', None)
     # make sure the version does not end with .dirty
     d["psyplot"]["version"] = d["psyplot"]["version"].replace(".dirty", "")
     ref["psyplot"]["version"] = ref["psyplot"]["version"].replace(
         ".dirty", "")
     self.assertEqual(d, ref)
Exemple #5
0
 def about(self):
     """About the tool"""
     versions = {
         key: d['version']
         for key, d in psyplot.get_versions(False).items()
     }
     versions.update(psyplot_gui.get_versions()['requirements'])
     versions.update(psyplot._get_versions()['requirements'])
     versions['github'] = 'https://github.com/psyplot/psyplot'
     versions['author'] = psyplot.__author__
     QMessageBox.about(
         self, "About psyplot",
         u"""<b>psyplot: Interactive data visualization with python</b>
         <br>Copyright &copy; 2017- Philipp Sommer
         <br>Licensed under the terms of the GNU General Public License v2
         (GPLv2)
         <p>Created by %(author)s</p>
         <p>Most of the icons come from the
         <a href="https://www.iconfinder.com/"> iconfinder</a>.</p>
         <p>For bug reports and feature requests, please go
         to our <a href="%(github)s">Github website</a> or contact the
         author via mail.</p>
         <p>This package uses (besides others) the following packages:<br>
         <ul>
             <li>psyplot %(psyplot)s</li>
             <li>Python %(python)s </li>
             <li>numpy %(numpy)s</li>
             <li>xarray %(xarray)s</li>
             <li>pandas %(pandas)s</li>
             <li>psyplot_gui %(psyplot_gui)s</li>
             <li>Qt %(qt)s</li>
             <li>PyQt %(pyqt)s</li>
             <li>qtconsole %(qtconsole)s</li>
         </ul></p>
         <p>For a full list of requirements see the <em>dependencies</em>
         in the <em>Help</em> menu.</p>
         <p>This software is provided "as is", without warranty or support
         of any kind.</p>""" % versions)
Exemple #6
0
 def about(self):
     """About the tool"""
     versions = {
         key: d['version'] for key, d in psyplot.get_versions(False).items()
         }
     versions.update(psyplot_gui.get_versions()['requirements'])
     versions.update(psyplot._get_versions()['requirements'])
     versions['github'] = 'https://github.com/Chilipp/psyplot'
     versions['author'] = psyplot.__author__
     QMessageBox.about(
         self, "About psyplot",
         u"""<b>psyplot: Interactive data visualization with python</b>
         <br>Copyright &copy; 2017- Philipp Sommer
         <br>Licensed under the terms of the GNU General Public License v2
         (GPLv2)
         <p>Created by %(author)s</p>
         <p>Most of the icons come from the
         <a href="https://www.iconfinder.com/"> iconfinder</a>.</p>
         <p>For bug reports and feature requests, please go
         to our <a href="%(github)s">Github website</a> or contact the
         author via mail.</p>
         <p>This package uses (besides others) the following packages:<br>
         <ul>
             <li>psyplot %(psyplot)s</li>
             <li>Python %(python)s </li>
             <li>numpy %(numpy)s</li>
             <li>xarray %(xarray)s</li>
             <li>pandas %(pandas)s</li>
             <li>psyplot_gui %(psyplot_gui)s</li>
             <li>Qt %(qt)s</li>
             <li>PyQt %(pyqt)s</li>
             <li>qtconsole %(qtconsole)s</li>
         </ul></p>
         <p>For a full list of requirements see the <em>dependencies</em>
         in the <em>Help</em> menu.</p>
         <p>This software is provided "as is", without warranty or support
         of any kind.</p>"""
         % versions)
Exemple #7
0
 def __call__(self, parser, namespace, values, option_string=None):
     print(yaml.dump(psyplot.get_versions(), default_flow_style=False))
     sys.exit(0)