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

Simulation progress improvments #252

Merged
merged 6 commits into from
Feb 20, 2019

Conversation

ManInFez
Copy link
Contributor

resolves #251

@ghost ghost assigned ManInFez Feb 12, 2019
@ghost ghost added in progress labels Feb 12, 2019
Copy link
Contributor

@lars-petter-hauge lars-petter-hauge left a comment

Choose a reason for hiding this comment

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

Found an error that kinda messed up the testing a bit (ref #253 ), but unrelated to this.

Look through the comments and then this should be good to go.

@@ -2,7 +2,7 @@
import time
try:
from PyQt4.QtCore import QTimer, pyqtSignal, QVariant, Qt, QAbstractTableModel
from PyQt4.QtGui import QWidget, QPainter, QColor, QFrame, QGridLayout, QImage, QDialog, QTableView, QLabel
from PyQt4.QtGui import QWidget, QPainter, QColor, QFrame, QGridLayout, QImage, QDialog, QTableView, QLabel, QPen
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't you need import of QPen both for pyqt4 and 5?

Copy link
Contributor

Choose a reason for hiding this comment

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

and for the others as well? e.g. QPainter

Copy link
Contributor

Choose a reason for hiding this comment

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

A quick test just to verify at least imports would be nice, ert tests are run with both python2.7/pyqt4 and python4/pyqt5

@@ -81,12 +88,26 @@ def paintEvent(self, event):
for index, (iens, progress) in enumerate(self._current_progress):
y = int(iens / self.grid_width)
x = int(iens - (y * self.grid_width))

#painter.drawText(x * cell_width + cell_width / 2, y * cell_height + cell_height / 2, str(iens))
Copy link
Contributor

Choose a reason for hiding this comment

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

trailing comment :)

@@ -52,6 +52,13 @@ def set_progress(self, progress, iteration):
self._current_iteration = iteration
self.update()

def has_realization_failed(self, progress):
for job in progress:
Copy link
Contributor

Choose a reason for hiding this comment

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

return any((job.status == 'Failure' for job in progress))

?

Copy link
Contributor

@lars-petter-hauge lars-petter-hauge left a comment

Choose a reason for hiding this comment

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

Thanks for fixing and including the suggestions!

@ManInFez ManInFez merged commit 6a350ba into equinor:master Feb 20, 2019
@ghost ghost removed in progress labels Feb 20, 2019
@ManInFez ManInFez deleted the simulation_progress_improvments branch February 20, 2019 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve visuals of simulation progress dialog
3 participants