Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/new-run-script into lp:openlp/packaging

2018-10-27 Thread Tim Bentley
Review: Approve


-- 
https://code.launchpad.net/~raoul-snyman/openlp/new-run-script/+merge/357906
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~bastian-germann/openlp/qcollator into lp:openlp

2018-10-27 Thread Tim Bentley
Review: Approve


-- 
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357907
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~raoul-snyman/openlp/new-run-script into lp:openlp/packaging

2018-10-27 Thread Bastian Germann
Review: Approve

Great! I closed my branch in favour of this one.
-- 
https://code.launchpad.net/~raoul-snyman/openlp/new-run-script/+merge/357906
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/new-run-script into lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Failed

2018-10-27 Thread Raoul Snyman
Linting failed, please see https://ci.openlp.io/job/MP-03-Linting/22/ for more 
details
-- 
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357907
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~bastian-germann/openlp/qcollator into lp:openlp

2018-10-27 Thread Bastian Germann
Bastian Germann has proposed merging lp:~bastian-germann/openlp/qcollator into 
lp:openlp.

Commit message:
Replace PyICU with PyQt's QCollator

Use QCollator as new collator to get rid of the PyICU dependency.
Simplify the natural sorting with its numeric mode.
Simplify one test that is heavily dependent on implementation.
Run one sorting test on macOS which was disabled.

Requested reviews:
  Raoul Snyman (raoul-snyman)
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357907
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/i18n.py'
--- openlp/core/common/i18n.py	2018-10-27 01:40:20 +
+++ openlp/core/common/i18n.py	2018-10-27 10:53:25 +
@@ -52,8 +52,7 @@
 
 
 Language = namedtuple('Language', ['id', 'name', 'code'])
