summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-06 04:33:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-06 04:33:16 +0000
commit4d168f7fc6e70d19be0229733836e319ec4911a4 (patch)
tree138881acfae4b0776c6f748282f8048a7f7223f1
parentAdding upstream version 1.24.4. (diff)
downloadmycli-upstream/1.25.0.tar.xz
mycli-upstream/1.25.0.zip
Adding upstream version 1.25.0.upstream/1.25.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--CONTRIBUTING.md28
-rw-r--r--README.md2
-rw-r--r--changelog.md8
-rw-r--r--mycli/__init__.py2
-rwxr-xr-xmycli/main.py3
-rw-r--r--mycli/myclirc3
-rwxr-xr-xrelease.py5
-rw-r--r--requirements-dev.txt14
-rwxr-xr-xsetup.py4
9 files changed, 53 insertions, 16 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 124b19a..3075600 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -49,16 +49,16 @@ You'll always get credit for your work.
$ pip install --editable .
```
-6. Create a branch for your bugfix or feature based off the `master` branch:
+6. Create a branch for your bugfix or feature based off the `main` branch:
```bash
- $ git checkout -b <name-of-bugfix-or-feature> master
+ $ git checkout -b <name-of-bugfix-or-feature> main
```
7. While you work on your bugfix or feature, be sure to pull the latest changes from `upstream`. This ensures that your local codebase is up-to-date:
```bash
- $ git pull upstream master
+ $ git pull upstream main
```
8. When your work is ready for the mycli team to review it, push your branch to your fork:
@@ -135,3 +135,25 @@ $ ./setup.py lint --fix
```
Be sure to commit and push any PEP 8 fixes.
+
+## Releasing a new version of mycli
+
+You have been made the maintainer of `mycli`? Congratulations! We have a release script to help you:
+
+```sh
+> python release.py --help
+Usage: release.py [options]
+
+Options:
+ -h, --help show this help message and exit
+ -c, --confirm-steps Confirm every step. If the step is not confirmed, it
+ will be skipped.
+ -d, --dry-run Print out, but not actually run any steps.
+```
+
+To release a new version of the package:
+
+* Create and merge a PR to bump the version in the changelog ([example PR](https://github.com/dbcli/mycli/pull/1043)).
+* Pull `main` and bump the version number inside `mycli/__init__.py`. Do not check in - the release script will do that.
+* Make sure you have the dev requirements installed: `pip install -r requirements-dev.txt -U --upgrade-strategy only-if-needed`.
+* Finally, run the release script: `python release.py`.
diff --git a/README.md b/README.md
index cc04a91..1fefeec 100644
--- a/README.md
+++ b/README.md
@@ -141,7 +141,7 @@ If you're interested in contributing to this project, first of all I would like
to extend my heartfelt gratitude. I've written a small doc to describe how to
get this running in a development setup.
-https://github.com/dbcli/mycli/blob/master/CONTRIBUTING.md
+https://github.com/dbcli/mycli/blob/main/CONTRIBUTING.md
Please feel free to reach out to me if you need help.
diff --git a/changelog.md b/changelog.md
index b5522d2..01040ae 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,11 @@
+1.25.0 (2022/04/02)
+===================
+
+Features:
+---------
+* Add `beep_after_seconds` option to `~/.myclirc`, to ring the terminal bell after long queries.
+
+
1.24.4 (2022/03/30)
===================
diff --git a/mycli/__init__.py b/mycli/__init__.py
index e10d6ee..8de33c0 100644
--- a/mycli/__init__.py
+++ b/mycli/__init__.py
@@ -1 +1 @@
-__version__ = '1.24.4'
+__version__ = '1.25.0'
diff --git a/mycli/main.py b/mycli/main.py
index c13ed78..08f0755 100755
--- a/mycli/main.py
+++ b/mycli/main.py
@@ -138,6 +138,7 @@ class MyCli(object):
self.multi_line = c['main'].as_bool('multi_line')
self.key_bindings = c['main']['key_bindings']
special.set_timing_enabled(c['main'].as_bool('timing'))
+ self.beep_after_seconds = float(c['main']['beep_after_seconds'] or 0)
FavoriteQueries.instance = FavoriteQueries.from_config(self.config)
@@ -721,6 +722,8 @@ class MyCli(object):
self.output(formatted, status)
except KeyboardInterrupt:
pass
+ if self.beep_after_seconds > 0 and t >= self.beep_after_seconds:
+ self.echo('\a', err=True, nl=False)
if special.is_timing_enabled():
self.echo('Time: %0.03fs' % t)
except KeyboardInterrupt:
diff --git a/mycli/myclirc b/mycli/myclirc
index c89caa0..2418342 100644
--- a/mycli/myclirc
+++ b/mycli/myclirc
@@ -30,6 +30,9 @@ log_level = INFO
# Timing of sql statments and table rendering.
timing = True
+# Beep after long-running queries are completed; 0 to disable.
+beep_after_seconds = 0
+
# Table format. Possible values: ascii, double, github,
# psql, plain, simple, grid, fancy_grid, pipe, orgtbl, rst, mediawiki, html,
# latex, latex_booktabs, textile, moinmoin, jira, vertical, tsv, csv.
diff --git a/release.py b/release.py
index 3f18f03..62daa80 100755
--- a/release.py
+++ b/release.py
@@ -72,7 +72,7 @@ def upload_distribution_files():
def push_to_github():
- run_step('git', 'push', 'origin', 'master')
+ run_step('git', 'push', 'origin', 'main')
def push_tags_to_github():
@@ -90,7 +90,6 @@ if __name__ == '__main__':
subprocess.check_output = lambda x: x
ver = version('mycli/__init__.py')
- print('Releasing Version:', ver)
parser = OptionParser()
parser.add_option(
@@ -107,6 +106,8 @@ if __name__ == '__main__':
CONFIRM_STEPS = popts.confirm_steps
DRY_RUN = popts.dry_run
+ print('Releasing Version:', ver)
+
if not click.confirm('Are you sure?', default=False):
sys.exit(1)
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 9c40316..107106d 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,13 +1,13 @@
-pytest!=3.3.0
-pytest-cov==2.4.0
+pytest>=3.3.0
+pytest-cov>=2.4.0
tox
-twine==1.12.1
+twine>=1.12.1
behave>=1.2.4
-pexpect==3.3
-coverage==5.0.4
-codecov==2.0.9
+pexpect>=3.3
+coverage>=5.0.4
+codecov>=2.0.9
autopep8==1.3.3
-colorama==0.4.1
+colorama>=0.4.1
git+https://github.com/hayd/pep8radius.git # --error-status option not released
click>=7.0
paramiko==2.7.1
diff --git a/setup.py b/setup.py
index f79bcd7..a44289a 100755
--- a/setup.py
+++ b/setup.py
@@ -38,14 +38,14 @@ class lint(Command):
description = 'check code against PEP 8 (and fix violations)'
user_options = [
- ('branch=', 'b', 'branch/revision to compare against (e.g. master)'),
+ ('branch=', 'b', 'branch/revision to compare against (e.g. main)'),
('fix', 'f', 'fix the violations in place'),
('error-status', 'e', 'return an error code on failed PEP check'),
]
def initialize_options(self):
"""Set the default options."""
- self.branch = 'master'
+ self.branch = 'main'
self.fix = False
self.error_status = True