Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PYME/DSView/modules/LMAnalysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ def analysis_refresh_bruteforce(self):


def update(self, dsviewer):
if 'fitInf' in dir(self) and not self.dsviewer.playbackpanel.tPlay.IsRunning():
if 'fitInf' in dir(self) and not self.dsviewer.playbackpanel.tPlay.playback_running:
try:
self.fitInf.UpdateDisp(self.view.PointsHitTest())
except:
Expand Down
9 changes: 9 additions & 0 deletions PYME/DSView/modules/playback.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#
##################
import os
from tests.PYME.Analysis.points.test_spherical_harmonics import R
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks fairly accidental


#import PYME.ui.autoFoldPanel as afp
import PYME.ui.manualFoldPanel as afp
Expand Down Expand Up @@ -190,6 +191,10 @@ def update(self):

if not self.tPlay.IsRunning():
self.dsviewer.optionspanel.RefreshHists()

@property
def playback_running(self):
return self.tPlay.IsRunning()


class PlayZTPanel(wx.Panel):
Expand Down Expand Up @@ -221,6 +226,10 @@ def update(self):
for p in self._pans:
p.update()

@property
def playback_running(self):
return self.pan_t.playback_running or self.pan_z.playback_running



class player:
Expand Down
25 changes: 21 additions & 4 deletions PYME/update_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
from datetime import datetime
import os
import subprocess
import urllib
import json

def hook(ui, repo, **kwargs):
update_version()
Expand All @@ -49,18 +51,33 @@ def update_version_hg():
def update_version():
now = datetime.utcnow()

p = subprocess.Popen('git describe --abbrev=12 --always --dirty=+', shell=True, stdout=subprocess.PIPE)
id = p.stdout.readline().strip().decode()
p = subprocess.Popen('git describe --abbrev=12 --always --dirty=+', shell=True, stdout=subprocess.PIPE, encoding='utf8')
id = p.stdout.readline().strip()

f = open(os.path.join(os.path.split(__file__)[0], 'version.py'), 'w')

new_version = '%d.%02d.%02d' % (now.year - 2000, now.month, now.day)

# check to see if there is already a release / tag with this version number,
# if there is, this is a post-release, append post<n>
p = subprocess.Popen('git tag', shell=True, stdout=subprocess.PIPE, encoding='utf8')
git_tags = [l.strip() for l in p.stdout.readlines()]

post_count=0
nv = new_version
while nv in git_tags:
nv = '%s.post%d' %(new_version, post_count)
post_count += 1

new_version = nv

f.write('#PYME uses date based versions (yy.m.d)\n')
f.write("version = '%d.%02d.%02d'\n\n" % (now.year - 2000, now.month, now.day))
f.write("version = '%s'\n\n" % new_version)
f.write('#Git changeset id\n')
f.write("changeset = '%s'\n" % id)
f.close()

print('PYMEVERSION=%d.%02d.%02d' %(now.year - 2000, now.month, now.day))
print('PYMEVERSION=%s' % new_version)

if __name__ == '__main__':
update_version()