-ICU_COLLATOR = None
-DIGITS_OR_NONDIGITS = re.compile(r'\d+|\D+')
+COLLATOR = None
 LANGUAGES = sorted([
 Language(1, translate('common.languages', '(Afan) Oromo', 'Language code: om'), 'om'),
 Language(2, translate('common.languages', 'Abkhazian', 'Language code: ab'), 'ab'),
@@ -506,24 +505,19 @@
 return re.sub(r'\%[a-zA-Z]', match_formatting, text)
 
 
-def get_locale_key(string):
+def get_locale_key(string, numeric=False):
 """
 Creates a key for case insensitive, locale aware string sorting.
 
 :param string: The corresponding string.
 """
 string = string.lower()
-# ICU is the prefered way to handle locale sort key, we fallback to locale.strxfrm which will work in most cases.
-global ICU_COLLATOR
-try:
-if ICU_COLLATOR is None:
-import icu
-language = LanguageManager.get_language()
-icu_locale = icu.Locale(language)
-ICU_COLLATOR = icu.Collator.createInstance(icu_locale)
-return ICU_COLLATOR.getSortKey(string)
-except Exception:
-return locale.strxfrm(string).encode()
+global COLLATOR
+if COLLATOR is None:
+language = LanguageManager.get_language()
+COLLATOR = QtCore.QCollator(QtCore.QLocale(language))
+COLLATOR.setNumericMode(numeric)
+return COLLATOR.sortKey(string)
 
 
 def get_natural_key(string):
@@ -533,13 +527,7 @@
 :param string: string to be sorted by
 Returns a list of string compare keys and integers.
 """
-key = DIGITS_OR_NONDIGITS.findall(string)
-key = [int(part) if part.isdigit() else get_locale_key(part) for part in key]
-# Python 3 does not support comparison of different types anymore. So make sure, that we do not compare str
-# and int.
-if string and string[0].isdigit():
-return [b''] + key
-return key
+return get_locale_key(string, True)
 
 
 def get_language(name):

=== modified file 'openlp/core/ui/exceptionform.py'
--- openlp/core/ui/exceptionform.py	2018-10-27 01:40:20 +
+++ openlp/core/ui/exceptionform.py	2018-10-27 10:53:25 +
@@ -53,14 +53,6 @@
 except ImportError:
 MAKO_VERSION = '-'
 try:
-import icu
-try:
-ICU_VERSION = icu.VERSION
-except AttributeError:
-ICU_VERSION = 'OK'
-except ImportError:
-ICU_VERSION = '-'
-try:
 WEBKIT_VERSION = QtWebKit.qWebKitVersion()
 except AttributeError:
 WEBKIT_VERSION = '-'
@@ -119,12 +111,12 @@
 system = translate('OpenLP.ExceptionForm', 'Platform: {platform}\n').format(platform=platform.platform())
 libraries = ('Python: {python}\nQt5: {qt5}\nPyQt5: {pyqt5}\nQtWebkit: {qtwebkit}\nSQLAlchemy: {sqalchemy}\n'
  'SQLAlchemy Migrate: {migrate}\nBeautifulSoup: {soup}\nlxml: {etree}\nChardet: {chardet}\n'
- 'PyEnchant: {enchant}\nMako: {mako}\npyICU: {icu}\npyUNO bridge: {uno}\n'
+ 'PyEnchant: {enchant}\nMako: {mako}\npyUNO bridge: {uno}\n'
  'VLC: {vlc}\n').format(python=platform.python_version(), qt5=Qt.qVersion(),
 pyqt5=Qt.PYQT_VERSION_STR, qtwebkit=WEBKIT_VERSION,
 sqalchemy=sqlalchemy.__version__, migrate=MIGRATE_VERSION,
 soup=bs4.__version__, etree=etree.__version__, chardet=CHARDET_VERSION,
-enchant=ENCHANT_VERSION, mako=MAKO_VERSION, icu=ICU_VERSION,
+enchant=ENCHANT_VERSION, mako=MAKO_VERSION,
 uno=self._pyuno_import(), vlc=VLC_VERSION)
 
 if is_linux():

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2018-08-25 14:08:19 +
+++ openlp/plugins/songs/lib/mediaitem.py	2018-10-27 10:53:25 +
@@ -324,12 +324,12 @@
 :param search_results: A tuple containing (songbook entry, book name, song title, song id)
 :return: None
 """
-def get_songbook_key(text_array):
+def get_songbook_key(text):

[Openlp-core] [Merge] lp:~bastian-germann/openlp/qcollator into lp:openlp

2018-10-27 Thread Bastian Germann
The proposal to merge lp:~bastian-germann/openlp/qcollator into lp:openlp has 
been updated.

Status: Needs review => Superseded

For more details, see:
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357851
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/new-run-script into lp:openlp/packaging

2018-10-27 Thread Raoul Snyman
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/new-run-script into 
lp:openlp/packaging.

Commit message:
Fix builder script to use new OpenLP run script name.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/new-run-script/+merge/357906

Fix builder script to use new OpenLP run script name.
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~raoul-snyman/openlp/new-run-script into lp:openlp/packaging.
=== modified file 'builders/builder.py'
--- builders/builder.py	2018-07-12 19:41:00 +
+++ builders/builder.py	2018-10-27 06:11:26 +
@@ -218,7 +218,7 @@
 else:
 self.version = None
 self.work_path = self.branch_path
-self.openlp_script = os.path.abspath(os.path.join(self.work_path, 'openlp-run.py'))
+self.openlp_script = os.path.abspath(os.path.join(self.work_path, 'run_openlp.py'))
 self.source_path = os.path.join(self.work_path, 'openlp')
 self.manual_path = os.path.join(self.documentation_path, 'manual')
 self.manual_build_path = os.path.join(self.manual_path, 'build')
@@ -269,7 +269,6 @@
 Run PyInstaller on the branch to build an executable.
 """
 self._print('Running PyInstaller...')
-copy(os.path.join(self.work_path, 'openlp.py'), self.openlp_script)
 os.chdir(self.work_path)
 cmd = [self.python,
self.pyinstaller_exe,
@@ -428,7 +427,8 @@
 rmtree(self.manual_build_path)
 os.chdir(self.manual_path)
 sphinx_build = self.get_sphinx_build()
-command = [self.sphinx_exe, '-b', sphinx_build, '-d', 'build/doctrees', 'source', 'build/{}'.format(sphinx_build)]
+command = [self.sphinx_exe, '-b', sphinx_build, '-d', 'build/doctrees', 'source',
+   'build/{}'.format(sphinx_build)]
 self._run_command(command, 'Error running Sphinx')
 self.after_run_sphinx()
 
@@ -477,5 +477,3 @@
 
 self._print('Done.')
 raise SystemExit()
-
-

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linting: Failed

2018-10-27 Thread Raoul Snyman
Linting failed, please see https://ci.openlp.io/job/MP-03-Linting/21/ for more 
details
-- 
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357907
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Passed

2018-10-27 Thread Raoul Snyman
Linux tests passed!
-- 
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357907
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


Re: [Openlp-core] [Merge] lp:~bastian-germann/openlp/qcollator into lp:openlp

2018-10-27 Thread Raoul Snyman
Review: Approve

I just ran the tests, everything passed, I'm happy.
-- 
https://code.launchpad.net/~bastian-germann/openlp/qcollator/+merge/357907
Your team OpenLP Core is subscribed to branch lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~raoul-snyman/openlp/new-run-script into lp:openlp/packaging

2018-10-27 Thread noreply
The proposal to merge lp:~raoul-snyman/openlp/new-run-script into 
lp:openlp/packaging has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/new-run-script/+merge/357906
-- 
Your team OpenLP Core is subscribed to branch lp:openlp/packaging.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] [Merge] lp:~bastian-germann/openlp/unexport-tests into lp:openlp

2018-10-27 Thread Bastian Germann
Bastian Germann has proposed merging lp:~bastian-germann/openlp/unexport-tests 
into lp:openlp.

Commit message:
Do not export any tests* module

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~bastian-germann/openlp/unexport-tests/+merge/357912

A change to CI or packaging may be required if something depends on the tests/* 
modules to be available on an installation.
-- 
Your team OpenLP Core is requested to review the proposed merge of 
lp:~bastian-germann/openlp/unexport-tests into lp:openlp.
=== modified file 'setup.py'
--- setup.py	2018-10-16 20:07:00 +
+++ setup.py	2018-10-27 21:49:07 +
@@ -188,7 +188,7 @@
 author_email='raoulsny...@openlp.org',
 url='https://openlp.org/',
 license='GNU General Public License',
-packages=find_packages(exclude=['ez_setup', 'tests']),
+packages=find_packages(exclude=['ez_setup', 'tests*']),
 py_modules=['run_openlp'],
 include_package_data=True,
 zip_safe=False,

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp


[Openlp-core] Linux Test Results: Failed

2018-10-27 Thread Raoul Snyman
Linux tests failed, please see https://ci.openlp.io/job/MP-02-Linux_Tests/61/ 
for more details
-- 
https://code.launchpad.net/~bastian-germann/openlp/unexport-tests/+merge/357912
Your team OpenLP Core is requested to review the proposed merge of 
lp:~bastian-germann/openlp/unexport-tests into lp:openlp.

___
Mailing list: https://launchpad.net/~openlp-core
Post to : openlp-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openlp-core
More help   : https://help.launchpad.net/ListHelp