Skip to content

Commit

Permalink
Merge pull request #153 from /issues/150
Browse files Browse the repository at this point in the history
fixes #150 - 0.6.0 release
  • Loading branch information
jantman authored Nov 12, 2017
2 parents 2ad6455 + 8da37b0 commit 3f89211
Show file tree
Hide file tree
Showing 24 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changelog
=========

Unreleased Changes
0.6.0 (2017-11-11)
------------------

* `PR #140 <https://github.com/jantman/biweeklybudget/issues/140>`_ - Support user-configurable currencies and currency formatting.
Expand Down
2 changes: 1 addition & 1 deletion biweeklybudget/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@
################################################################################
"""

VERSION = '0.5.0'
VERSION = '0.6.0'
PROJECT_URL = 'https://github.com/jantman/biweeklybudget'
2 changes: 1 addition & 1 deletion dev/github_releaser.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _get_markdown(self):
markdown = subprocess.check_output(cmd)
buf = ''
in_ver = False
for line in markdown.split("\n"):
for line in markdown.decode().split("\n"):
if not in_ver and line.startswith('## %s ' % _VERSION):
in_ver = True
elif in_ver and line.startswith('## '):
Expand Down
18 changes: 11 additions & 7 deletions dev/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ def run(self):
@steps.register(6)
class EnsurePushed(BaseStep):

always_run = True

def run(self):
self._ensure_pushed()

Expand All @@ -177,7 +179,7 @@ def run(self):
if result is not True:
input('Revise Changelog and then press any key.')
continue
url = self._gist(md)
url = self._gh._gist(md)
logger.info('Gist URL: <%s>', url)
result = prompt_user('Does the gist at <%s> look right?' % url)
self._ensure_pushed()
Expand All @@ -186,6 +188,8 @@ def run(self):
@steps.register(8)
class ConfirmTravisAndCoverage(BaseStep):

always_run = True

def run(self):
commit = self._current_commit
logger.info('Polling for finished TravisCI build of %s', commit)
Expand Down Expand Up @@ -244,9 +248,9 @@ def run(self):
res.returncode, res.stdout.decode()
)
fail('%s failed.' % ' '.join(cmd))
cmd = ['twine', 'upload', '-r', 'test', 'dist/*']
cmd = ' '.join(['twine', 'upload', '-r', 'test', 'dist/*'])
logger.info(
'Running: %s (cwd=%s)', ' '.join(cmd), projdir
'Running: %s (cwd=%s)', cmd, projdir
)
res = subprocess.run(
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
Expand Down Expand Up @@ -503,16 +507,17 @@ def run(self):
'the release is complete.', VERSION
)
raise SystemExit(1)
is_git_dirty(raise_on_dirty=True)
self.release_issue_num = self._release_issue_number
if self.release_issue_num is None:
self.release_issue_num = self._open_release_issue()
self._record_successful_step(0)
is_git_dirty(raise_on_dirty=True)
last_step = self._last_step
for stepnum in steps.step_numbers:
if stepnum <= last_step:
cls = steps.step(stepnum)
if stepnum <= last_step and not cls.always_run:
logger.debug('Skipping step %d - already completed', stepnum)
continue
cls = steps.step(stepnum)
logger.info('Running step %d (%s)', stepnum, cls.__name__)
cls(self.gh, self.travis, self.release_issue_num).run()
self._record_successful_step(stepnum)
Expand Down Expand Up @@ -589,4 +594,3 @@ def _open_release_issue(self):
)
)
).run()
raise NotImplementedError('Uncomment is_git_dirty call in run()')
22 changes: 15 additions & 7 deletions dev/release_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _latest_travis_build(self, commit):
b = self._travis.builds(
slug='jantman/biweeklybudget', number=bnum
)[0]
if b.commit_id == commit:
if b.commit.sha == commit:
return b
return None

Expand Down Expand Up @@ -179,6 +179,8 @@ def step(self, stepnum):

class BaseStep(object):

always_run = False

def __init__(self, github_releaser, travis_checker, issue_num):
self._gh = github_releaser
self._travis = travis_checker
Expand All @@ -189,13 +191,18 @@ def run(self):

@property
def _current_branch(self):
res = subprocess.run(['git', 'rev-parse', '--abbrev-ref', 'HEAD'])
return res.stdout.strip()
res = subprocess.run(
['git', 'rev-parse', '--abbrev-ref', 'HEAD'],
stdout=subprocess.PIPE
)
return res.stdout.decode().strip()

@property
def _current_commit(self):
res = subprocess.run(['git', 'rev-parse', 'HEAD'])
return res.stdout.strip()
res = subprocess.run(
['git', 'rev-parse', 'HEAD'], stdout=subprocess.PIPE
)
return res.stdout.decode().strip()

def _ensure_committed(self):
while is_git_dirty():
Expand All @@ -211,8 +218,9 @@ def _ensure_pushed(self):
subprocess.run(['git', 'fetch'])
local_ref = self._current_commit
rmt_ref = subprocess.run(
['git', 'rev-parse', 'origin/%s' % self._current_branch]
).stdout.strip()
['git', 'rev-parse', 'origin/%s' % self._current_branch],
stdout=subprocess.PIPE
).stdout.decode().strip()
pushed = local_ref == rmt_ref
if not pushed:
input(
Expand Down
Binary file modified docs/source/account1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/account1_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/accounts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/accounts_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/budget2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/budget2_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/budgets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/budgets_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/credit-payoff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/credit-payoff_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/fuel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/fuel_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/index_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion docs/source/jsdoc.custom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ File: ``biweeklybudget/flaskapp/static/js/custom.js``

.. js:function:: fmt_currency(value)

Format a float as currency
Format a float as currency. If ``value`` is null, return ``&nbsp;``.
Otherwise, construct a new instance of ``Intl.NumberFormat`` and use it to
format the currency to a string. The formatter is called with the
``LOCALE_NAME`` and ``CURRENCY_CODE`` variables, which are templated into
the header of ``base.html`` using the values specified in the Python
settings module.

:param number value: the number to format
:returns: **string** -- The number formatted as currency
Expand Down
Binary file modified docs/source/payperiod.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/payperiod_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/payperiods.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/payperiods_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3f89211

Please sign in to comment.