[MediaWiki-commits] [Gerrit] Stable Automation Tests for logged in/logged out QA:#1136 - change (mediawiki...MobileFrontend)
Mgrover has uploaded a new change for review. https://gerrit.wikimedia.org/r/81179 Change subject: Stable Automation Tests for logged in/logged out QA:#1136 .. Stable Automation Tests for logged in/logged out QA:#1136 Change-Id: Icb2fc6e8ec9f22609dbc71ddeaadf65cacb1735b --- A tests/acceptance/features/create_article.feature A tests/acceptance/features/footer.feature A tests/acceptance/features/footer_logged_in.feature A tests/acceptance/features/header.feature A tests/acceptance/features/header_logged_in.feature A tests/acceptance/features/language.feature A tests/acceptance/features/language_logged_in.feature A tests/acceptance/features/notification.feature A tests/acceptance/features/step_definitions/create_article_steps.rb A tests/acceptance/features/step_definitions/footer_steps.rb A tests/acceptance/features/step_definitions/header_logged_in_steps.rb A tests/acceptance/features/step_definitions/header_steps.rb A tests/acceptance/features/step_definitions/language_steps.rb M tests/acceptance/features/step_definitions/menu_opens_page_steps.rb A tests/acceptance/features/step_definitions/notification_steps.rb M tests/acceptance/features/step_definitions/watchlist_steps.rb A tests/acceptance/features/support/pages/create_article_page.rb A tests/acceptance/features/support/pages/create_user_page.rb A tests/acceptance/features/support/pages/edit_page.rb M tests/acceptance/features/support/pages/home_page.rb A tests/acceptance/features/support/pages/language_page.rb M tests/acceptance/features/support/pages/login_page.rb A tests/acceptance/features/support/pages/notification_page.rb 23 files changed, 303 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend refs/changes/79/81179/1 diff --git a/tests/acceptance/features/create_article.feature b/tests/acceptance/features/create_article.feature new file mode 100644 index 000..fbb3ede --- /dev/null +++ b/tests/acceptance/features/create_article.feature @@ -0,0 +1,6 @@ +Feature: Create Article + + Scenario: Create Article + +Given I am logged into the mobile website + And SelAutomationTestArticle has not been created diff --git a/tests/acceptance/features/footer.feature b/tests/acceptance/features/footer.feature new file mode 100644 index 000..4ef9785 --- /dev/null +++ b/tests/acceptance/features/footer.feature @@ -0,0 +1,24 @@ +Feature: Footer links resolve + + Background: +Given I am on the home page + +Scenario: View Edit history link resolves + When I click on the view edit history link + Then I go to the edit history page + +Scenario: Desktop link resolves + When I click on the desktop link + Then I go to the desktop wiki page + +Scenario: + When I click on the CC BY-SA link + Then I go to the CC BY-SA page + +Scenario: + When I click on the Terms of Use link + Then I go to the Terms of Use page + +Scenario: + When I click on the Privacy link + Then I go to the Privacy page \ No newline at end of file diff --git a/tests/acceptance/features/footer_logged_in.feature b/tests/acceptance/features/footer_logged_in.feature new file mode 100644 index 000..b197977 --- /dev/null +++ b/tests/acceptance/features/footer_logged_in.feature @@ -0,0 +1,25 @@ +Feature: Feature: Footer links resolve - Logged In + + Background: +Given I am logged into the mobile website + And I am on the home page + +Scenario: View Edit history link resolves + When I click on the view edit history link + Then I go to the edit history page + +Scenario: Desktop link resolves + When I click on the desktop link + Then I go to the desktop wiki page + +Scenario: + When I click on the CC BY-SA link + Then I go to the CC BY-SA page + +Scenario: + When I click on the Terms of Use link + Then I go to the Terms of Use page + +Scenario: + When I click on the Privacy link + Then I go to the Privacy page \ No newline at end of file diff --git a/tests/acceptance/features/header.feature b/tests/acceptance/features/header.feature new file mode 100644 index 000..95b882b --- /dev/null +++ b/tests/acceptance/features/header.feature @@ -0,0 +1,17 @@ +Feature: Header Validation + + Background: +Given I am on the home page + + Scenario: Receive notification message - Edit Icon +When I click the edit icon +Then I receive edit icon message You must be logged in to edit pages on mobile. + + + Scenario: Receive notification message - Upload Icon +When I click on the upload icon +Then I receive upload icon message You need to be logged in to add an image to this page. + + Scenario: Receive notification message - Watchlist Icon +When I click on watchlist icon +Then I receive watchlist icon message Please login or sign up to watch this page. \ No newline at end of file diff
[MediaWiki-commits] [Gerrit] Make the cancel and apply button applicable for all modules - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/81180 Change subject: Make the cancel and apply button applicable for all modules .. Make the cancel and apply button applicable for all modules If a user do changes for moduleA, does not save or cancel, goto moduleB, do some changes, move to other modules, and finally press apply, all changes should get saved. Similarly if user cancel all changes should get cancelled. This required moving the cancel and apply button outside of modules and managed by the language settings framework. Modules get mw.uls.settings.apply or mw.uls.settings.cancel triggers to do whatever they want to do on apply or save. Includes some refactoring related to this. Bug: 53256 Change-Id: I7d773d33a980a78604b36e39bf96a5686870124e --- M resources/css/ext.uls.languagesettings.css M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.inputsettings.js M resources/js/ext.uls.languagesettings.js 4 files changed, 43 insertions(+), 62 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/80/81180/1 diff --git a/resources/css/ext.uls.languagesettings.css b/resources/css/ext.uls.languagesettings.css index 7c5e61f..b7a1b94 100644 --- a/resources/css/ext.uls.languagesettings.css +++ b/resources/css/ext.uls.languagesettings.css @@ -92,7 +92,7 @@ background-color: #F5F5F5; } -#languagesettings-settings-panel .language-settings-buttons { +.language-settings-buttons { border-top: 1px solid #F0F0F0; margin-top: 25px; padding: 15px; diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index b368044..544da85 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -78,19 +78,9 @@ + '/div' // End font selectors - + '/div' // End font settings section + + '/div'; // End font settings section - // Separator - + 'div class=row/div' - // Apply and Cancel buttons - + 'div class=row language-settings-buttons' - + 'div class=eleven columns' - + 'button class=button uls-display-settings-cancel data-i18n=ext-uls-language-settings-cancel/button' - + 'button class=button active blue id=uls-displaysettings-apply data-i18n=ext-uls-language-settings-apply disabled/button' - + '/div' - + '/div' - + '/div'; function DisplaySettings( $parent ) { this.name = $.i18n( 'ext-uls-display-settings-title-short' ); @@ -451,8 +441,7 @@ * i18n this settings panel */ i18n: function () { - this.$template.i18n(); - + this.$parent.i18n(); this.$template.find( '#ui-font-selector-label strong' ) .text( $.i18n( 'ext-uls-webfonts-select-for', $.uls.data.getAutonym( this.uiLanguage ) ) ); this.$template.find( '#content-font-selector-label strong' ) @@ -484,11 +473,11 @@ */ markDirty: function () { this.dirty = true; - this.$template.find( '#uls-displaysettings-apply' ).removeAttr( 'disabled' ); + this.$parent.$window.find( 'button.uls-settings-apply' ).removeAttr( 'disabled' ); }, disableApplyButton: function () { - this.$template.find( '#uls-displaysettings-apply' ).prop( 'disabled', true ); + this.$parent.$window.find( 'button.uls-settings-apply' ).prop( 'disabled', true ); }, /** @@ -501,15 +490,6 @@ $tabButtons = displaySettings.$template.find( '.uls-display-settings-tab-switcher button' ); // TODO all these repeated selectors can be placed in object constructor. - - displaySettings.$template.find( '#uls-displaysettings-apply' ).on( 'click', function () { - displaySettings.apply(); - } ); - - displaySettings.$template.find( 'button.uls-display-settings-cancel' ).on( 'click', function () { - displaySettings.cancel(); - displaySettings.close(); - } ); $uiFontSelector.on( 'change', function () { displaySettings.markDirty(); @@ -550,7 +530,6 @@ } ); - mw.hook( 'mw.uls.settings.cancel' ).add( $.proxy( this.cancel, this ) ); }, /** @@ -623,6 +602,7 @@
[MediaWiki-commits] [Gerrit] mod/add - flesh out Aggregator class / Create AggregatorStat... - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: mod/add - flesh out Aggregator class / Create AggregatorStatOp subclass. .. mod/add - flesh out Aggregator class / Create AggregatorStatOp subclass. Change-Id: I048c77d8b07df9b948598891e7228d1988cc8016 --- M user_metrics/etl/aggregator.py 1 file changed, 24 insertions(+), 4 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index 9a8c175..314e69d 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -347,18 +347,20 @@ Initialize the aggregator method self._method = method +self._header = ['result'] def data_etl(self, data): -Handle +Handles data modification prior to aggregation return data def post_process(self, data): -Define +Handles assigning aggregate values to relevant properties +after aggregation -self._result = data +self._result = data def run(self, data): @@ -369,5 +371,23 @@ self.data_etl(data))) return self +@property def header(self): -return ['result'] +return self._header + + +class AggregatorStatOp(Aggregator): + +This type handles basic statistical operations like mean, median, sum, etc. + + +def __init__(self, methods, field_prefixes, header): +super(AggregatorStatOp, self).__init__(methods) +self._header = header +self._field_prefixes = field_prefixes + +def data_etl(self, data): +super(AggregatorStatOp, self).data_etl(data) + +def post_process(self, data): +super(AggregatorStatOp, self).post_process(data) \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/81181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I048c77d8b07df9b948598891e7228d1988cc8016 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mod/add - flesh out Aggregator class / Create AggregatorStat... - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/81181 Change subject: mod/add - flesh out Aggregator class / Create AggregatorStatOp subclass. .. mod/add - flesh out Aggregator class / Create AggregatorStatOp subclass. Change-Id: I048c77d8b07df9b948598891e7228d1988cc8016 --- M user_metrics/etl/aggregator.py 1 file changed, 24 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/81/81181/1 diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index 9a8c175..314e69d 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -347,18 +347,20 @@ Initialize the aggregator method self._method = method +self._header = ['result'] def data_etl(self, data): -Handle +Handles data modification prior to aggregation return data def post_process(self, data): -Define +Handles assigning aggregate values to relevant properties +after aggregation -self._result = data +self._result = data def run(self, data): @@ -369,5 +371,23 @@ self.data_etl(data))) return self +@property def header(self): -return ['result'] +return self._header + + +class AggregatorStatOp(Aggregator): + +This type handles basic statistical operations like mean, median, sum, etc. + + +def __init__(self, methods, field_prefixes, header): +super(AggregatorStatOp, self).__init__(methods) +self._header = header +self._field_prefixes = field_prefixes + +def data_etl(self, data): +super(AggregatorStatOp, self).data_etl(data) + +def post_process(self, data): +super(AggregatorStatOp, self).post_process(data) \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/81181 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I048c77d8b07df9b948598891e7228d1988cc8016 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Track event counts in Graphite - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/81182 Change subject: Track event counts in Graphite .. Track event counts in Graphite This patch defines a new role class, 'role::eventlogging::graphite', and assigns it to hafnium. By declaring the class a node becomes an EventLogging git-deploy deployment target (via modules/eventlogging/manifests/init.pp). It also provisions a single EventLogging event consumer which will maintain a count of incoming events, broken down by schema, in Graphite, via StatsD. Change-Id: I558d39e0453c44846d223994a74d8921ef9f0585 --- M manifests/role/eventlogging.pp M manifests/site.pp 2 files changed, 18 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/82/81182/1 diff --git a/manifests/role/eventlogging.pp b/manifests/role/eventlogging.pp index b29bc76..c5147a6 100644 --- a/manifests/role/eventlogging.pp +++ b/manifests/role/eventlogging.pp @@ -166,3 +166,20 @@ contact_group = 'admins,analytics', } } + + +# == Class: role::eventlogging::graphite +# +# Keeps a running count of incoming events by schema in Graphite by +# emitting 'eventlogging.SCHEMA_REVISION:1' on each event to a StatsD +# instance. +# +class role::eventlogging::graphite { +include eventlogging +include misc::graphite::pystatsd + +eventlogging::service::consumer { 'graphite': +input = 'tcp://vanadium.eqiad.wmnet:8600', +output = 'statsd://127.0.0.1:8125', +} +} diff --git a/manifests/site.pp b/manifests/site.pp index 2a2a9c2..7bfe8c3 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2837,7 +2837,7 @@ include standard, groups::wikidev, accounts::olivneh, -misc::graphite::pystatsd +role::eventlogging::graphite sudo_user { 'olivneh': privileges = ['ALL = (ALL) NOPASSWD: ALL'], -- To view, visit https://gerrit.wikimedia.org/r/81182 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I558d39e0453c44846d223994a74d8921ef9f0585 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] pep8-ified pywikibot/site.py - change (pywikibot/core)
Xqt has submitted this change and it was merged. Change subject: pep8-ified pywikibot/site.py .. pep8-ified pywikibot/site.py Change-Id: I8e09bf2655bd9c7f39f981bfc8381c0ee8168ec8 --- M pywikibot/site.py 1 file changed, 183 insertions(+), 159 deletions(-) Approvals: Xqt: Looks good to me, approved diff --git a/pywikibot/site.py b/pywikibot/site.py index bca3feb..8964e32 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -61,9 +61,10 @@ @classmethod def name(cls, search_value): for key, value in cls.__dict__.iteritems(): -if key==key.upper() and value==search_value: +if key == key.upper() and value == search_value: return key raise KeyError(Value %r could not be found in this enum % search_value) + def Family(fam=None, fatal=True): Import the named family. @@ -150,8 +151,7 @@ if sysop: sysop = sysop[0].upper() + sysop[1:] self._username = [user, sysop] -self.use_hard_category_redirects = \ -self.code in self.family.use_hard_category_redirects +self.use_hard_category_redirects = self.code in self.family.use_hard_category_redirects # following are for use with lock_page and unlock_page methods self._pagemutex = threading.Lock() @@ -209,7 +209,7 @@ return self._username[False] return None -def username(self, sysop = False): +def username(self, sysop=False): return self._username[sysop] def __getattr__(self, attr): @@ -219,19 +219,18 @@ return getattr(self.__class__, attr) try: method = getattr(self.family, attr) -f = lambda *args, **kwargs: \ - method(self.code, *args, **kwargs) +f = lambda *args, **kwargs: method(self.code, *args, **kwargs) if hasattr(method, __doc__): f.__doc__ = method.__doc__ return f except AttributeError: raise AttributeError(%s instance has no attribute '%s' - % (self.__class__.__name__, attr) ) + % (self.__class__.__name__, attr)) def sitename(self): Return string representing this Site's name and code. -return self.family.name+':'+self.code +return self.family.name + ':' + self.code __str__ = sitename @@ -264,7 +263,7 @@ nsnames = [name for name in self.namespaces().itervalues()] return [lang for lang in self.languages() - if lang[:1].upper() + lang[1:] not in nsnames] +if lang[:1].upper() + lang[1:] not in nsnames] def ns_index(self, namespace): Given a namespace name, return its int index, or None if invalid. @@ -352,14 +351,14 @@ Return Category in which disambig pages are listed. try: -name = self.namespace(14)+':'+self.family.disambcatname[self.code] +name = self.namespace(14) + ':' + self.family.disambcatname[self.code] except KeyError: raise Error(uNo disambiguation category name found for %(site)s - % {'site': self}) +% {'site': self}) return pywikibot.Category(pywikibot.Link(name, self)) @deprecated(pywikibot.Link) -def linkto(self, title, othersite = None): +def linkto(self, title, othersite=None): Return unicode string in the form of a wikilink to 'title' Use optional Site argument 'othersite' to generate an interwiki link. @@ -375,7 +374,7 @@ linkfam, linkcode = pywikibot.Link(text, self).parse_site() -return (linkfam != self.family.name or linkcode != self.code) +return linkfam != self.family.name or linkcode != self.code def redirectRegex(self, pattern=None): Return a compiled regular expression matching on redirect pages. @@ -389,7 +388,7 @@ # arbitrary stuff, then a wikilink. The wikilink may contain # a label, although this is not useful. return re.compile(r'\s*#%(pattern)s\s*:?\s*\[\[(.+?)(?:\|.*?)?\]\]' - % locals(), + % locals(), re.IGNORECASE | re.UNICODE | re.DOTALL) def sametitle(self, title1, title2): @@ -413,7 +412,7 @@ ns2, name2 = title2.split(:, 1) else: ns2, name2 = 0, title2 -for space in self.namespaces(): # iterate over all valid namespaces +for space in self.namespaces(): # iterate over all valid namespaces if type(ns1) is not int and valid_namespace(ns1, space): ns1 = space if type(ns2) is not int and valid_namespace(ns2, space): @@ -470,8 +469,7 @@ # TODO: is this even needed? No family in the framework has this
[MediaWiki-commits] [Gerrit] new phpcs jobs for mediawiki/core - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81183 Change subject: new phpcs jobs for mediawiki/core .. new phpcs jobs for mediawiki/core Introduce the jobs: - mediawiki-core-phpcs-lenient - mediawiki-core-phpcs-lenient-HEAD - mediawiki-core-phpcs-strict - mediawiki-core-phpcs-strict-HEAD 'lenient' are permissive and only fail on errors. The 'strict' one would fail whenever phpcs emit a warning. The -HEAD versions are meant to only check the modified file, useful on patchset submission. Their counterpart are for postmerge/regression tracking. bug: 46500 Change-Id: I33ade4239ef185aecc15e10c7f671f183aaf09a3 --- M mediawiki.yaml 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/83/81183/1 diff --git a/mediawiki.yaml b/mediawiki.yaml index 0c47d4d..5050e12 100644 --- a/mediawiki.yaml +++ b/mediawiki.yaml @@ -141,6 +141,10 @@ - '{name}-jsduck-publish' - '{name}-doxygen-publish' - '{name}-whitespaces' + - '{name}-phpcs-lenient' + - '{name}-phpcs-lenient-HEAD' + - '{name}-phpcs-strict' + - '{name}-phpcs-strict-HEAD' - '{name}-phpunit-{phpunit-group}' - '{name}-install-{databasetype}' -- To view, visit https://gerrit.wikimedia.org/r/81183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33ade4239ef185aecc15e10c7f671f183aaf09a3 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] new phpcs jobs for mediawiki/core - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: new phpcs jobs for mediawiki/core .. new phpcs jobs for mediawiki/core Introduce the jobs: - mediawiki-core-phpcs-lenient - mediawiki-core-phpcs-lenient-HEAD - mediawiki-core-phpcs-strict - mediawiki-core-phpcs-strict-HEAD 'lenient' are permissive and only fail on errors. The 'strict' one would fail whenever phpcs emit a warning. The -HEAD versions are meant to only check the modified file, useful on patchset submission. Their counterpart are for postmerge/regression tracking. bug: 46500 Change-Id: I33ade4239ef185aecc15e10c7f671f183aaf09a3 --- M mediawiki.yaml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki.yaml b/mediawiki.yaml index 0c47d4d..5050e12 100644 --- a/mediawiki.yaml +++ b/mediawiki.yaml @@ -141,6 +141,10 @@ - '{name}-jsduck-publish' - '{name}-doxygen-publish' - '{name}-whitespaces' + - '{name}-phpcs-lenient' + - '{name}-phpcs-lenient-HEAD' + - '{name}-phpcs-strict' + - '{name}-phpcs-strict-HEAD' - '{name}-phpunit-{phpunit-group}' - '{name}-install-{databasetype}' -- To view, visit https://gerrit.wikimedia.org/r/81183 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I33ade4239ef185aecc15e10c7f671f183aaf09a3 Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] new phpcs jobs for mediawiki/core (non voting) - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81184 Change subject: new phpcs jobs for mediawiki/core (non voting) .. new phpcs jobs for mediawiki/core (non voting) Introduce the lenient/strict phpcs jobs to mediawiki/core. Would eventually let us have the strict job voting. bug: 48420 Change-Id: Icd506fe020dccbb007c7557849bcdd9450d69dbb --- M layout.yaml 1 file changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/84/81184/1 diff --git a/layout.yaml b/layout.yaml index 6ba5e0d..bd1f47d 100644 --- a/layout.yaml +++ b/layout.yaml @@ -237,6 +237,14 @@ voting: false - name: mwext-Translate-phpcs-strict-HEAD voting: false + - name: mediawiki-core-phpcs-lenient +voting: false + - name: mediawiki-core-phpcs-lenient-HEAD +voting: false + - name: mediawiki-core-phpcs-strict +voting: false + - name: mediawiki-core-phpcs-strict-HEAD +voting: false - name: ^.*-jslint$ # Non-voting by default (most projects do not pass yet) @@ -592,12 +600,14 @@ - name: mediawiki/core check: - mediawiki-core-whitespaces - - mediawiki-core-phpcs-HEAD + - mediawiki-core-phpcs-lenient-HEAD + - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint test: - - mediawiki-core-phpcs-HEAD + - mediawiki-core-phpcs-lenient-HEAD + - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint: @@ -608,7 +618,8 @@ - mediawiki-core-phpunit-misc - mediawiki-core-phpunit-parser gate-and-submit: - - mediawiki-core-phpcs-HEAD + - mediawiki-core-phpcs-lenient-HEAD + - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint: -- To view, visit https://gerrit.wikimedia.org/r/81184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icd506fe020dccbb007c7557849bcdd9450d69dbb Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - method _build_agg_items. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: add - method _build_agg_items. .. add - method _build_agg_items. Change-Id: I00b710016bfbc8ab9e1e7ec967eb4103e7898b02 --- M user_metrics/etl/aggregator.py 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index 314e69d..ed89756 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -386,6 +386,14 @@ self._header = header self._field_prefixes = field_prefixes +def _build_agg_items(self): + +For each aggregate field store the name, index in data, and op + +self._agg_items = [(name + op.__name__, index, op) +for name, index in self._field_prefixes.iteritems() +for op in self._method] + def data_etl(self, data): super(AggregatorStatOp, self).data_etl(data) -- To view, visit https://gerrit.wikimedia.org/r/81185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I00b710016bfbc8ab9e1e7ec967eb4103e7898b02 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] new phpcs jobs for mediawiki/core (non voting) - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: new phpcs jobs for mediawiki/core (non voting) .. new phpcs jobs for mediawiki/core (non voting) Introduce the lenient/strict phpcs jobs to mediawiki/core. Would eventually let us have the strict job voting. Also made the voting/file limiter to apply on any of the new phpcs jobs. bug: 48420 Change-Id: Icd506fe020dccbb007c7557849bcdd9450d69dbb --- M layout.yaml 1 file changed, 13 insertions(+), 10 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index 6ba5e0d..e8caa17 100644 --- a/layout.yaml +++ b/layout.yaml @@ -229,13 +229,13 @@ - '^.*\.pp$' # Experiment for bug 48420 - - name: mwext-Translate-phpcs-lenient + - name: ^.*phpcs-lenient(-HEAD)?$ +files: + - '^.*\.(php|php5|phtml|inc)$' voting: false - - name: mwext-Translate-phpcs-lenient-HEAD -voting: false - - name: mwext-Translate-phpcs-strict -voting: false - - name: mwext-Translate-phpcs-strict-HEAD + - name: ^.*phpcs-strict(-HEAD)?$ +files: + - '^.*\.(php|php5|phtml|inc)$' voting: false - name: ^.*-jslint$ @@ -284,7 +284,7 @@ - '^.*\.py$' # PHP CodeSniffer (experimental) - - name: ^.*-phpcs$ + - name: ^.*-phpcs(-HEAD)?$ voting: false files: - '^.*\.(php|php5|phtml|inc)$' @@ -592,12 +592,14 @@ - name: mediawiki/core check: - mediawiki-core-whitespaces - - mediawiki-core-phpcs-HEAD + - mediawiki-core-phpcs-lenient-HEAD + - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint test: - - mediawiki-core-phpcs-HEAD + - mediawiki-core-phpcs-lenient-HEAD + - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint: @@ -608,7 +610,8 @@ - mediawiki-core-phpunit-misc - mediawiki-core-phpunit-parser gate-and-submit: - - mediawiki-core-phpcs-HEAD + - mediawiki-core-phpcs-lenient-HEAD + - mediawiki-core-phpcs-strict-HEAD - mediawiki-core-jslint - mediawiki-core-jsduck - mediawiki-core-lint: -- To view, visit https://gerrit.wikimedia.org/r/81184 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icd506fe020dccbb007c7557849bcdd9450d69dbb Gerrit-PatchSet: 3 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] config for 2013.08 - change (translatewiki)
jenkins-bot has submitted this change and it was merged. Change subject: config for 2013.08 .. config for 2013.08 ULS is at 1b55342 (2013-08-23). Change-Id: Id29ccb58726c803b1cfce25c291985c7669a08d1 --- M melange/config.ini 1 file changed, 5 insertions(+), 5 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/melange/config.ini b/melange/config.ini index 09b2ba1..94f841c 100644 --- a/melange/config.ini +++ b/melange/config.ini @@ -1,9 +1,9 @@ [common] -mediawikirepo=ssh://amir...@gerrit.wikimedia.org:29418/mediawiki/core.git -extensionrepo=ssh://amir...@gerrit.wikimedia.org:29418/mediawiki/extensions/ +mediawikirepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/core.git +extensionrepo=ssh://kar...@gerrit.wikimedia.org:29418/mediawiki/extensions/ branches=origin/master origin/REL1_21 origin/REL1_20 -releasever=2013.07 -releasever-prev=2013.06 +releasever=2013.08 +releasever-prev=2013.07 bundlename=MediaWiki language extension bundle downloadurl=https://translatewiki.net/mleb hasher=sha256sum @@ -19,7 +19,7 @@ CleanChanges=origin/master LocalisationUpdate=origin/master Translate=origin/master -UniversalLanguageSelector=e2a735a +UniversalLanguageSelector=1b55342 [install] dbname=melange -- To view, visit https://gerrit.wikimedia.org/r/80986 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id29ccb58726c803b1cfce25c291985c7669a08d1 Gerrit-PatchSet: 3 Gerrit-Project: translatewiki Gerrit-Branch: master Gerrit-Owner: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - method _build_agg_items. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/81185 Change subject: add - method _build_agg_items. .. add - method _build_agg_items. Change-Id: I00b710016bfbc8ab9e1e7ec967eb4103e7898b02 --- M user_metrics/etl/aggregator.py 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/85/81185/1 diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index 314e69d..ed89756 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -386,6 +386,14 @@ self._header = header self._field_prefixes = field_prefixes +def _build_agg_items(self): + +For each aggregate field store the name, index in data, and op + +self._agg_items = [(name + op.__name__, index, op) +for name, index in self._field_prefixes.iteritems() +for op in self._method] + def data_etl(self, data): super(AggregatorStatOp, self).data_etl(data) -- To view, visit https://gerrit.wikimedia.org/r/81185 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00b710016bfbc8ab9e1e7ec967eb4103e7898b02 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show snak type in summary for novalue and somevalue snaks - change (mediawiki...Wikibase)
Tobias Gritschacher has uploaded a new change for review. https://gerrit.wikimedia.org/r/81187 Change subject: Show snak type in summary for novalue and somevalue snaks .. Show snak type in summary for novalue and somevalue snaks Change-Id: If5ebf96a10d8a847360501be431c9227810f7cce --- M repo/includes/ClaimSummaryBuilder.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/87/81187/1 diff --git a/repo/includes/ClaimSummaryBuilder.php b/repo/includes/ClaimSummaryBuilder.php index b1e2675..e338fd0 100644 --- a/repo/includes/ClaimSummaryBuilder.php +++ b/repo/includes/ClaimSummaryBuilder.php @@ -135,7 +135,7 @@ $value = $value-getTime(); } } else { - $value = '-'; // todo handle no values in general way (needed elsewhere) + $value = $snak-getType(); // todo handle no values in general way (needed elsewhere) } $pairs[$key][] = $value; -- To view, visit https://gerrit.wikimedia.org/r/81187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5ebf96a10d8a847360501be431c9227810f7cce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - run method for AggregatorStatOp. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/81189 Change subject: add - run method for AggregatorStatOp. .. add - run method for AggregatorStatOp. Change-Id: I031af4aaa42cb075fb1024c038f1e0be77384877 --- M user_metrics/etl/aggregator.py 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/89/81189/1 diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index e512e59..5a663a3 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -403,4 +403,12 @@ super(AggregatorStatOp, self).data_etl(data) def post_process(self, data): -super(AggregatorStatOp, self).post_process(data) \ No newline at end of file +super(AggregatorStatOp, self).post_process(data) + +def run(self, data): + +Pass data through aggregate method + +for item in self._agg_items: +setattr(self, item[0], item[2]([elem[item[1]] for elem in data])) +return self \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/81189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I031af4aaa42cb075fb1024c038f1e0be77384877 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - header to AggregatorStatOp. - change (analytics/user-metrics)
Rfaulk has uploaded a new change for review. https://gerrit.wikimedia.org/r/81188 Change subject: add - header to AggregatorStatOp. .. add - header to AggregatorStatOp. Change-Id: I98baa01d920473961b7735e872390cd66182c1c1 --- M user_metrics/etl/aggregator.py 1 file changed, 5 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics refs/changes/88/81188/1 diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index ed89756..e512e59 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -385,6 +385,7 @@ super(AggregatorStatOp, self).__init__(methods) self._header = header self._field_prefixes = field_prefixes +self._build_agg_items() def _build_agg_items(self): @@ -394,6 +395,10 @@ for name, index in self._field_prefixes.iteritems() for op in self._method] +@property +def header(self): +return [item[0] for item in self._agg_items] + def data_etl(self, data): super(AggregatorStatOp, self).data_etl(data) -- To view, visit https://gerrit.wikimedia.org/r/81188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I98baa01d920473961b7735e872390cd66182c1c1 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - header to AggregatorStatOp. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: add - header to AggregatorStatOp. .. add - header to AggregatorStatOp. Change-Id: I98baa01d920473961b7735e872390cd66182c1c1 --- M user_metrics/etl/aggregator.py 1 file changed, 5 insertions(+), 0 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index ed89756..e512e59 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -385,6 +385,7 @@ super(AggregatorStatOp, self).__init__(methods) self._header = header self._field_prefixes = field_prefixes +self._build_agg_items() def _build_agg_items(self): @@ -394,6 +395,10 @@ for name, index in self._field_prefixes.iteritems() for op in self._method] +@property +def header(self): +return [item[0] for item in self._agg_items] + def data_etl(self, data): super(AggregatorStatOp, self).data_etl(data) -- To view, visit https://gerrit.wikimedia.org/r/81188 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I98baa01d920473961b7735e872390cd66182c1c1 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - aggregator_meta namedtuple to Aggregator class. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: add - aggregator_meta namedtuple to Aggregator class. .. add - aggregator_meta namedtuple to Aggregator class. Change-Id: I4a4d71452ebcf65894e4055b15fedb0b1c0e13fd --- M user_metrics/etl/aggregator.py 1 file changed, 7 insertions(+), 5 deletions(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index 5a663a3..4387642 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -342,6 +342,8 @@ results. +aggregator_meta = namedtuple('aggregator_meta', 'field index method') + def __init__(self, method=None): Initialize the aggregator method @@ -391,13 +393,13 @@ For each aggregate field store the name, index in data, and op -self._agg_items = [(name + op.__name__, index, op) -for name, index in self._field_prefixes.iteritems() +self._agg_items = [Aggregator.aggregator_meta(name + op.__name__, +index, op) for name, index in self._field_prefixes.iteritems() for op in self._method] @property def header(self): -return [item[0] for item in self._agg_items] +return [item.field for item in self._agg_items] def data_etl(self, data): super(AggregatorStatOp, self).data_etl(data) @@ -407,8 +409,8 @@ def run(self, data): -Pass data through aggregate method +Call each aggregation method for item in self._agg_items: -setattr(self, item[0], item[2]([elem[item[1]] for elem in data])) +setattr(self, item.field, item.method([elem[item.index] for elem in data])) return self \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/81190 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I4a4d71452ebcf65894e4055b15fedb0b1c0e13fd Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] add - run method for AggregatorStatOp. - change (analytics/user-metrics)
Rfaulk has submitted this change and it was merged. Change subject: add - run method for AggregatorStatOp. .. add - run method for AggregatorStatOp. Change-Id: I031af4aaa42cb075fb1024c038f1e0be77384877 --- M user_metrics/etl/aggregator.py 1 file changed, 9 insertions(+), 1 deletion(-) Approvals: Rfaulk: Verified; Looks good to me, approved diff --git a/user_metrics/etl/aggregator.py b/user_metrics/etl/aggregator.py index e512e59..5a663a3 100644 --- a/user_metrics/etl/aggregator.py +++ b/user_metrics/etl/aggregator.py @@ -403,4 +403,12 @@ super(AggregatorStatOp, self).data_etl(data) def post_process(self, data): -super(AggregatorStatOp, self).post_process(data) \ No newline at end of file +super(AggregatorStatOp, self).post_process(data) + +def run(self, data): + +Pass data through aggregate method + +for item in self._agg_items: +setattr(self, item[0], item[2]([elem[item[1]] for elem in data])) +return self \ No newline at end of file -- To view, visit https://gerrit.wikimedia.org/r/81189 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I031af4aaa42cb075fb1024c038f1e0be77384877 Gerrit-PatchSet: 1 Gerrit-Project: analytics/user-metrics Gerrit-Branch: master Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Show snak type in summary for novalue and somevalue snaks - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Show snak type in summary for novalue and somevalue snaks .. Show snak type in summary for novalue and somevalue snaks Change-Id: If5ebf96a10d8a847360501be431c9227810f7cce --- M repo/includes/ClaimSummaryBuilder.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Addshore: Looks good to me, approved jenkins-bot: Verified diff --git a/repo/includes/ClaimSummaryBuilder.php b/repo/includes/ClaimSummaryBuilder.php index b1e2675..e338fd0 100644 --- a/repo/includes/ClaimSummaryBuilder.php +++ b/repo/includes/ClaimSummaryBuilder.php @@ -135,7 +135,7 @@ $value = $value-getTime(); } } else { - $value = '-'; // todo handle no values in general way (needed elsewhere) + $value = $snak-getType(); // todo handle no values in general way (needed elsewhere) } $pairs[$key][] = $value; -- To view, visit https://gerrit.wikimedia.org/r/81187 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5ebf96a10d8a847360501be431c9227810f7cce Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] allow lat/lon values from -360 to 360, possible for non-eart... - change (mediawiki...DataValues)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81192 Change subject: allow lat/lon values from -360 to 360, possible for non-earth globes .. allow lat/lon values from -360 to 360, possible for non-earth globes Change-Id: I13d908df9d187f369429ebbc4cbcaa1c26f5db6a --- M DataValues/src/LatLongValue.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/92/81192/1 diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index 68216c6..b1364db 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -68,8 +68,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric latitude' ); } - if ( $latitude -90 || $latitude 90 ) { - throw new OutOfRangeException( 'Latitude needs to be between -90 and 90' ); + if ( $latitude -360 || $latitude 360 ) { + throw new OutOfRangeException( 'Latitude needs to be between -360 and 360' ); } } @@ -78,8 +78,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric longitude' ); } - if ( $longitude -180 || $longitude 180 ) { - throw new OutOfRangeException( 'Longitude needs to be between -180 and 180' ); + if ( $longitude -360 || $longitude 360 ) { + throw new OutOfRangeException( 'Longitude needs to be between -360 and 360' ); } } -- To view, visit https://gerrit.wikimedia.org/r/81192 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I13d908df9d187f369429ebbc4cbcaa1c26f5db6a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] allow lat/lon values from -360 to 360, possible for non-eart... - change (mediawiki...DataValues)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81193 Change subject: allow lat/lon values from -360 to 360, possible for non-earth globes .. allow lat/lon values from -360 to 360, possible for non-earth globes Change-Id: I1ce9c8661b68232fad36c476d3ea8804a0fcb422 --- M DataValues/src/LatLongValue.php M DataValues/tests/phpunit/LatLongValueTest.php 2 files changed, 9 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/93/81193/1 diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index 68216c6..b1364db 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -68,8 +68,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric latitude' ); } - if ( $latitude -90 || $latitude 90 ) { - throw new OutOfRangeException( 'Latitude needs to be between -90 and 90' ); + if ( $latitude -360 || $latitude 360 ) { + throw new OutOfRangeException( 'Latitude needs to be between -360 and 360' ); } } @@ -78,8 +78,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric longitude' ); } - if ( $longitude -180 || $longitude 180 ) { - throw new OutOfRangeException( 'Longitude needs to be between -180 and 180' ); + if ( $longitude -360 || $longitude 360 ) { + throw new OutOfRangeException( 'Longitude needs to be between -360 and 360' ); } } diff --git a/DataValues/tests/phpunit/LatLongValueTest.php b/DataValues/tests/phpunit/LatLongValueTest.php index 1e5d7bc..e06b32d 100644 --- a/DataValues/tests/phpunit/LatLongValueTest.php +++ b/DataValues/tests/phpunit/LatLongValueTest.php @@ -42,6 +42,8 @@ $argLists[] = array( -4.2, -4.2 ); $argLists[] = array( 4.2, -42 ); $argLists[] = array( -42, 4.2 ); + $argLists[] = array( 360, -360 ); + $argLists[] = array( 48.269, -225.99 ); $argLists[] = array( 0, 0 ); return $argLists; @@ -75,10 +77,10 @@ $argLists[] = array( 42, '42' ); $argLists[] = array( '0', 0 ); - $argLists[] = array( -91, 0 ); + $argLists[] = array( -361, 0 ); $argLists[] = array( -999, 1 ); - $argLists[] = array( 90.001, 2 ); - $argLists[] = array( 3, 181 ); + $argLists[] = array( 360.001, 2 ); + $argLists[] = array( 3, 361 ); $argLists[] = array( 4, -1337 ); return $argLists; -- To view, visit https://gerrit.wikimedia.org/r/81193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1ce9c8661b68232fad36c476d3ea8804a0fcb422 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update TuladhaJejeg font for Javanese to 2.0.1 version - change (mediawiki...UniversalLanguageSelector)
Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/81194 Change subject: Update TuladhaJejeg font for Javanese to 2.0.1 version .. Update TuladhaJejeg font for Javanese to 2.0.1 version Change-Id: Id7690d8efdb8eaec0d06cb1b8c0106c742a8e126 --- M data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot M data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf M data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff M data/fontrepo/fonts/TuladhaJejeg/font.ini 4 files changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/94/81194/1 diff --git a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot index 33d11ba..1e6395f 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot +++ b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot Binary files differ diff --git a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf index 3246f64..a19a795 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf +++ b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf Binary files differ diff --git a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff index caf9620..13d1e34 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff +++ b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff Binary files differ diff --git a/data/fontrepo/fonts/TuladhaJejeg/font.ini b/data/fontrepo/fonts/TuladhaJejeg/font.ini index 6eca58a..94876fa 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/font.ini +++ b/data/fontrepo/fonts/TuladhaJejeg/font.ini @@ -1,6 +1,6 @@ [Tuladha Jejeg] languages=jv,jv-java* -version=1.92 +version=2.0.1 license=OFL 1.1 licensefile=OFL.txt url=https://sites.google.com/site/jawaunicode/ -- To view, visit https://gerrit.wikimedia.org/r/81194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id7690d8efdb8eaec0d06cb1b8c0106c742a8e126 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 53391) allow lat/lon values from -360 to 360, possible ... - change (mediawiki...DataValues)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81195 Change subject: (bug 53391) allow lat/lon values from -360 to 360, possible for non-earth globes .. (bug 53391) allow lat/lon values from -360 to 360, possible for non-earth globes Change-Id: I94ffc43cf66b06a8f870281fdb565029a6f60692 --- M DataValues/src/LatLongValue.php M DataValues/tests/phpunit/LatLongValueTest.php 2 files changed, 7 insertions(+), 7 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/95/81195/1 diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index 68216c6..b1364db 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -68,8 +68,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric latitude' ); } - if ( $latitude -90 || $latitude 90 ) { - throw new OutOfRangeException( 'Latitude needs to be between -90 and 90' ); + if ( $latitude -360 || $latitude 360 ) { + throw new OutOfRangeException( 'Latitude needs to be between -360 and 360' ); } } @@ -78,8 +78,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric longitude' ); } - if ( $longitude -180 || $longitude 180 ) { - throw new OutOfRangeException( 'Longitude needs to be between -180 and 180' ); + if ( $longitude -360 || $longitude 360 ) { + throw new OutOfRangeException( 'Longitude needs to be between -360 and 360' ); } } diff --git a/DataValues/tests/phpunit/LatLongValueTest.php b/DataValues/tests/phpunit/LatLongValueTest.php index 1e5d7bc..30ffb07 100644 --- a/DataValues/tests/phpunit/LatLongValueTest.php +++ b/DataValues/tests/phpunit/LatLongValueTest.php @@ -75,10 +75,10 @@ $argLists[] = array( 42, '42' ); $argLists[] = array( '0', 0 ); - $argLists[] = array( -91, 0 ); + $argLists[] = array( -361, 0 ); $argLists[] = array( -999, 1 ); - $argLists[] = array( 90.001, 2 ); - $argLists[] = array( 3, 181 ); + $argLists[] = array( 360.001, 2 ); + $argLists[] = array( 3, 381 ); $argLists[] = array( 4, -1337 ); return $argLists; -- To view, visit https://gerrit.wikimedia.org/r/81195 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94ffc43cf66b06a8f870281fdb565029a6f60692 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bug fix and revert for version handling - change (pywikibot/core)
DrTrigon has uploaded a new change for review. https://gerrit.wikimedia.org/r/81196 Change subject: bug fix and revert for version handling .. bug fix and revert for version handling * git version info extraction was buggy * version handling was messed up by change of __version__ to __initversion__ (use __release__ instead!!) Change-Id: Ibbf5953bf8759f94323f9d31bded2c3095ba58a0 --- M pywikibot/__init__.py M pywikibot/version.py M scripts/version.py 3 files changed, 8 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/96/81196/1 diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py index 27c9d52..414550d 100644 --- a/pywikibot/__init__.py +++ b/pywikibot/__init__.py @@ -7,8 +7,8 @@ # # Distributed under the terms of the MIT license. # -__version__ = '2.0b1' -__initversion__ = '$Id$' +__release__ = '2.0b1' +__version__ = '$Id$' import datetime import difflib diff --git a/pywikibot/version.py b/pywikibot/version.py index 6a8eb92..286e0b7 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -10,8 +10,7 @@ __version__ = '$Id$' import os -import time -import datetime +import time, datetime import urllib import subprocess @@ -121,6 +120,8 @@ tag = tag[(s + 6):e] t = tag.strip().split('/') tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4]) +path = os.path.abspath(os.curdir) +os.chdir(_program_dir) info = subprocess.Popen(git log --pretty=format:'%ad|%an|%h|%H|%d' --abbrev-commit --date=iso -1 | cat -, shell=True, stdout=subprocess.PIPE).stdout.read() @@ -130,6 +131,7 @@ rev = subprocess.Popen('git rev-list HEAD | wc -l', shell=True, stdout=subprocess.PIPE).stdout.read() +os.chdir(path) rev = int(rev.strip()) hsh = info[3] # also stored in '.git/refs/heads/master' if (not date or not tag or not rev) and not path: @@ -173,7 +175,7 @@ fn = os.path.join(_program_dir, filename) if os.path.exists(fn): for line in open(fn, 'r').readlines(): -if line.find('__initversion__') == 0: +if line.find('__version__') == 0: exec(line) break stat = os.stat(fn) diff --git a/scripts/version.py b/scripts/version.py index 32b06df..7cb2bc7 100755 --- a/scripts/version.py +++ b/scripts/version.py @@ -17,7 +17,7 @@ if __name__ == '__main__': print 'Pywikibot: %s' % getversion() -print 'Release version: %s' % pywikibot.__version__ +print 'Release version: %s' % pywikibot.__release__ print 'Python: %s' % sys.version #print 'config-settings:' #print 'site_interface =', config.site_interface -- To view, visit https://gerrit.wikimedia.org/r/81196 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibbf5953bf8759f94323f9d31bded2c3095ba58a0 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: DrTrigon dr.tri...@surfeu.ch ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 53391) allow lat/lon values from -360 to 360, possible ... - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 53391) allow lat/lon values from -360 to 360, possible for non-earth globes .. (bug 53391) allow lat/lon values from -360 to 360, possible for non-earth globes Change-Id: I1ce9c8661b68232fad36c476d3ea8804a0fcb422 --- M DataValues/src/LatLongValue.php M DataValues/tests/phpunit/LatLongValueTest.php 2 files changed, 9 insertions(+), 7 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, but someone else must approve Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index 68216c6..b1364db 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -68,8 +68,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric latitude' ); } - if ( $latitude -90 || $latitude 90 ) { - throw new OutOfRangeException( 'Latitude needs to be between -90 and 90' ); + if ( $latitude -360 || $latitude 360 ) { + throw new OutOfRangeException( 'Latitude needs to be between -360 and 360' ); } } @@ -78,8 +78,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric longitude' ); } - if ( $longitude -180 || $longitude 180 ) { - throw new OutOfRangeException( 'Longitude needs to be between -180 and 180' ); + if ( $longitude -360 || $longitude 360 ) { + throw new OutOfRangeException( 'Longitude needs to be between -360 and 360' ); } } diff --git a/DataValues/tests/phpunit/LatLongValueTest.php b/DataValues/tests/phpunit/LatLongValueTest.php index 1e5d7bc..e06b32d 100644 --- a/DataValues/tests/phpunit/LatLongValueTest.php +++ b/DataValues/tests/phpunit/LatLongValueTest.php @@ -42,6 +42,8 @@ $argLists[] = array( -4.2, -4.2 ); $argLists[] = array( 4.2, -42 ); $argLists[] = array( -42, 4.2 ); + $argLists[] = array( 360, -360 ); + $argLists[] = array( 48.269, -225.99 ); $argLists[] = array( 0, 0 ); return $argLists; @@ -75,10 +77,10 @@ $argLists[] = array( 42, '42' ); $argLists[] = array( '0', 0 ); - $argLists[] = array( -91, 0 ); + $argLists[] = array( -361, 0 ); $argLists[] = array( -999, 1 ); - $argLists[] = array( 90.001, 2 ); - $argLists[] = array( 3, 181 ); + $argLists[] = array( 360.001, 2 ); + $argLists[] = array( 3, 361 ); $argLists[] = array( 4, -1337 ); return $argLists; -- To view, visit https://gerrit.wikimedia.org/r/81193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I1ce9c8661b68232fad36c476d3ea8804a0fcb422 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] (bug 53391) allow lat/lon values from -360 to 360, possible ... - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: (bug 53391) allow lat/lon values from -360 to 360, possible for non-earth globes .. (bug 53391) allow lat/lon values from -360 to 360, possible for non-earth globes Change-Id: I94ffc43cf66b06a8f870281fdb565029a6f60692 --- M DataValues/src/LatLongValue.php M DataValues/tests/phpunit/LatLongValueTest.php 2 files changed, 7 insertions(+), 7 deletions(-) Approvals: Tobias Gritschacher: Looks good to me, but someone else must approve Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index 68216c6..b1364db 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -68,8 +68,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric latitude' ); } - if ( $latitude -90 || $latitude 90 ) { - throw new OutOfRangeException( 'Latitude needs to be between -90 and 90' ); + if ( $latitude -360 || $latitude 360 ) { + throw new OutOfRangeException( 'Latitude needs to be between -360 and 360' ); } } @@ -78,8 +78,8 @@ throw new InvalidArgumentException( 'Can only construct LatLongValue with a numeric longitude' ); } - if ( $longitude -180 || $longitude 180 ) { - throw new OutOfRangeException( 'Longitude needs to be between -180 and 180' ); + if ( $longitude -360 || $longitude 360 ) { + throw new OutOfRangeException( 'Longitude needs to be between -360 and 360' ); } } diff --git a/DataValues/tests/phpunit/LatLongValueTest.php b/DataValues/tests/phpunit/LatLongValueTest.php index 1e5d7bc..30ffb07 100644 --- a/DataValues/tests/phpunit/LatLongValueTest.php +++ b/DataValues/tests/phpunit/LatLongValueTest.php @@ -75,10 +75,10 @@ $argLists[] = array( 42, '42' ); $argLists[] = array( '0', 0 ); - $argLists[] = array( -91, 0 ); + $argLists[] = array( -361, 0 ); $argLists[] = array( -999, 1 ); - $argLists[] = array( 90.001, 2 ); - $argLists[] = array( 3, 181 ); + $argLists[] = array( 360.001, 2 ); + $argLists[] = array( 3, 381 ); $argLists[] = array( 4, -1337 ); return $argLists; -- To view, visit https://gerrit.wikimedia.org/r/81195 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I94ffc43cf66b06a8f870281fdb565029a6f60692 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] extend ValueFormatterBase for MwIsoTimeFormatter - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: extend ValueFormatterBase for MwIsoTimeFormatter .. extend ValueFormatterBase for MwIsoTimeFormatter - allows the formatter to be used in a consistent manner as other formatters Change-Id: I52541c24044290451255441b991ef347f3e66d96 --- M lib/includes/formatters/MwTimeIsoFormatter.php M lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php M repo/includes/EntityView.php 3 files changed, 42 insertions(+), 9 deletions(-) Approvals: Henning Snater: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/formatters/MwTimeIsoFormatter.php b/lib/includes/formatters/MwTimeIsoFormatter.php index e457cb8..f76aac2 100644 --- a/lib/includes/formatters/MwTimeIsoFormatter.php +++ b/lib/includes/formatters/MwTimeIsoFormatter.php @@ -2,7 +2,11 @@ namespace Wikibase\Lib; -use \ValueFormatters\TimeIsoFormatter; +use Language; +use ValueFormatters\FormatterOptions; +use ValueFormatters\TimeIsoFormatter; +use ValueFormatters\ValueFormatter; +use ValueFormatters\ValueFormatterBase; /** * This program is free software; you can redistribute it and/or modify @@ -28,16 +32,35 @@ * @licence GNU GPL v2+ * @author H. Snater mediaw...@snater.com */ -class MwTimeIsoFormatter implements TimeIsoFormatter { +class MwTimeIsoFormatter extends ValueFormatterBase implements TimeIsoFormatter { /** * MediaWiki language object. -* @var \Language +* @var Language */ - private $language; + protected $language; - public function __construct( $language ) { - $this-language = $language; + /** +* @param FormatterOptions $options +*/ + public function __construct( FormatterOptions $options ) { + $this-options = $options; + + $this-options-defaultOption( ValueFormatter::OPT_LANG, 'en' ); + + $this-language = Language::factory( + $this-options-getOption( ValueFormatter::OPT_LANG ) + ); + } + + /** +* @see ValueFormatter::format +*/ + public function format( $value ) { + return $this-formatDate( + $value-getTime(), + $value-getPrecision() + ); } /** diff --git a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php index 9ee2c08..f901699 100644 --- a/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php +++ b/lib/tests/phpunit/formatters/MwTimeIsoFormatterTest.php @@ -1,6 +1,8 @@ ?php - namespace ValueFormatters\Test; + +use ValueFormatters\ValueFormatter; +use ValueFormatters\FormatterOptions; use Wikibase\Lib\MwTimeIsoFormatter; /** @@ -97,7 +99,13 @@ * @param integer $precision */ public function testFormatDate( $expected, $extendedIsoString, $precision ) { - $isoFormatter = new MwTimeIsoFormatter( \Language::factory( 'en' ) ); + $langCode = 'en'; + $options = new FormatterOptions( array( + ValueFormatter::OPT_LANG = $langCode + ) ); + + $isoFormatter = new MwTimeIsoFormatter( $options ); + $this-assertEquals( $expected, $isoFormatter-formatDate( $extendedIsoString, $precision ) ); } diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php index 714d7e3..b742069 100644 --- a/repo/includes/EntityView.php +++ b/repo/includes/EntityView.php @@ -624,7 +624,9 @@ $valueFormatterOptions = new FormatterOptions( array( ValueFormatter::OPT_LANG = $languageCode, Lib\EntityIdFormatter::OPT_PREFIX_MAP = $entitiesPrefixMap, - TimeFormatter::OPT_TIME_ISO_FORMATTER = new MwTimeIsoFormatter( \Language::factory( $languageCode ) ), + TimeFormatter::OPT_TIME_ISO_FORMATTER = new MwTimeIsoFormatter( + new FormatterOptions( array( ValueFormatter::OPT_LANG = $languageCode ) ) + ), ) ); // TODO: display a placeholder message for novalue/somevalue snak -- To view, visit https://gerrit.wikimedia.org/r/80968 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I52541c24044290451255441b991ef347f3e66d96 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher
[MediaWiki-commits] [Gerrit] bug fix from core and sync (to core) for version handling - change (pywikibot/compat)
DrTrigon has uploaded a new change for review. https://gerrit.wikimedia.org/r/81197 Change subject: bug fix from core and sync (to core) for version handling .. bug fix from core and sync (to core) for version handling * git version info extraction was buggy * minor changes introduced in core were ported Change-Id: I0a82d5c2139fdcbe27be64a39f0647e6be9be700 --- M pywikibot/version.py 1 file changed, 17 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat refs/changes/97/81197/1 diff --git a/pywikibot/version.py b/pywikibot/version.py index a9c6344..4cafdb0 100644 --- a/pywikibot/version.py +++ b/pywikibot/version.py @@ -41,6 +41,7 @@ data['hsh'] = data['hsh'][:7] # make short hash from full hash return '%(tag)s (r%(rev)s, %(hsh)s, %(date)s, %(cmp_ver)s)' % data + def getversiondict(): global cache if cache: @@ -90,7 +91,7 @@ name, tag, rev, date = cur.fetchone() con.close() tag = tag[:-len(name)] -date = time.gmtime(date/100) +date = time.gmtime(date / 100) else: for i in xrange(3): entries.readline() @@ -107,6 +108,7 @@ raise ParseError return (tag, rev, date) + def getversion_git(path=None): _program_dir = path or _get_program_dir() #(try to use .git directory for new entries format) @@ -116,23 +118,27 @@ tag = open(os.path.join(_program_dir, '.git/config'), 'r').read() s = tag.find('url = ', tag.find('[remote origin]')) e = tag.find('\n', s) -tag = tag[(s+6):e] +tag = tag[(s + 6):e] t = tag.strip().split('/') -tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4]) +tag = '[%s] %s' % (t[0][:-1], '/'.join(t[3:])[:-4]) +path = os.path.abspath(os.curdir) +os.chdir(_program_dir) info = subprocess.Popen(git log --pretty=format:'%ad|%an|%h|%H|%d' --abbrev-commit --date=iso -1 | cat -, shell=True, stdout=subprocess.PIPE).stdout.read() info = info.split('|') date = info[0][:-6] date = time.strptime(date, '%Y-%m-%d %H:%M:%S') -rev = subprocess.Popen('git rev-list HEAD | wc -l', -shell=True, -stdout=subprocess.PIPE).stdout.read() -rev = int(rev.strip()) -hsh = info[3] # also stored in '.git/refs/heads/master' +rev = subprocess.Popen('git rev-list HEAD | wc -l', + shell=True, + stdout=subprocess.PIPE).stdout.read() +os.chdir(path) +rev = int(rev.strip()) +hsh = info[3] # also stored in '.git/refs/heads/master' if (not date or not tag or not rev) and not path: raise ParseError return (tag, rev, date, hsh) + def getversion_nightly(): data = open(os.path.join(wikipediatools.get_base_dir(), 'version')) @@ -142,6 +148,7 @@ if not date or not tag or not rev: raise ParseError return (tag, rev, date, '(unknown)') + def getversion_onlinerepo(repo=None): Retrieve revision number of framework online repository's svnroot @@ -156,7 +163,7 @@ ## Simple version comparison # -cmp_ver = lambda a, b, tol=1: {-1: '', 0: '~', 1: ''}[cmp((a-b)//tol, 0)] +cmp_ver = lambda a, b, tol=1: {-1: '', 0: '~', 1: ''}[cmp((a - b) // tol, 0)] def getfileversion(filename): @@ -172,7 +179,7 @@ if line.find('__version__') == 0: exec(line) break -stat = os.stat(fn) +stat = os.stat(fn) mtime = datetime.datetime.fromtimestamp(stat.st_mtime).isoformat(' ') if mtime and __version__: return u'%s %s %s' % (filename, __version__[5:-1][:7], mtime) -- To view, visit https://gerrit.wikimedia.org/r/81197 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0a82d5c2139fdcbe27be64a39f0647e6be9be700 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/compat Gerrit-Branch: master Gerrit-Owner: DrTrigon dr.tri...@surfeu.ch ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Moved ULS tests from browsertests repository - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Moved ULS tests from browsertests repository .. Moved ULS tests from browsertests repository Change-Id: I4f4a4c5530ad7e5dff70171b59a589dc98b1ef29 --- A tests/browser/Gemfile A tests/browser/Gemfile.lock A tests/browser/README.md A tests/browser/config/config.yml A tests/browser/config/cucumber.yml A tests/browser/features/step_definitions/common_steps.rb A tests/browser/features/step_definitions/uls_accept_language_steps.rb A tests/browser/features/step_definitions/uls_cog_sidebar_user_steps.rb A tests/browser/features/step_definitions/uls_ime_steps.rb A tests/browser/features/step_definitions/uls_steps.rb A tests/browser/features/support/env.rb A tests/browser/features/support/modules/interlanguage_module.rb A tests/browser/features/support/modules/url_module.rb A tests/browser/features/support/pages/interlanguage_page.rb A tests/browser/features/support/pages/login_page.rb A tests/browser/features/support/pages/no_interlanguage_page.rb A tests/browser/features/support/pages/random_page.rb A tests/browser/features/support/sauce.rb A tests/browser/features/uls.feature A tests/browser/features/uls_accept_language.feature A tests/browser/features/uls_cog_sidebar_anon_user.feature A tests/browser/features/uls_cog_sidebar_logged_user.feature A tests/browser/features/uls_ime.feature 23 files changed, 844 insertions(+), 0 deletions(-) Approvals: Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/Gemfile b/tests/browser/Gemfile new file mode 100755 index 000..d38e593 --- /dev/null +++ b/tests/browser/Gemfile @@ -0,0 +1,11 @@ +#ruby=ruby-2.0.0-p247 +#ruby-gemset=UniversalLanguageSelector + +source 'https://rubygems.org' + +gem 'cucumber' +gem 'json' +gem 'net-http-persistent' +gem 'page-object' +gem 'rspec-expectations' +gem 'syntax' diff --git a/tests/browser/Gemfile.lock b/tests/browser/Gemfile.lock new file mode 100644 index 000..fc6f9f0 --- /dev/null +++ b/tests/browser/Gemfile.lock @@ -0,0 +1,56 @@ +GEM + remote: https://rubygems.org/ + specs: +builder (3.2.2) +childprocess (0.3.9) + ffi (~ 1.0, = 1.0.11) +cucumber (1.3.6) + builder (= 2.1.2) + diff-lcs (= 1.1.3) + gherkin (~ 2.12.0) + multi_json (~ 1.7.5) + multi_test (= 0.0.2) +data_magic (0.15.2) + faker (= 1.1.2) + yml_reader (= 0.2) +diff-lcs (1.2.4) +faker (1.2.0) + i18n (~ 0.5) +ffi (1.9.0) +gherkin (2.12.1) + multi_json (~ 1.3) +i18n (0.6.5) +json (1.8.0) +multi_json (1.7.9) +multi_test (0.0.2) +net-http-persistent (2.9) +page-object (0.9.2) + page_navigation (= 0.8) + selenium-webdriver (= 2.35.0) + watir-webdriver (= 0.6.4) +page_navigation (0.9) + data_magic (= 0.14) +rspec-expectations (2.14.2) + diff-lcs (= 1.1.3, 2.0) +rubyzip (0.9.9) +selenium-webdriver (2.35.0) + childprocess (= 0.2.5) + multi_json (~ 1.0) + rubyzip + websocket (~ 1.0.4) +syntax (1.0.0) +watir-webdriver (0.6.4) + selenium-webdriver (= 2.18.0) +websocket (1.0.7) +yml_reader (0.2) + +PLATFORMS + ruby + +DEPENDENCIES + cucumber + json + net-http-persistent + page-object + rspec-expectations + syntax diff --git a/tests/browser/README.md b/tests/browser/README.md new file mode 100644 index 000..3c5449a --- /dev/null +++ b/tests/browser/README.md @@ -0,0 +1 @@ +Please see https://github.com/wikimedia/qa-browsertests for instructions on how to run tests. diff --git a/tests/browser/config/config.yml b/tests/browser/config/config.yml new file mode 100644 index 000..17db808 --- /dev/null +++ b/tests/browser/config/config.yml @@ -0,0 +1,36 @@ +mediawiki_username: Selenium_user + +chrome: + name: chrome + platform: Linux + version: + +firefox: + name: firefox + platform: Linux + version: 23 + +internet_explorer_6: + name: internet_explorer + platform: Windows XP + version: 6 + +internet_explorer_7: + name: internet_explorer + platform: Windows XP + version: 7 + +internet_explorer_8: + name: internet_explorer + platform: Windows XP + version: 8 + +internet_explorer_9: + name: internet_explorer + platform: Windows 7 + version: 9 + +internet_explorer_10: + name: internet_explorer + platform: Windows 8 + version: 10 diff --git a/tests/browser/config/cucumber.yml b/tests/browser/config/cucumber.yml new file mode 100644 index 000..150c284 --- /dev/null +++ b/tests/browser/config/cucumber.yml @@ -0,0 +1,2 @@ +ci: --format Cucumber::Formatter::Sauce --out reports/junit +default: --format progress diff --git a/tests/browser/features/step_definitions/common_steps.rb b/tests/browser/features/step_definitions/common_steps.rb new file mode 100644 index 000..7886fc6 --- /dev/null +++ b/tests/browser/features/step_definitions/common_steps.rb @@ -0,0 +1,7 @@ +Given(/^I am at
[MediaWiki-commits] [Gerrit] Update DataValues, fix handling of Mars coordinates, etc. - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81198 Change subject: Update DataValues, fix handling of Mars coordinates, etc. .. Update DataValues, fix handling of Mars coordinates, etc. Change-Id: I214bb354660098b776bc7d18414f22d611f16942 --- M extensions/DataValues 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/81198/1 diff --git a/extensions/DataValues b/extensions/DataValues index acf7c41..c5e7baf 16 --- a/extensions/DataValues +++ b/extensions/DataValues -Subproject commit acf7c4132d66f6ce814a0dc4e6061fc9091ff253 +Subproject commit c5e7bafc4d34f543282cf2014e0e80bce0e09b57 -- To view, visit https://gerrit.wikimedia.org/r/81198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I214bb354660098b776bc7d18414f22d611f16942 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf14 Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bug fix for SyntaxError: EOL while scanning string literal - change (pywikibot/core)
DrTrigon has uploaded a new change for review. https://gerrit.wikimedia.org/r/81199 Change subject: bug fix for SyntaxError: EOL while scanning string literal .. bug fix for SyntaxError: EOL while scanning string literal (what went wrong with this review - how has that been merged...? ;)) Change-Id: I9b0b6b7d33f0c0fe53d9f99109d0f935c866f215 --- M pywikibot/site.py 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/99/81199/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 0135bd8..4e5dfaf 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2847,7 +2847,7 @@ uRollback of %s aborted; only one user in revision history. % page.title(asLink=True)) summary = summary or ( -uReverted edits by [[Special:Contributions/%(last_user)s|%(last_user)s]] +uReverted edits by [[Special:Contributions/%(last_user)s|%(last_user)s]] u([[User talk:%(last_user)s|Talk]]) to last version by %(prev_user)s % locals()) token = self.token(page, rollback) -- To view, visit https://gerrit.wikimedia.org/r/81199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9b0b6b7d33f0c0fe53d9f99109d0f935c866f215 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: DrTrigon dr.tri...@surfeu.ch ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] bug fix for SyntaxError: EOL while scanning string literal - change (pywikibot/core)
DrTrigon has submitted this change and it was merged. Change subject: bug fix for SyntaxError: EOL while scanning string literal .. bug fix for SyntaxError: EOL while scanning string literal (what went wrong with this review - how has that been merged...? ;)) Change-Id: I9b0b6b7d33f0c0fe53d9f99109d0f935c866f215 --- M pywikibot/site.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: DrTrigon: Verified; Looks good to me, approved jenkins-bot: Verified diff --git a/pywikibot/site.py b/pywikibot/site.py index 0135bd8..4e5dfaf 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -2847,7 +2847,7 @@ uRollback of %s aborted; only one user in revision history. % page.title(asLink=True)) summary = summary or ( -uReverted edits by [[Special:Contributions/%(last_user)s|%(last_user)s]] +uReverted edits by [[Special:Contributions/%(last_user)s|%(last_user)s]] u([[User talk:%(last_user)s|Talk]]) to last version by %(prev_user)s % locals()) token = self.token(page, rollback) -- To view, visit https://gerrit.wikimedia.org/r/81199 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9b0b6b7d33f0c0fe53d9f99109d0f935c866f215 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: DrTrigon dr.tri...@surfeu.ch Gerrit-Reviewer: DrTrigon dr.tri...@surfeu.ch Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Workaround for Unable to determine IP bug - change (mediawiki/vagrant)
jenkins-bot has submitted this change and it was merged. Change subject: Workaround for Unable to determine IP bug .. Workaround for Unable to determine IP bug A recent change to MediaWiki causes phpsh invocations to fail with an Unable to determine IP error. This patch provides a temporary workaround. Change-Id: Ib579708c2e17717e21911185be22ce9031ff6668 --- M LocalSettings.php 1 file changed, 8 insertions(+), 0 deletions(-) Approvals: Ori.livneh: Looks good to me, approved jenkins-bot: Verified diff --git a/LocalSettings.php b/LocalSettings.php index 60c4ae0..1e92935 100644 --- a/LocalSettings.php +++ b/LocalSettings.php @@ -67,3 +67,11 @@ glob( __DIR__ . '/settings.d/*.php' ) ) as $conffile ) { include_once $conffile; } + +// XXX: Is this a bug in core? (ori-l, 27-Aug-2013) +$wgHooks['GetIP'][] = function ( $ip ) { + if ( PHP_SAPI === 'cli' ) { + $ip = '127.0.0.1'; + } + return true; +}; -- To view, visit https://gerrit.wikimedia.org/r/81200 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib579708c2e17717e21911185be22ce9031ff6668 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: Ori.livneh o...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update documentation after change that just changed the code - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/81201 Change subject: Update documentation after change that just changed the code .. Update documentation after change that just changed the code Change-Id: I9f321d320fb47a7a2cc99ef892eb0ffd6b6bfee1 --- M DataValues/src/LatLongValue.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/01/81201/1 diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index b1364db..f78c7e5 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -8,8 +8,8 @@ /** * Object representing a geographic point. * - * Latitude is specified in degrees within the range [-90, 90]. - * Longitude is specified in degrees within the range [-180, 180]. + * Latitude is specified in degrees within the range [-360, 360]. + * Longitude is specified in degrees within the range [-360, 360]. * * @since 0.1 * -- To view, visit https://gerrit.wikimedia.org/r/81201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9f321d320fb47a7a2cc99ef892eb0ffd6b6bfee1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update documentation after change that just changed the code - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: Update documentation after change that just changed the code .. Update documentation after change that just changed the code Change-Id: I9f321d320fb47a7a2cc99ef892eb0ffd6b6bfee1 --- M DataValues/src/LatLongValue.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/src/LatLongValue.php b/DataValues/src/LatLongValue.php index b1364db..f78c7e5 100644 --- a/DataValues/src/LatLongValue.php +++ b/DataValues/src/LatLongValue.php @@ -8,8 +8,8 @@ /** * Object representing a geographic point. * - * Latitude is specified in degrees within the range [-90, 90]. - * Longitude is specified in degrees within the range [-180, 180]. + * Latitude is specified in degrees within the range [-360, 360]. + * Longitude is specified in degrees within the range [-360, 360]. * * @since 0.1 * -- To view, visit https://gerrit.wikimedia.org/r/81201 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9f321d320fb47a7a2cc99ef892eb0ffd6b6bfee1 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add solr::decommission class apply it to vanadium - change (operations/puppet)
Ori.livneh has uploaded a new change for review. https://gerrit.wikimedia.org/r/81202 Change subject: Add solr::decommission class apply it to vanadium .. Add solr::decommission class apply it to vanadium ori-l Nikerabbit: is it ok to remove role::solr::ttm from vanadium, btw? Nikerabbit ori-l: it has been moved to a new server, but I already forgot the name Also adds a bit of documentation for role::solr::ttm. Change-Id: I6db14149b8f85c322ed41564d5a2ff315d2ed42d --- M manifests/role/solr.pp M manifests/site.pp A modules/solr/manifests/decommission.pp 3 files changed, 37 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/02/81202/1 diff --git a/manifests/role/solr.pp b/manifests/role/solr.pp index 46f6b47..cf683c5 100644 --- a/manifests/role/solr.pp +++ b/manifests/role/solr.pp @@ -27,6 +27,15 @@ } } +# == Class: role::solr::ttm +# +# TTMServer is a translation memory server that comes with the Translate +# extension. The Translate extension turns MediaWiki into a tool for +# doing collaborative translation work. This Puppet class configures a +# Solr back-end for translation lookups. It is used by translatewiki. +# +# See http://www.mediawiki.org/wiki/Help:Extension:Translate/Translation_memories#Solr_backend. +# class role::solr::ttm { system_role { solr: description = ttm solr backend } diff --git a/manifests/site.pp b/manifests/site.pp index 2a2a9c2..61442f1 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -2824,7 +2824,7 @@ role::eventlogging, role::ipython_notebook, nrpe, -role::solr::ttm +solr::decommission sudo_user { [ 'otto', 'olivneh' ]: privileges = ['ALL = (ALL) NOPASSWD: ALL'], diff --git a/modules/solr/manifests/decommission.pp b/modules/solr/manifests/decommission.pp new file mode 100644 index 000..6a16a1b --- /dev/null +++ b/modules/solr/manifests/decommission.pp @@ -0,0 +1,27 @@ +# == Class: solr::decommission +# +# Uninstalls Solr related configuration data from a node. +# +class solr::decommission { +package { 'solr-jetty': +ensure = absent, +} + +file { [ +'/etc/default/jetty', +'/etc/solr', +'/usr/share/jetty/webapps/solr', +'/usr/share/solr', +]: +ensure = absent, +recurse = true, +purge = true, +force = true, +before = Service['jetty'], +} + +service { 'jetty': +ensure = stopped, +enable = false, +} +} -- To view, visit https://gerrit.wikimedia.org/r/81202 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6db14149b8f85c322ed41564d5a2ff315d2ed42d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ori.livneh o...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] sudo right for hashar on lanthanum (Jenkins slave) - change (operations/puppet)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81203 Change subject: sudo right for hashar on lanthanum (Jenkins slave) .. sudo right for hashar on lanthanum (Jenkins slave) I could use some elevated privileges on the Jenkins slave box lanthanum.eqiad.wmnet. That is to be able to investigate weird issues that will definitely happen on this box and easily run a puppet refresh whenever needed. The access request as been filled as RT #5677 Change-Id: I97ba56eebdbd0660505b329687bd3848ca5d5176 --- M manifests/site.pp 1 file changed, 3 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/03/81203/1 diff --git a/manifests/site.pp b/manifests/site.pp index 2a2a9c2..e7b0c38 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -1332,12 +1332,14 @@ # Used as a Jenkins slave so some folks need escalated privileges $gid=500 -sudo_user { [ 'demon', 'hashar', 'krinkle', 'reedy', 'dsc', 'mholmquist' ]: privileges = [ +sudo_user { [ 'demon', 'krinkle', 'reedy', 'dsc', 'mholmquist' ]: privileges = [ 'ALL = (jenkins-slave) NOPASSWD: ALL', 'ALL = (gerritslave) NOPASSWD: ALL', ] } +# full root for Jenkins admin (RT-5677) +sudo_user { hashar: privileges = ['ALL = NOPASSWD: ALL'] } # lanthanum received a SSD drive just like gallium (RT #5178) mount it file { '/srv/ssd': -- To view, visit https://gerrit.wikimedia.org/r/81203 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I97ba56eebdbd0660505b329687bd3848ca5d5176 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] allow precision to be null in globe coordinate - change (mediawiki...DataValues)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81204 Change subject: allow precision to be null in globe coordinate .. allow precision to be null in globe coordinate Change-Id: I6cbd2bd46e17a7f6a26a49e2109e88f6af345ebd --- M DataValues/src/GlobeCoordinateValue.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/04/81204/1 diff --git a/DataValues/src/GlobeCoordinateValue.php b/DataValues/src/GlobeCoordinateValue.php index cb03d47..753079a 100644 --- a/DataValues/src/GlobeCoordinateValue.php +++ b/DataValues/src/GlobeCoordinateValue.php @@ -65,8 +65,8 @@ } protected function assertIsPrecision( $precision ) { - if ( !is_float( $precision ) !is_int( $precision ) ) { - throw new IllegalValueException( 'Can only construct GlobeCoordinateValue with a numeric precision' ); + if ( !is_null( $precision ) !is_float( $precision ) !is_int( $precision ) ) { +throw new IllegalValueException( 'Can only construct GlobeCoordinateValue with a numeric precision or null' ); } } -- To view, visit https://gerrit.wikimedia.org/r/81204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6cbd2bd46e17a7f6a26a49e2109e88f6af345ebd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add gitignore and remove unsupported browsers - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/81205 Change subject: Add gitignore and remove unsupported browsers .. Add gitignore and remove unsupported browsers Change-Id: Ic415bcee0cfa8822a48396a2c1b086dbff200c2a --- A tests/browser/.gitignore M tests/browser/config/config.yml 2 files changed, 2 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/05/81205/1 diff --git a/tests/browser/.gitignore b/tests/browser/.gitignore new file mode 100644 index 000..9fc7a0c --- /dev/null +++ b/tests/browser/.gitignore @@ -0,0 +1 @@ +config/secret.yml diff --git a/tests/browser/config/config.yml b/tests/browser/config/config.yml index 17db808..9e8902d 100644 --- a/tests/browser/config/config.yml +++ b/tests/browser/config/config.yml @@ -10,16 +10,7 @@ platform: Linux version: 23 -internet_explorer_6: - name: internet_explorer - platform: Windows XP - version: 6 - -internet_explorer_7: - name: internet_explorer - platform: Windows XP - version: 7 - +# IE 8 not supported, IE8 has some issues internet_explorer_8: name: internet_explorer platform: Windows XP -- To view, visit https://gerrit.wikimedia.org/r/81205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic415bcee0cfa8822a48396a2c1b086dbff200c2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add new scenarios for font changes - change (mediawiki...UniversalLanguageSelector)
Nikerabbit has uploaded a new change for review. https://gerrit.wikimedia.org/r/81206 Change subject: Add new scenarios for font changes .. Add new scenarios for font changes There is currently some duplication between the varios page objects and other code. Those should be cleaned up incrementally. Change-Id: I592829a00ca65bbecd5399b773c885c764c1cc06 --- A tests/browser/features/font_selection.feature A tests/browser/features/persistent_settings.feature M tests/browser/features/step_definitions/common_steps.rb A tests/browser/features/step_definitions/panel_steps.rb A tests/browser/features/support/pages/panel_page.rb A tests/browser/features/support/pages/reset_preferences.rb 6 files changed, 198 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/06/81206/1 diff --git a/tests/browser/features/font_selection.feature b/tests/browser/features/font_selection.feature new file mode 100644 index 000..5e1467a --- /dev/null +++ b/tests/browser/features/font_selection.feature @@ -0,0 +1,38 @@ +@reset-preferences-after @login @en.wikipedia.beta.wmflabs.org @commons.wikimedia.beta.wmflabs.org +Feature: Font selection + +In order to have better using experience, +As a reader and writer, +I want to change or disable the fonts for interface and content. + +In addition the user is provided live preview feature: changes are applied +immediately when selection is made. Changes can either be applied or discared +for easy testing. + +Background: + Given I am logged in +And I set German as the interface language +And the content language is English +And I inspect current fonts + +Scenario: Discarding live preview of content font + When I open Fonts panel of language settings +And I select OpenDyslexic font for the content language for the live preview +And I close the panel to discard the changes + Then the active interface font must be the same as font prior to the preview +# System is the default value for English and German +And the selected interface font must be system + +Scenario: Discarding live preview of interface font + When I open Fonts panel of language settings +And I select OpenDyslexic font for the interface language for the live preview +And I close the panel to discard the changes + Then the active content font must be the same as font prior to the preview +# System is the default value for English and German +And the selected content font must be system + +Scenario: Applying the live preview of interface font + When I open Fonts panel of language settings +And I select OpenDyslexic font for the interface language for the live preview +And I apply the changes + Then the interface font must be changed to the OpenDyslexic font diff --git a/tests/browser/features/persistent_settings.feature b/tests/browser/features/persistent_settings.feature new file mode 100644 index 000..a75b372 --- /dev/null +++ b/tests/browser/features/persistent_settings.feature @@ -0,0 +1,14 @@ +@login @reset-preferences-after @en.wikipedia.beta.wmflabs.org @commons.wikimedia.beta.wmflabs.org +Feature: Persistent settings + + Background: +Given I am logged in + And I set German as the interface language + And the content language is English + + Scenario: Interface font sticks to another page +When I open Fonts panel of language settings + And I select OpenDyslexic font for the interface language for the live preview + And I apply the changes + And I visit a random page +Then the selected interface font must be OpenDyslexic diff --git a/tests/browser/features/step_definitions/common_steps.rb b/tests/browser/features/step_definitions/common_steps.rb index 7886fc6..5d9fe21 100644 --- a/tests/browser/features/step_definitions/common_steps.rb +++ b/tests/browser/features/step_definitions/common_steps.rb @@ -5,3 +5,31 @@ Given(/^I am logged in$/) do visit(LoginPage).login_with(@mediawiki_username, @mediawiki_password) end + +def language_to_code(language) + case language + when 'German' + 'de' + when 'English' + 'en' + else + pending + end +end + +def get_font(selector) + @browser.execute_script( return $( '#{selector}' ).css( 'font-family' ); ) +end + +def get_content_font() + get_font('#mw-content-text') +end + +def get_interface_font() + get_font('body') +end + +After('@reset-preferences-after') do |scenario| + visit(ResetPreferencesPage) + on(ResetPreferencesPage).submit_element.click +end diff --git a/tests/browser/features/step_definitions/panel_steps.rb b/tests/browser/features/step_definitions/panel_steps.rb new file mode 100644 index 000..23b1002 --- /dev/null +++ b/tests/browser/features/step_definitions/panel_steps.rb @@ -0,0 +1,97 @@ +Given(/^I
[MediaWiki-commits] [Gerrit] Introduced 'qualifiers-order' parameter in ClaimSerializer - change (mediawiki...Wikibase)
Jeroen De Dauw has submitted this change and it was merged. Change subject: Introduced 'qualifiers-order' parameter in ClaimSerializer .. Introduced 'qualifiers-order' parameter in ClaimSerializer (bug 52391) Since, in the serialized JSON structure, the qualifiers are encapsulated in an object indexed by property id, the 'qualifiers-order' parameter specifies the order of those property ids. Change-Id: I6f8399b621dddb6c84082db5fd35286a2ecd438c --- M .jshintignore M lib/includes/serializers/ClaimSerializer.php M lib/resources/wikibase.datamodel/wikibase.Claim.js M lib/resources/wikibase.datamodel/wikibase.SnakList.js M lib/tests/phpunit/serializers/ClaimSerializerTest.php M lib/tests/qunit/wikibase.datamodel/Wikibase.SnakList.tests.js M repo/tests/phpunit/includes/api/SetClaimTest.php 7 files changed, 246 insertions(+), 30 deletions(-) Approvals: Jeroen De Dauw: Looks good to me, approved jenkins-bot: Verified diff --git a/.jshintignore b/.jshintignore index fe966a7..eea9c1c 100644 --- a/.jshintignore +++ b/.jshintignore @@ -22,7 +22,6 @@ ./lib/tests/qunit/wikibase.datamodel/datamodel.Property.tests.js ./lib/tests/qunit/wikibase.datamodel/Wikibase.claim.tests.js ./lib/tests/qunit/wikibase.datamodel/Wikibase.reference.tests.js -./lib/tests/qunit/wikibase.datamodel/Wikibase.SnakList.tests.js ./lib/tests/qunit/wikibase.datamodel/Wikibase.snak.tests.js ./lib/tests/qunit/wikibase.datamodel/wikibase.Statement.tests.js ./lib/tests/qunit/wikibase.RepoApi/wikibase.RepoApiError.tests.js diff --git a/lib/includes/serializers/ClaimSerializer.php b/lib/includes/serializers/ClaimSerializer.php index f041c8e..ac00c7b 100644 --- a/lib/includes/serializers/ClaimSerializer.php +++ b/lib/includes/serializers/ClaimSerializer.php @@ -109,6 +109,12 @@ if ( $qualifiers !== array() ) { $serialization['qualifiers'] = $qualifiers; + + $serialization['qualifiers-order'] = array(); + foreach( $qualifiers as $propertyId = $snaks ) { + $serialization['qualifiers-order'][] = $propertyId; + } + $this-setIndexedTagName( $serialization['qualifiers-order'], 'qualifiers-order' ); } $serialization['type'] = $claim instanceof Statement ? 'statement' : 'claim'; @@ -180,11 +186,7 @@ $claim-setGuid( $serialization['id'] ); - if ( array_key_exists( 'qualifiers', $serialization ) ) { - $snaksUnserializer = new ByPropertyListUnserializer( $snakUnserializer ); - $snaks = $snaksUnserializer-newFromSerialization( $serialization['qualifiers'] ); - $claim-setQualifiers( new \Wikibase\SnakList( $snaks ) ); - } + $claim-setQualifiers( $this-unserializeQualifiers( $serialization, $snakUnserializer ) ); if ( $isStatement ) { if ( !in_array( $serialization['rank'], self::$rankMap ) ) { @@ -212,4 +214,50 @@ return $claim; } + /** +* Deserializes qualifiers from a serialized claim. +* +* @since 0.4 +* +* @param array $serialization +* @param SnakSerializer $snakUnserializer +* @return \Wikibase\SnakList +* @throws \MWException +*/ + protected function unserializeQualifiers( $serialization, $snakUnserializer ) { + if ( !array_key_exists( 'qualifiers', $serialization ) ) { + return new \Wikibase\SnakList(); + } else { + $sortedQualifiers = array(); + + if( !array_key_exists( 'qualifiers-order', $serialization ) ) { + $sortedQualifiers = $serialization['qualifiers']; + + } else { + foreach( $serialization['qualifiers-order'] as $propertyId ) { + if( !isset( $serialization['qualifiers'][$propertyId] ) ) { + throw new MWException( 'No snaks with property id ' . $propertyId . ' ' + . 'found in qualifiers parameter although specified in ' + . 'qualifiers-order' ); + } + + $sortedQualifiers[$propertyId] = $serialization['qualifiers'][$propertyId]; + } + + $missingProperties = array_diff_key( + $sortedQualifiers, + $serialization['qualifiers'] + ); + + if( count( $missingProperties ) 0 )
[MediaWiki-commits] [Gerrit] ruby 1.9 linter for UniversalLanguageSelector - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81207 Change subject: ruby 1.9 linter for UniversalLanguageSelector .. ruby 1.9 linter for UniversalLanguageSelector Creates mwext-UniversalLanguageSelector-ruby1.9.3lint Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b --- M mediawiki-extensions.yaml 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/07/81207/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index b6d8bd6..7b0ae68 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -559,6 +559,12 @@ jobs: - '{name}-ruby1.9.3lint' +- project: +name: 'mwext-UniversalLanguageSelector' +gerrit-name: mediawiki/extensions/UniversalLanguageSelector +jobs: + - '{name}-ruby1.9.3lint' + - job-template: name: 'mwext-PoolCounter-build' defaults: use-zuul -- To view, visit https://gerrit.wikimedia.org/r/81207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] ruby 1.9 linter for UniversalLanguageSelector - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: ruby 1.9 linter for UniversalLanguageSelector .. ruby 1.9 linter for UniversalLanguageSelector Creates mwext-UniversalLanguageSelector-ruby1.9.3lint Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b --- M mediawiki-extensions.yaml 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index b6d8bd6..7b0ae68 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -559,6 +559,12 @@ jobs: - '{name}-ruby1.9.3lint' +- project: +name: 'mwext-UniversalLanguageSelector' +gerrit-name: mediawiki/extensions/UniversalLanguageSelector +jobs: + - '{name}-ruby1.9.3lint' + - job-template: name: 'mwext-PoolCounter-build' defaults: use-zuul -- To view, visit https://gerrit.wikimedia.org/r/81207 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trigger mwext-UniversalLanguageSelector-ruby1.9.3lint - change (integration/zuul-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81208 Change subject: trigger mwext-UniversalLanguageSelector-ruby1.9.3lint .. trigger mwext-UniversalLanguageSelector-ruby1.9.3lint Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config refs/changes/08/81208/1 diff --git a/layout.yaml b/layout.yaml index e8caa17..96a92e1 100644 --- a/layout.yaml +++ b/layout.yaml @@ -2088,11 +2088,13 @@ - mwext-UniversalLanguageSelector-lint - mwext-UniversalLanguageSelector-phpcs-HEAD - mwext-UniversalLanguageSelector-jslint + - mwext-UniversalLanguageSelector-ruby1.9.3lint gate-and-submit: - mwext-UniversalLanguageSelector-jslint - mwext-UniversalLanguageSelector-phpcs-HEAD - mwext-UniversalLanguageSelector-lint: - mwext-UniversalLanguageSelector-testextensions-master + - mwext-UniversalLanguageSelector-ruby1.9.3lint - name: mediawiki/extensions/UploadBlacklist template: -- To view, visit https://gerrit.wikimedia.org/r/81208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] trigger mwext-UniversalLanguageSelector-ruby1.9.3lint - change (integration/zuul-config)
jenkins-bot has submitted this change and it was merged. Change subject: trigger mwext-UniversalLanguageSelector-ruby1.9.3lint .. trigger mwext-UniversalLanguageSelector-ruby1.9.3lint Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b --- M layout.yaml 1 file changed, 2 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/layout.yaml b/layout.yaml index e8caa17..96a92e1 100644 --- a/layout.yaml +++ b/layout.yaml @@ -2088,11 +2088,13 @@ - mwext-UniversalLanguageSelector-lint - mwext-UniversalLanguageSelector-phpcs-HEAD - mwext-UniversalLanguageSelector-jslint + - mwext-UniversalLanguageSelector-ruby1.9.3lint gate-and-submit: - mwext-UniversalLanguageSelector-jslint - mwext-UniversalLanguageSelector-phpcs-HEAD - mwext-UniversalLanguageSelector-lint: - mwext-UniversalLanguageSelector-testextensions-master + - mwext-UniversalLanguageSelector-ruby1.9.3lint - name: mediawiki/extensions/UploadBlacklist template: -- To view, visit https://gerrit.wikimedia.org/r/81208 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b Gerrit-PatchSet: 1 Gerrit-Project: integration/zuul-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] allow precision to be null in globe coordinate - change (mediawiki...DataValues)
jenkins-bot has submitted this change and it was merged. Change subject: allow precision to be null in globe coordinate .. allow precision to be null in globe coordinate Change-Id: I6cbd2bd46e17a7f6a26a49e2109e88f6af345ebd --- M DataValues/src/GlobeCoordinateValue.php M DataValues/tests/phpunit/GlobeCoordinateValueTest.php 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/DataValues/src/GlobeCoordinateValue.php b/DataValues/src/GlobeCoordinateValue.php index cb03d47..753079a 100644 --- a/DataValues/src/GlobeCoordinateValue.php +++ b/DataValues/src/GlobeCoordinateValue.php @@ -65,8 +65,8 @@ } protected function assertIsPrecision( $precision ) { - if ( !is_float( $precision ) !is_int( $precision ) ) { - throw new IllegalValueException( 'Can only construct GlobeCoordinateValue with a numeric precision' ); + if ( !is_null( $precision ) !is_float( $precision ) !is_int( $precision ) ) { +throw new IllegalValueException( 'Can only construct GlobeCoordinateValue with a numeric precision or null' ); } } diff --git a/DataValues/tests/phpunit/GlobeCoordinateValueTest.php b/DataValues/tests/phpunit/GlobeCoordinateValueTest.php index c6d224e..a2eea71 100644 --- a/DataValues/tests/phpunit/GlobeCoordinateValueTest.php +++ b/DataValues/tests/phpunit/GlobeCoordinateValueTest.php @@ -48,6 +48,7 @@ $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 'terminus' ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, Schar's World ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 'coruscant' ); + $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null ); return $argLists; } @@ -55,7 +56,6 @@ public function invalidConstructorArgumentsProvider() { $argLists = array(); - $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 'foo' ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), true ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), array( 1 ) ); @@ -102,7 +102,7 @@ public function testGetPrecision( GlobeCoordinateValue $geoCoord, array $arguments ) { $actual = $geoCoord-getPrecision(); - $this-assertTrue( is_float( $actual ) || is_int( $actual ), 'Precision is int or float' ); + $this-assertTrue( is_null( $actual ) || is_float( $actual ) || is_int( $actual ), 'Precision is int or float or null' ); $this-assertEquals( $arguments[1], $actual ); } -- To view, visit https://gerrit.wikimedia.org/r/81204 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6cbd2bd46e17a7f6a26a49e2109e88f6af345ebd Gerrit-PatchSet: 4 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...UniversalLanguageSelector)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81209 Change subject: Jenkins job validation (DO NOT SUBMIT) .. Jenkins job validation (DO NOT SUBMIT) Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b --- A JENKINS A jenkins.js A jenkins.php 3 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector refs/changes/09/81209/1 diff --git a/JENKINS b/JENKINS new file mode 100644 index 000..e69de29 --- /dev/null +++ b/JENKINS diff --git a/jenkins.js b/jenkins.js new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.js diff --git a/jenkins.php b/jenkins.php new file mode 100644 index 000..e69de29 --- /dev/null +++ b/jenkins.php -- To view, visit https://gerrit.wikimedia.org/r/81209 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6b36610b47797cdab8af0ffbec9c06fe4f61605b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add test for null precision - change (mediawiki...DataValues)
Addshore has uploaded a new change for review. https://gerrit.wikimedia.org/r/81210 Change subject: Add test for null precision .. Add test for null precision Change-Id: I2ae5d7d0cf829a369a57fe67e8bff1278a4bcc4e --- M DataValues/tests/phpunit/GlobeCoordinateValueTest.php 1 file changed, 11 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/10/81210/1 diff --git a/DataValues/tests/phpunit/GlobeCoordinateValueTest.php b/DataValues/tests/phpunit/GlobeCoordinateValueTest.php index c6d224e..8d8c2cd 100644 --- a/DataValues/tests/phpunit/GlobeCoordinateValueTest.php +++ b/DataValues/tests/phpunit/GlobeCoordinateValueTest.php @@ -165,6 +165,17 @@ $geoCoordinate = unserialize( 'C:29:DataValues\GeoCoordinateValue:27:{[-4.2,-42,9001,0.01,mars]}' ); $this-assertInstanceOf( $this-getClass(), $geoCoordinate ); + + $geoCoordinate = unserialize( 'C:29:DataValues\GeoCoordinateValue:27:{[-4.2,-42,null,null,mars]}' ); + $this-assertInstanceOf( $this-getClass(), $geoCoordinate ); + + $this-assertEquals( -4.2, $geoCoordinate-getLatitude() ); + $this-assertEquals( -42, $geoCoordinate-getLongitude() ); + $this-assertEquals( null, $geoCoordinate-getPrecision() ); + $this-assertEquals( 'mars', $geoCoordinate-getGlobe() ); + + $geoCoordinate = unserialize( 'C:29:DataValues\GeoCoordinateValue:27:{[-4.2,-42,9001,null,mars]}' ); + $this-assertInstanceOf( $this-getClass(), $geoCoordinate ); } } -- To view, visit https://gerrit.wikimedia.org/r/81210 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ae5d7d0cf829a369a57fe67e8bff1278a4bcc4e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Addshore addshorew...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikipedia.com.il - wikipedia.co.il - change (operations/dns)
Faidon has uploaded a new change for review. https://gerrit.wikimedia.org/r/81211 Change subject: wikipedia.com.il - wikipedia.co.il .. wikipedia.com.il - wikipedia.co.il The former doesn't exist, while the latter exists, has Wikimedia Foundation, Inc. as the owner and our nameservers as NS. Calling it a typo and fixing it. Change-Id: I7b9219db85641eeecee53c0c617caabc361ffdf4 --- R templates/wikipedia.co.il 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dns refs/changes/11/81211/1 diff --git a/templates/wikipedia.com.il b/templates/wikipedia.co.il similarity index 100% rename from templates/wikipedia.com.il rename to templates/wikipedia.co.il -- To view, visit https://gerrit.wikimedia.org/r/81211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7b9219db85641eeecee53c0c617caabc361ffdf4 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon fai...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] wikipedia.com.il - wikipedia.co.il - change (operations/dns)
Faidon has submitted this change and it was merged. Change subject: wikipedia.com.il - wikipedia.co.il .. wikipedia.com.il - wikipedia.co.il The former doesn't exist, while the latter exists, has Wikimedia Foundation, Inc. as the owner and our nameservers as NS. Calling it a typo and fixing it. Change-Id: I7b9219db85641eeecee53c0c617caabc361ffdf4 --- R templates/wikipedia.co.il 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/templates/wikipedia.com.il b/templates/wikipedia.co.il similarity index 100% rename from templates/wikipedia.com.il rename to templates/wikipedia.co.il -- To view, visit https://gerrit.wikimedia.org/r/81211 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7b9219db85641eeecee53c0c617caabc361ffdf4 Gerrit-PatchSet: 1 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ã…land, Guernsey, Isle of Man and Jersey to esams - change (operations/dns)
Faidon has submitted this change and it was merged. Change subject: Ã…land, Guernsey, Isle of Man and Jersey to esams .. Ã…land, Guernsey, Isle of Man and Jersey to esams These are all in the European region. Split from Finland and the United Kingdom. Source: ISO-3166-2 Newsletter V-9 Newsletter V-11. Change-Id: I28a7c74503a83feb8e563041ef383bf71212b68d --- M config-geo 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Faidon: Looks good to me, approved jenkins-bot: Verified diff --git a/config-geo b/config-geo index d35291a..9bfbe86 100644 --- a/config-geo +++ b/config-geo @@ -29,6 +29,7 @@ AD = esams, # Andorra AL = esams, # Albania AT = esams, # Austria + AX = esams, # Ã…land Islands BA = esams, # Bosnia and Herzegowina BE = esams, # Belgium BG = esams, # Bulgaria @@ -44,13 +45,16 @@ FO = esams, # Faroe Islands FR = esams, # France GB = esams, # United Kingdom + GG = esams, # Guernsey GI = esams, # Gibraltar GR = esams, # Greece HR = esams, # Croatia (local name Hrvatska) HU = esams, # Hungary IE = esams, # Ireland + IM = esams, # Isle of Man IS = esams, # Iceland IT = esams, # Italy + JE = esams, # Jersey LI = esams, # Liechtenstein LT = esams, # Lithuania LU = esams, # Luxembourg -- To view, visit https://gerrit.wikimedia.org/r/80970 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I28a7c74503a83feb8e563041ef383bf71212b68d Gerrit-PatchSet: 2 Gerrit-Project: operations/dns Gerrit-Branch: master Gerrit-Owner: Faidon fai...@wikimedia.org Gerrit-Reviewer: Faidon fai...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update DataValues, fix handling of precision and non-earth c... - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update DataValues, fix handling of precision and non-earth coordinates .. Update DataValues, fix handling of precision and non-earth coordinates Change-Id: I214bb354660098b776bc7d18414f22d611f16942 --- M extensions/DataValues 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/DataValues b/extensions/DataValues index acf7c41..3083677 16 --- a/extensions/DataValues +++ b/extensions/DataValues -Subproject commit acf7c4132d66f6ce814a0dc4e6061fc9091ff253 +Subproject commit 308367705aebcb1cc68e82e8a83bc758d7726ce6 -- To view, visit https://gerrit.wikimedia.org/r/81198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I214bb354660098b776bc7d18414f22d611f16942 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf14 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: Reedy re...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Detect outdated pending post KeyPress handler - change (mediawiki...VisualEditor)
Divec has uploaded a new change for review. https://gerrit.wikimedia.org/r/81213 Change subject: Detect outdated pending post KeyPress handler .. Detect outdated pending post KeyPress handler modules/ve/ce/ve.ce.Surface.js * KeyPress handler: save id for the post-event setTimeout * KeyDown handler: cancel the poller and poll immediately if pending. Bug: 53079 Change-Id: If139ff3230c10caa616743f71659c4606d290310 --- M modules/ve/ce/ve.ce.Surface.js 1 file changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/13/81213/1 diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js index cbc5ba1..ffa25f6 100644 --- a/modules/ve/ce/ve.ce.Surface.js +++ b/modules/ve/ce/ve.ce.Surface.js @@ -33,6 +33,7 @@ this.documentView = new ve.ce.Document( model.getDocument(), this ); this.surfaceObserver = new ve.ce.SurfaceObserver( this.documentView ); this.selectionTimeout = null; + this.keyPressTimeout = null; this.$document = $( this.getElementDocument() ); this.clipboard = {}; this.renderingEnabled = true; @@ -450,6 +451,13 @@ */ ve.ce.Surface.prototype.onDocumentKeyDown = function ( e ) { var trigger; + if ( this.keyPressTimeout !== null ) { + // Cancel the pending poll, and do a synchronous one instead + clearTimeout( this.keyPressTimeout ); + this.keyPressTimeout = null; + ve.log( 'keydown clash ' + document.getElementsByClassName( 've-ce-documentNode' )[0].innerHTML.substring(0, 100) ); + this.surfaceObserver.start( false, true ); + } // Ignore keydowns while in IME mode but do not preventDefault them (so text actually appear on // the screen). @@ -514,6 +522,11 @@ ve.ce.Surface.prototype.onDocumentKeyPress = function ( e ) { var selection, prevNode, documentModel = this.model.getDocument(); + // I *think* there's no need to check for a pending keyPressTimeout here, because it + // will have already been cancelled by the onDocumentKeyDown. This assumes that there's + // no way we can ever get two consecutive KeyPress events without an intervening + // KeyDown event. Perhaps some IME/browser combination will violate this :-/ + // Prevent IE from editing Aliens/Entities // TODO: Better comment about what's going on here is needed. if ( $.browser.msie === true ) { @@ -539,7 +552,8 @@ } this.handleInsertion(); - setTimeout( ve.bind( function () { + this.keyPressTimeout = setTimeout( ve.bind( function () { + this.keyPressTimeout = null; this.surfaceObserver.start( false, true ); }, this ) ); }; -- To view, visit https://gerrit.wikimedia.org/r/81213 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If139ff3230c10caa616743f71659c4606d290310 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Divec da...@sheetmusic.org.uk ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use original DV type when serializing bad values. - change (mediawiki...WikibaseDataModel)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/81214 Change subject: Use original DV type when serializing bad values. .. Use original DV type when serializing bad values. UnDeserializableValue is used to represent values that could not be unserialized. When re-serializing them, we should restore the original type and data as it were, instead of saving bad as the type. Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb --- M DataModel/Snak/PropertyValueSnak.php M tests/phpunit/Snak/PropertyValueSnakTest.php 2 files changed, 35 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel refs/changes/14/81214/1 diff --git a/DataModel/Snak/PropertyValueSnak.php b/DataModel/Snak/PropertyValueSnak.php index c45f37a..c7f0f94 100644 --- a/DataModel/Snak/PropertyValueSnak.php +++ b/DataModel/Snak/PropertyValueSnak.php @@ -88,7 +88,15 @@ public function toArray() { $data = parent::toArray(); - $data[] = $this-dataValue-getType(); + // Would be nice to have a generic way to do this, e.g. by using toArray() + // instead of getArrayValue() and getType(). + if ( $this-dataValue instanceof UnDeserializableValue ) { + $type = $this-dataValue-getTargetType(); + } else { + $type = $this-dataValue-getType(); + } + + $data[] = $type; $data[] = $this-dataValue-getArrayValue(); return $data; diff --git a/tests/phpunit/Snak/PropertyValueSnakTest.php b/tests/phpunit/Snak/PropertyValueSnakTest.php index 69dc6f0..61afcb8 100644 --- a/tests/phpunit/Snak/PropertyValueSnakTest.php +++ b/tests/phpunit/Snak/PropertyValueSnakTest.php @@ -3,6 +3,9 @@ namespace Wikibase\Test; use DataValues\StringValue; +use DataValues\UnDeserializableValue; +use Wikibase\EntityId; +use Wikibase\Property; use Wikibase\PropertyValueSnak; /** @@ -73,4 +76,27 @@ return $argLists; } + /** +* @dataProvider toArrayProvider +*/ + public function testToArray( PropertyValueSnak $snak, array $expected ) { + $actual = $snak-toArray(); + + $this-assertEquals( $expected, $actual ); + } + + public static function toArrayProvider() { + $q1 = new EntityId( Property::ENTITY_TYPE, 1 ); + + return array( + 'string-value' = array( + new PropertyValueSnak( $q1, new StringValue( 'boo' ) ), + array( 'value', $q1-getNumericId(), 'string', 'boo' ) + ), + 'bad-value' = array( + new PropertyValueSnak( $q1, new UnDeserializableValue( 77, 'string', 'not a string' ) ), + array( 'value', $q1-getNumericId(), 'string', 77 ) + ), + ); + } } -- To view, visit https://gerrit.wikimedia.org/r/81214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Handle null as value for precision - change (mediawiki...DataValues)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/81215 Change subject: Handle null as value for precision .. Handle null as value for precision Change-Id: Ifbdc0b95cd6346a6996c6f94cfd4f4d921184a99 --- M DataValues/src/GlobeCoordinateValue.php M DataValues/tests/phpunit/GlobeCoordinateValueTest.php 2 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues refs/changes/15/81215/1 diff --git a/DataValues/src/GlobeCoordinateValue.php b/DataValues/src/GlobeCoordinateValue.php index cb03d47..70a6b80 100644 --- a/DataValues/src/GlobeCoordinateValue.php +++ b/DataValues/src/GlobeCoordinateValue.php @@ -56,6 +56,11 @@ * @throws IllegalValueException */ public function __construct( LatLongValue $latLang, $precision, $globe = self::GLOBE_EARTH ) { + if ( $precision === null ) { + // Providing null as precision is deprecated. + $precision = 1; + } + $this-assertIsPrecision( $precision ); $this-assertIsGlobe( $globe ); diff --git a/DataValues/tests/phpunit/GlobeCoordinateValueTest.php b/DataValues/tests/phpunit/GlobeCoordinateValueTest.php index c6d224e..4a2f0e1 100644 --- a/DataValues/tests/phpunit/GlobeCoordinateValueTest.php +++ b/DataValues/tests/phpunit/GlobeCoordinateValueTest.php @@ -49,13 +49,14 @@ $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, Schar's World ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 1, 'coruscant' ); + $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null, GlobeCoordinateValue::GLOBE_EARTH ); + return $argLists; } public function invalidConstructorArgumentsProvider() { $argLists = array(); - $argLists[] = array( new LatLongValue( 4.2, 4.2 ), null ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), 'foo' ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), true ); $argLists[] = array( new LatLongValue( 4.2, 4.2 ), array( 1 ) ); @@ -103,7 +104,9 @@ $actual = $geoCoord-getPrecision(); $this-assertTrue( is_float( $actual ) || is_int( $actual ), 'Precision is int or float' ); - $this-assertEquals( $arguments[1], $actual ); + + $expected = $arguments[1] === null ? 1 : $arguments[1]; + $this-assertEquals( $expected, $actual ); } /** @@ -165,6 +168,10 @@ $geoCoordinate = unserialize( 'C:29:DataValues\GeoCoordinateValue:27:{[-4.2,-42,9001,0.01,mars]}' ); $this-assertInstanceOf( $this-getClass(), $geoCoordinate ); + + $geoCoordinate = unserialize( 'C:29:DataValues\GeoCoordinateValue:27:{[-4.2,-42,null,null,mars]}' ); + $this-assertInstanceOf( $this-getClass(), $geoCoordinate ); + $this-assertEquals( 1, $geoCoordinate-getPrecision() ); } } -- To view, visit https://gerrit.wikimedia.org/r/81215 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifbdc0b95cd6346a6996c6f94cfd4f4d921184a99 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DataValues Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add gitignore and remove unsupported browsers - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Add gitignore and remove unsupported browsers .. Add gitignore and remove unsupported browsers Change-Id: Ic415bcee0cfa8822a48396a2c1b086dbff200c2a --- A tests/browser/.gitignore M tests/browser/config/config.yml 2 files changed, 2 insertions(+), 10 deletions(-) Approvals: Zfilipin: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/.gitignore b/tests/browser/.gitignore new file mode 100644 index 000..9fc7a0c --- /dev/null +++ b/tests/browser/.gitignore @@ -0,0 +1 @@ +config/secret.yml diff --git a/tests/browser/config/config.yml b/tests/browser/config/config.yml index 17db808..9e8902d 100644 --- a/tests/browser/config/config.yml +++ b/tests/browser/config/config.yml @@ -10,16 +10,7 @@ platform: Linux version: 23 -internet_explorer_6: - name: internet_explorer - platform: Windows XP - version: 6 - -internet_explorer_7: - name: internet_explorer - platform: Windows XP - version: 7 - +# IE 8 not supported, IE8 has some issues internet_explorer_8: name: internet_explorer platform: Windows XP -- To view, visit https://gerrit.wikimedia.org/r/81205 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic415bcee0cfa8822a48396a2c1b086dbff200c2a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update TuladhaJejeg font for Javanese to 2.0.1 version - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Update TuladhaJejeg font for Javanese to 2.0.1 version .. Update TuladhaJejeg font for Javanese to 2.0.1 version Change-Id: Id7690d8efdb8eaec0d06cb1b8c0106c742a8e126 --- M data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot M data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf M data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff M data/fontrepo/fonts/TuladhaJejeg/font.ini 4 files changed, 1 insertion(+), 1 deletion(-) Approvals: KartikMistry: Looks good to me, but someone else must approve Bennylin: Looks good to me, but someone else must approve Nikerabbit: Looks good to me, approved jenkins-bot: Verified diff --git a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot index 33d11ba..1e6395f 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot +++ b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.eot Binary files differ diff --git a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf index 3246f64..a19a795 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf +++ b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.ttf Binary files differ diff --git a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff index caf9620..13d1e34 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff +++ b/data/fontrepo/fonts/TuladhaJejeg/TuladhaJejeg_gr.woff Binary files differ diff --git a/data/fontrepo/fonts/TuladhaJejeg/font.ini b/data/fontrepo/fonts/TuladhaJejeg/font.ini index 6eca58a..94876fa 100644 --- a/data/fontrepo/fonts/TuladhaJejeg/font.ini +++ b/data/fontrepo/fonts/TuladhaJejeg/font.ini @@ -1,6 +1,6 @@ [Tuladha Jejeg] languages=jv,jv-java* -version=1.92 +version=2.0.1 license=OFL 1.1 licensefile=OFL.txt url=https://sites.google.com/site/jawaunicode/ -- To view, visit https://gerrit.wikimedia.org/r/81194 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id7690d8efdb8eaec0d06cb1b8c0106c742a8e126 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector Gerrit-Branch: master Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il Gerrit-Reviewer: Bennylin bennylin.idw...@hotmail.com Gerrit-Reviewer: KartikMistry kartik.mis...@gmail.com Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert Simplify the cancel logic for input and display sett... - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Revert Simplify the cancel logic for input and display settings .. Revert Simplify the cancel logic for input and display settings This reverts commit a5d79594a35bc5ff9e04bead8707890e53b5d932. Causes new integration tests to fail. Change-Id: I7e14d73d0d726a3253e8c6e6bdf5066230d8454c --- M resources/js/ext.uls.displaysettings.js M resources/js/ext.uls.inputsettings.js M resources/js/ext.uls.languagesettings.js 3 files changed, 48 insertions(+), 11 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/resources/js/ext.uls.displaysettings.js b/resources/js/ext.uls.displaysettings.js index b368044..26deb53 100644 --- a/resources/js/ext.uls.displaysettings.js +++ b/resources/js/ext.uls.displaysettings.js @@ -113,11 +113,9 @@ this.$parent.$settingsPanel.empty(); this.$webfonts = $( 'body' ).data( 'webfonts' ); this.$parent.$settingsPanel.append( this.$template ); - this.disableApplyButton(); this.prepareLanguages(); this.prepareUIFonts(); this.prepareContentFonts(); - $.i18n().locale = this.uiLanguage; this.i18n(); this.$webfonts.refresh(); this.listen(); @@ -622,14 +620,48 @@ * Cancel the changes done by user for display settings */ cancel: function () { - if ( !this.dirty ) { + var displaySettings = this, + origUILanguage = this.getUILanguage(); + + if ( !displaySettings.dirty ) { + // Nothing changed return; } + // Reload preferences - mw.webfonts.preferences = $.extend( true, {}, this.savedRegistry ); + mw.webfonts.preferences = $.extend( true, {}, displaySettings.savedRegistry ); + if ( displaySettings.$webfonts ) { + displaySettings.$webfonts.refresh(); + } + + if ( $.i18n().locale !== origUILanguage ) { + // restore UI localization for display settings panel + $.i18n().locale = origUILanguage; + this.i18n(); + } + + // Clear the dirty bit + displaySettings.dirty = false; + displaySettings.disableApplyButton(); + // Restore content and UI language - this.uiLanguage = this.getUILanguage(); - this.contentLanguage = this.getContentLanguage(); + displaySettings.uiLanguage = displaySettings.getUILanguage(); + displaySettings.contentLanguage = displaySettings.getContentLanguage(); + + // Restore the font dropdowns + displaySettings.prepareUIFonts(); + displaySettings.prepareContentFonts(); + + // Restore the visual state of selected language button + displaySettings.$template.find( 'div.uls-ui-languages button.button' ).each( function () { + var $button = $( this ); + + if ( $button.attr( 'lang' ) === displaySettings.uiLanguage ) { + $button.addClass( 'down' ); + } else { + $button.removeClass( 'down' ); + } + } ); } }; diff --git a/resources/js/ext.uls.inputsettings.js b/resources/js/ext.uls.inputsettings.js index 81bafbc..5afedae 100644 --- a/resources/js/ext.uls.inputsettings.js +++ b/resources/js/ext.uls.inputsettings.js @@ -75,6 +75,7 @@ this.contentLanguage = this.getContentLanguage(); this.$imes = null; this.$parent = $parent; + this.dirty = false; this.savedRegistry = $.extend( true, {}, $.ime.preferences.registry ); } @@ -87,10 +88,11 @@ */ render: function () { var $enabledOnly; - this.dirty = false; + this.$parent.$settingsPanel.empty(); this.$imes = $( 'body' ).data( 'ime' ); this.$parent.$settingsPanel.append( this.$template ); + $enabledOnly =
[MediaWiki-commits] [Gerrit] Update @covers tag - change (mediawiki...Serialization)
Jeroen De Dauw has uploaded a new change for review. https://gerrit.wikimedia.org/r/81217 Change subject: Update @covers tag .. Update @covers tag Change-Id: Ib5283b912aa6c8b56d6a12bc25dd161898ebbc2c --- M test/Serializers/Tests/Phpunit/Exceptions/UnsupportedObjectExceptionTest.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Serialization refs/changes/17/81217/1 diff --git a/test/Serializers/Tests/Phpunit/Exceptions/UnsupportedObjectExceptionTest.php b/test/Serializers/Tests/Phpunit/Exceptions/UnsupportedObjectExceptionTest.php index 9ff0451..c545a56 100644 --- a/test/Serializers/Tests/Phpunit/Exceptions/UnsupportedObjectExceptionTest.php +++ b/test/Serializers/Tests/Phpunit/Exceptions/UnsupportedObjectExceptionTest.php @@ -6,6 +6,7 @@ /** * @covers Serializers\Exceptions\UnsupportedObjectException + * @covers Serializers\Exceptions\SerializationException * * @file * @since 1.0 -- To view, visit https://gerrit.wikimedia.org/r/81217 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib5283b912aa6c8b56d6a12bc25dd161898ebbc2c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Serialization Gerrit-Branch: master Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Rebuild MessagesEn.php - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Rebuild MessagesEn.php .. Rebuild MessagesEn.php Change-Id: Icf903bcf0027f08fcf06214a5fbfcc4fdfc5d0b6 --- M languages/messages/MessagesEn.php M maintenance/language/messages.inc 2 files changed, 22 insertions(+), 22 deletions(-) Approvals: Matmarex: Looks good to me, approved jenkins-bot: Verified diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 79ba128..e31020c 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2630,10 +2630,10 @@ 'randompage-url' = 'Special:Random', # do not translate or duplicate this message to other languages # Random page in category -'randomincategory' = 'Random page in category', -'randomincategory-invalidcategory' = '$1 is not a valid category name.', -'randomincategory-nopages' = 'There are no pages in the [[:Category:$1|$1]] category.', -'randomincategory-selectcategory' = 'Get random page from category: $1 $2.', +'randomincategory' = 'Random page in category', +'randomincategory-invalidcategory' = '$1 is not a valid category name.', +'randomincategory-nopages' = 'There are no pages in the [[:Category:$1|$1]] category.', +'randomincategory-selectcategory'= 'Get random page from category: $1 $2.', 'randomincategory-selectcategory-submit' = 'Go', # Random redirect @@ -5121,22 +5121,22 @@ 'rotate-comment' = 'Image rotated by $1 {{PLURAL:$1|degree|degrees}} clockwise', # Limit report -'limitreport-title' = 'Parser profiling data:', -'limitreport-cputime' = 'CPU time usage', -'limitreport-cputime-value' = '$1 {{PLURAL:$1|second|seconds}}', -'limitreport-walltime' = 'Real time usage', -'limitreport-walltime-value' = '$1 {{PLURAL:$1|second|seconds}}', -'limitreport-ppvisitednodes' = 'Preprocessor visited node count', -'limitreport-ppvisitednodes-value' = '$1/$2', -'limitreport-ppgeneratednodes' = 'Preprocessor generated node count', -'limitreport-ppgeneratednodes-value' = '$1/$2', -'limitreport-postexpandincludesize' = 'Post-expand include size', -'limitreport-postexpandincludesize-value' = '$1/$2 bytes', -'limitreport-templateargumentsize' = 'Template argument size', -'limitreport-templateargumentsize-value' = '$1/$2 bytes', -'limitreport-expansiondepth' = 'Highest expansion depth', -'limitreport-expansiondepth-value' = '$1/$2', -'limitreport-expensivefunctioncount' = 'Expensive parser function count', -'limitreport-expensivefunctioncount-value' = '$1/$2', +'limitreport-title'= 'Parser profiling data:', +'limitreport-cputime' = 'CPU time usage', +'limitreport-cputime-value'= '$1 {{PLURAL:$1|second|seconds}}', +'limitreport-walltime' = 'Real time usage', +'limitreport-walltime-value' = '$1 {{PLURAL:$1|second|seconds}}', +'limitreport-ppvisitednodes' = 'Preprocessor visited node count', +'limitreport-ppvisitednodes-value' = '$1/$2', # only translate this message to other languages if you have to change it +'limitreport-ppgeneratednodes' = 'Preprocessor generated node count', +'limitreport-ppgeneratednodes-value' = '$1/$2', # only translate this message to other languages if you have to change it +'limitreport-postexpandincludesize'= 'Post-expand include size', +'limitreport-postexpandincludesize-value' = '$1/$2 bytes', +'limitreport-templateargumentsize' = 'Template argument size', +'limitreport-templateargumentsize-value' = '$1/$2 bytes', +'limitreport-expansiondepth' = 'Highest expansion depth', +'limitreport-expansiondepth-value' = '$1/$2', # only translate this message to other languages if you have to change it +'limitreport-expensivefunctioncount' = 'Expensive parser function count', +'limitreport-expensivefunctioncount-value' = '$1/$2', # only translate this message to other languages if you have to change it ); diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index a81df71..b9b8544 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -4057,7 +4057,7 @@ 'listredirects' = 'List redirects', 'unusedtemplates' = 'Unused templates', 'randompage' = 'Random page', - 'randomincategory'= 'Special:RandomInCategory', + 'randomincategory'= 'Random page in category', 'randomredirect' = 'Random redirect', 'statistics' = 'Statistics', 'disambiguations' = '', -- To view, visit https://gerrit.wikimedia.org/r/80409 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Icf903bcf0027f08fcf06214a5fbfcc4fdfc5d0b6 Gerrit-PatchSet: 2 Gerrit-Project:
[MediaWiki-commits] [Gerrit] Created extension Jenkins job template - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/81218 Change subject: Created extension Jenkins job template .. Created extension Jenkins job template The template is used to run CirrusSearch[1], MobileFrontend[2] and UniversalLanguageSelector[3] jobs. Change-Id: Idb7c33c7d99318feb934c9645a2edf660a0dc9cc 1: https://wmf.ci.cloudbees.com/view/r-cs/ 2: https://wmf.ci.cloudbees.com/view/r-mf/ 3: https://wmf.ci.cloudbees.com/view/r-uls/ --- A docs/template-extension.md M docs/template.md A docs/view.md 3 files changed, 317 insertions(+), 58 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/18/81218/1 diff --git a/docs/template-extension.md b/docs/template-extension.md new file mode 100644 index 000..6eca26e --- /dev/null +++ b/docs/template-extension.md @@ -0,0 +1,245 @@ +# Template + +## Setup + +- Jenkins Templates New Template (name) Job Template OK Save +- Display Name: (name) +- Description: (description) +- Instantiable?: check +- Attribute + +## Name + +- ID: name +- Display Name: Name +- Type: Text-field + +## Browser Label + +- ID: BROWSER_LABEL +- Display Name: Browser Label +- Type: Select a string among many +- UI Mode: Dropdown list (no inline help, but more compact UI) +- Options + - Display Name: (name) + - Value: (name) +- chrome +- firefox +- internet_explorer_6 +- internet_explorer_7 +- internet_explorer_8 +- internet_explorer_9 +- internet_explorer_10 + +## bundle exec + +- ID: BUNDLE_EXEC +- Display Name: bundle exec +- Type: Text-field + +## Recipients + +- ID: RECIPIENTS +- Display Name: Recipients +- Type: Text-field + +## Repository URL + +- ID: REPOSITORY_URL +- Display Name: Repository URL +- Type: Select a string among many +- UI Mode: Dropdown list (no inline help, but more compact UI) +- Options + + - Display Name: CirrusSearch@gerrit + - Value: https://gerrit.wikimedia.org/r/mediawiki/extensions/CirrusSearch + + - Display Name: MobileFrontend@cloudbees + - Value: git://git.cloudbees.com/wmf/MobileFrontend.git + + - Display Name: MobileFrontend@gerrit + - Value: https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend + + - Display Name: UniversalLanguageSelector@gerrit + - Value: https://gerrit.wikimedia.org/r/mediawiki/extensions/UniversalLanguageSelector + +## Branch + +- ID: BRANCH +- Display Name: Branch +- Type: Select a string among many +- UI Mode: Dropdown list (no inline help, but more compact UI) +- Options + - Display Name: (name) + - Value: (name) + + - name: +- debug +- master + +## MediaWiki URL + +- ID: MEDIAWIKI_URL +- Display Name: MediaWiki URL +- Type: Select a string among many +- UI Mode: Dropdown list (no inline help, but more compact UI) +- Options + - Display Name: (name) + - Value: (name) + + - name: +- commons.wikimedia.beta.wmflabs.org +- en.m.wikipedia.beta.wmflabs.org +- en.m.wikipedia.org +- en.wikipedia.beta.wmflabs.org +- en.wikipedia.org +- sandbox.translatewiki.net +- test2.wikipedia.org + +## Folder + +- ID: FOLDER +- Display Name: Folder +- Type: Select a string among many +- UI Mode: Dropdown list (no inline help, but more compact UI) +- Options + - Display Name: (name) + - Value: (name) + + - name: +- tests/acceptance/ +- tests/browser/ + +## Jelly-based transformation + +- Property + - Transformer: Jelly-based transformation + - Script, from (site)/job/(job)/config.xml + +-- + +?xml version='1.0' encoding='UTF-8'? +project + actions/ + description/description + logRotator +daysToKeep60/daysToKeep +numToKeep-1/numToKeep +artifactDaysToKeep-1/artifactDaysToKeep +artifactNumToKeep20/artifactNumToKeep + /logRotator + keepDependenciesfalse/keepDependencies + properties +nectar.plugins.rbac.groups.JobProxyGroupContainer + groups/ +/nectar.plugins.rbac.groups.JobProxyGroupContainer +com.cloudbees.jenkins.plugins.PublicKey/ +com.cloudbees.plugins.deployer.DeployNowJobProperty + oneClickDeployfalse/oneClickDeploy + configuration +user(jenkins)/user +accountwmf/account +deployables/ + /configuration +/com.cloudbees.plugins.deployer.DeployNowJobProperty + /properties + scm class=hudson.plugins.git.GitSCM +configVersion2/configVersion +userRemoteConfigs + hudson.plugins.git.UserRemoteConfig +name/name +refspec/refspec +url${REPOSITORY_URL}/url + /hudson.plugins.git.UserRemoteConfig +/userRemoteConfigs +branches + hudson.plugins.git.BranchSpec +name${BRANCH}/name + /hudson.plugins.git.BranchSpec +/branches +disableSubmodulesfalse/disableSubmodules +
[MediaWiki-commits] [Gerrit] Support to add a reference with multiple claims. - change (pywikibot/core)
FelixReimann has uploaded a new change for review. https://gerrit.wikimedia.org/r/81219 Change subject: Support to add a reference with multiple claims. .. Support to add a reference with multiple claims. site.editSource() accepts now either a single claim (=backward-compatible) for a single claim reference or a list of claims for a multi claim reference page.addSources() is new and takes a list of claims in contrast to page.addSource() Change-Id: Iac583043531ba3f30985244ffad2aef2ad549f51 --- M pywikibot/page.py M pywikibot/site.py 2 files changed, 43 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/19/81219/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 8816da2..16f32a0 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2815,7 +2815,7 @@ def getSources(self): -Returns a list of Claims +Returns a list of sources. Each source is a list of Claims. return self.sources @@ -2827,7 +2827,18 @@ data = self.repo.editSource(self, source, new=True, **kwargs) source.hash = data['reference']['hash'] self.on_item.lastrevid = data['pageinfo']['lastrevid'] -self.sources.append(source) +self.sources.append([source]) + +def addSources(self, sources, **kwargs): + +sources are a list of Claims. +adds them as one reference. + +data = self.repo.editSource(self, sources, new=True, **kwargs) +for source in sources: + source.hash = data['reference']['hash'] + self.on_item.lastrevid = data['pageinfo']['lastrevid'] +self.sources.append(sources) def _formatDataValue(self): diff --git a/pywikibot/site.py b/pywikibot/site.py index 4e5dfaf..2e86a9f 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3538,22 +3538,37 @@ if not new and hasattr(source, 'hash'): params['reference'] = source.hash #build up the snak -if source.getType() == 'wikibase-item': -datavalue = {'type': 'wikibase-entityid', - 'value': source._formatDataValue(), - } -elif source.getType() == 'string': -datavalue = {'type': 'string', - 'value': source._formatDataValue(), - } +if isinstance(source, list): + sources = source else: -raise NotImplementedError('%s datatype is not supported yet.' % claim.getType()) -snak = {source.getID(): [{'snaktype': 'value', - 'property': source.getID(), - 'datavalue': datavalue, - }, - ], -} + sources = [ source] + +snak = {} +for src in sources: + if src.getType() == 'wikibase-item': + datavalue = {'type': 'wikibase-entityid', + 'value': src._formatDataValue(), + } + elif src.getType() == 'string': + datavalue = {'type': 'string', + 'value': src._formatDataValue(), + } + elif src.getType() == 'time': + datavalue = {'type': 'time', + 'value': src._formatDataValue(), + } + else: + raise NotImplementedError('%s datatype is not supported yet.' % src.getType()) + valuesnaks = [] + if src.getID() in snak: +valuesnaks = snak[src.getID()] + valuesnaks.append({'snaktype': 'value', + 'property': src.getID(), + 'datavalue': datavalue, + }, +) + + snak[src.getID()] = valuesnaks params['snaks'] = json.dumps(snak) for arg in kwargs: if arg in ['bot', 'lastrevid']: -- To view, visit https://gerrit.wikimedia.org/r/81219 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac583043531ba3f30985244ffad2aef2ad549f51 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: FelixReimann fe...@fex-it.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] lines longer than 79 will warn (no error) - change (mediawiki...codesniffer)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81220 Change subject: lines longer than 79 will warn (no error) .. lines longer than 79 will warn (no error) Generic.Files.LineLength sniff will now warn whenever a line is longer than 79 characters and error out on line longer than which would never be reached hopefully. The idea is to be able to ignore the line lenght in 'strict' Jenkins jobs. Change-Id: I19475a97beda04e4d27d7ce3ee33f4770be26bb4 --- M MediaWiki/ruleset.xml 1 file changed, 4 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer refs/changes/20/81220/1 diff --git a/MediaWiki/ruleset.xml b/MediaWiki/ruleset.xml index 81132bf..29bcb46 100644 --- a/MediaWiki/ruleset.xml +++ b/MediaWiki/ruleset.xml @@ -25,8 +25,10 @@ rule ref=Generic.Files.LineEndings / rule ref=Generic.Files.LineLength properties - property name=lineLimit value=100 / - property name=absoluteLineLimit value=120 / + !-- More than 79 will throw a warning ... -- + property name=lineLimit value=79 / + !-- ... but we will most probably never throw an error -- + property name=absoluteLineLimit value= / /properties /rule !-- rule ref=Generic.Files.OneClassPerFile / -- -- To view, visit https://gerrit.wikimedia.org/r/81220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I19475a97beda04e4d27d7ce3ee33f4770be26bb4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/codesniffer Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Factor out ChangeTags::tagUsageStatistics() from SpecialTags - change (mediawiki/core)
Matmarex has uploaded a new change for review. https://gerrit.wikimedia.org/r/81221 Change subject: Factor out ChangeTags::tagUsageStatistics() from SpecialTags .. Factor out ChangeTags::tagUsageStatistics() from SpecialTags It's prettier if we keep all explicit DB queries to those tables in one place. Change-Id: I85b6854e26ffc656b990079d463a085ba39556df --- M includes/ChangeTags.php M includes/specials/SpecialTags.php 2 files changed, 32 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/21/81221/1 diff --git a/includes/ChangeTags.php b/includes/ChangeTags.php index 71b6ea6..20366fd 100644 --- a/includes/ChangeTags.php +++ b/includes/ChangeTags.php @@ -291,4 +291,34 @@ $wgMemc-set( $key, $emptyTags, 300 ); return $emptyTags; } + + /** +* Returns a map of any tags used on the wiki to number of edits +* tagged with them, ordered descending by the hitcount. +* +* @return array Array of string = int +*/ + public static function tagUsageStatistics() { + $out = array(); + + $dbr = wfGetDB( DB_SLAVE ); + $res = $dbr-select( + 'change_tag', + array( 'ct_tag', 'hitcount' = 'count(*)' ), + array(), + __METHOD__, + array( 'GROUP BY' = 'ct_tag', 'ORDER BY' = 'hitcount DESC' ) + ); + + foreach ( $res as $row ) { + $out[$row-ct_tag] = $row-hitcount; + } + foreach ( self::listDefinedTags() as $tag ) { + if ( !isset( $out[$tag] ) ) { + $out[$tag] = 0; + } + } + + return $out; + } } diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index 6a282c9..80c38d5 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -46,28 +46,15 @@ Xml::tags( 'th', null, $this-msg( 'tags-description-header' )-parse() ) . Xml::tags( 'th', null, $this-msg( 'tags-hitcount-header' )-parse() ) ); - $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr-select( 'change_tag', array( 'ct_tag', 'hitcount' = 'count(*)' ), - array(), __METHOD__, array( 'GROUP BY' = 'ct_tag', 'ORDER BY' = 'hitcount DESC' ) ); - foreach ( $res as $row ) { - $html .= $this-doTagRow( $row-ct_tag, $row-hitcount ); - } - - foreach ( ChangeTags::listDefinedTags() as $tag ) { - $html .= $this-doTagRow( $tag, 0 ); + foreach ( ChangeTags::tagUsageStatistics() as $tag = $hitcount ) { + $html .= $this-doTagRow( $tag, $hitcount ); } $out-addHTML( Xml::tags( 'table', array( 'class' = 'wikitable sortable mw-tags-table' ), $html ) ); } function doTagRow( $tag, $hitcount ) { - static $doneTags = array(); - - if ( in_array( $tag, $doneTags ) ) { - return ''; - } - $user = $this-getUser(); $newRow = ''; $newRow .= Xml::tags( 'td', null, Xml::element( 'code', null, $tag ) ); @@ -93,8 +80,6 @@ $hitcountLink = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcountLabel, array(), array( 'tagfilter' = $tag ) ); // add raw $hitcount for sorting, because tags-hitcount contains numbers and letters $newRow .= Xml::tags( 'td', array( 'data-sort-value' = $hitcount ), $hitcountLink ); - - $doneTags[] = $tag; return Xml::tags( 'tr', null, $newRow ) . \n; } -- To view, visit https://gerrit.wikimedia.org/r/81221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85b6854e26ffc656b990079d463a085ba39556df Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Matmarex matma@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use redis instead of memcached for primary cache - change (mediawiki/vagrant)
Yuvipanda has uploaded a new change for review. https://gerrit.wikimedia.org/r/81222 Change subject: Use redis instead of memcached for primary cache .. Use redis instead of memcached for primary cache Caches will not be cold when vagrant is restarted. Plus with redis always at hand, perhaps people will think of using it for more things :) Also replaced custom redis module with the module from operations/puppet.git Change-Id: I4afc8b0016b11b0d044435d70c041802262913c8 --- M LocalSettings.php M puppet/manifests/roles.pp M puppet/modules/redis/manifests/init.pp M puppet/modules/redis/templates/redis.conf.erb 4 files changed, 626 insertions(+), 104 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/22/81222/1 diff --git a/LocalSettings.php b/LocalSettings.php index 60c4ae0..64d3a7c 100644 --- a/LocalSettings.php +++ b/LocalSettings.php @@ -44,8 +44,13 @@ $wgGroupPermissions['*']['createpage'] = false; // Caching -$wgMainCacheType = CACHE_MEMCACHED; -$wgMemCachedServers = array( '127.0.0.1:11211' ); +$wgObjectCaches['redis'] = array( +'class' = 'RedisBagOStuff', +'servers' = array( '127.0.0.1:6379' ), +'persistent' = true, +); +$wgMainCacheType = 'redis'; +$wgSessionCacheType = 'redis'; $wgLegacyJavaScriptGlobals = false; $wgEnableJavaScriptTest = true; diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp index eb0d1aa..25f627b 100644 --- a/puppet/manifests/roles.pp +++ b/puppet/manifests/roles.pp @@ -21,7 +21,7 @@ } # == Class: role::mediawiki -# Provisions a MediaWiki instance powered by PHP, MySQL, and memcached. +# Provisions a MediaWiki instance powered by PHP, MySQL, and redis. class role::mediawiki { include role::generic @@ -43,7 +43,12 @@ $admin_user = 'admin' $admin_pass = 'vagrant' -class { '::memcached': } +class { 'redis': +maxmemory = '128MB', +persist = 'aof' +} + +class { 'redis::php': } class { '::mysql': default_db_name = $db_name, @@ -162,17 +167,13 @@ } # == Class: role::gettingstarted -# Configures the GettingStarted extension and its dependencies: redis, -# EventLogging and GuidedTour. GettingStarted adds a special page which -# presents introductory content and tasks to newly-registered editors. +# Configures the GettingStarted extension and its dependencies: EventLogging +# and GuidedTour. GettingStarted adds a special page which presents +# introductory content and tasks to newly-registered editors. class role::gettingstarted { include role::mediawiki include role::eventlogging include role::guidedtour - -class { 'redis': -persist = true, -} @mediawiki::extension { 'GettingStarted': settings = { diff --git a/puppet/modules/redis/manifests/init.pp b/puppet/modules/redis/manifests/init.pp index ec2b8be..f538432 100644 --- a/puppet/modules/redis/manifests/init.pp +++ b/puppet/modules/redis/manifests/init.pp @@ -1,90 +1,47 @@ -# == Class: redis -# -# Redis is a fast in-memory key-value store, like memcached, but with -# support for rich data types. MediaWiki can use Redis as a back-end for -# the job queue. -# -# === Parameters -# -# [*max_memory*] -# This parameter specifies the maximum amount of memory Redis will be -# allowed to consume. Legal units include 'kb', 'mb', and 'gb'. If no -# unit is specified, the value is measured in bytes. Default: '16mb'. -# -# [*persist*] -# If true, redis will sync its contents to disk every 60 seconds, -# provided at least one key has changed. If you need more granular -# control, see the documentation for the 'settings' parameter below. -# Default: false. -# -# [*settings*] -# A hash-map of Redis config = value pairs. Empty by default. Its -# contents are merged onto the default settings map and the result is -# used to generate a redis.conf file. -# -# For a full listing of configuration options and their meaning, see -# https://raw.github.com/antirez/redis/2.6/redis.conf. -# -# === Examples -# -# If the configuration key contains a hyphen, use an underscore -# instead: -# -# class { 'redis': -#max_memory = '2mb', -#settings = { -# maxmemory_policy = 'volatile-lru', -# masterauth = 'secret', -#} -# } -# -class redis( -$max_memory = '16mb', -$persist= false, -$settings = {}, +# application server base class +class redis ( + $port = 6379, + $dir = /var/lib/redis, + $maxmemory = 1GB, + $maxmemory_policy = volatile-lru, + $maxmemory_samples = 5, + $persist = rdb, # [ rdb, aof, both ] + $redis_options = {}, + $rename_commands = {}, + $redis_replication = undef, + $package = redis-server, + $package_version = present, + $servicename = redis-server, + $password = false, + $auto_aof_rewrite_min_size = 512mb, ) { -include
[MediaWiki-commits] [Gerrit] Make ve.dm.Surface.{start, stop}HistoryTracking idempotent. - change (mediawiki...VisualEditor)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/81223 Change subject: Make ve.dm.Surface.{start,stop}HistoryTracking idempotent. .. Make ve.dm.Surface.{start,stop}HistoryTracking idempotent. Add a little robustness, guaranteeing that we don't end up with multiple history tracking tasks running, leaking one, or try to clear a non-running interval. Change-Id: I41db2d6fefc7f45f150aa14ecefc648760ad6200 --- M modules/ve/dm/ve.dm.Surface.js 1 file changed, 7 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/23/81223/1 diff --git a/modules/ve/dm/ve.dm.Surface.js b/modules/ve/dm/ve.dm.Surface.js index c8dfc1d..3d08154 100644 --- a/modules/ve/dm/ve.dm.Surface.js +++ b/modules/ve/dm/ve.dm.Surface.js @@ -101,7 +101,9 @@ if ( !this.enabled ) { return; } - this.historyTrackingInterval = setInterval( ve.bind( this.breakpoint, this ), 750 ); + if ( this.historyTrackingInterval === null) { + this.historyTrackingInterval = setInterval( ve.bind( this.breakpoint, this ), 750 ); + } }; /** @@ -113,7 +115,10 @@ if ( !this.enabled ) { return; } - clearInterval( this.historyTrackingInterval ); + if ( this.historyTrackingInterval !== null ) { + clearInterval( this.historyTrackingInterval ); + this.historyTrackingInterval = null; + } }; /** -- To view, visit https://gerrit.wikimedia.org/r/81223 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I41db2d6fefc7f45f150aa14ecefc648760ad6200 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add new scenarios for font changes - change (mediawiki...UniversalLanguageSelector)
jenkins-bot has submitted this change and it was merged. Change subject: Add new scenarios for font changes .. Add new scenarios for font changes There is currently some duplication between the various page objects and other code. Those should be cleaned up incrementally. Change-Id: I592829a00ca65bbecd5399b773c885c764c1cc06 --- A tests/browser/features/font_selection.feature A tests/browser/features/persistent_settings.feature M tests/browser/features/step_definitions/common_steps.rb A tests/browser/features/step_definitions/panel_steps.rb A tests/browser/features/support/pages/panel_page.rb A tests/browser/features/support/pages/reset_preferences.rb 6 files changed, 198 insertions(+), 0 deletions(-) Approvals: Amire80: Looks good to me, approved jenkins-bot: Verified diff --git a/tests/browser/features/font_selection.feature b/tests/browser/features/font_selection.feature new file mode 100644 index 000..8e3b122 --- /dev/null +++ b/tests/browser/features/font_selection.feature @@ -0,0 +1,38 @@ +@reset-preferences-after @login @en.wikipedia.beta.wmflabs.org @commons.wikimedia.beta.wmflabs.org +Feature: Font selection + +In order to have better using experience, +As a reader and writer, +I want to change or disable the fonts for interface and content. + +In addition the user is provided live preview feature: changes are applied +immediately when selection is made. Changes can either be applied or discared +for easy testing. + +Background: + Given I am logged in +And I set German as the interface language +And the content language is English +And I inspect current fonts + +Scenario: Discarding live preview of content font + When I open Fonts panel of language settings +And I select OpenDyslexic font for the content language for the live preview +And I close the panel to discard the changes + Then the active content font must be the same as font prior to the preview +# System is the default value for English and German +And the selected content font must be system + +Scenario: Discarding live preview of interface font + When I open Fonts panel of language settings +And I select OpenDyslexic font for the interface language for the live preview +And I close the panel to discard the changes + Then the active interface font must be the same as font prior to the preview +# System is the default value for English and German +And the selected interface font must be system + +Scenario: Applying the live preview of interface font + When I open Fonts panel of language settings +And I select OpenDyslexic font for the interface language for the live preview +And I apply the changes + Then the interface font must be changed to the OpenDyslexic font diff --git a/tests/browser/features/persistent_settings.feature b/tests/browser/features/persistent_settings.feature new file mode 100644 index 000..a75b372 --- /dev/null +++ b/tests/browser/features/persistent_settings.feature @@ -0,0 +1,14 @@ +@login @reset-preferences-after @en.wikipedia.beta.wmflabs.org @commons.wikimedia.beta.wmflabs.org +Feature: Persistent settings + + Background: +Given I am logged in + And I set German as the interface language + And the content language is English + + Scenario: Interface font sticks to another page +When I open Fonts panel of language settings + And I select OpenDyslexic font for the interface language for the live preview + And I apply the changes + And I visit a random page +Then the selected interface font must be OpenDyslexic diff --git a/tests/browser/features/step_definitions/common_steps.rb b/tests/browser/features/step_definitions/common_steps.rb index 7886fc6..5d9fe21 100644 --- a/tests/browser/features/step_definitions/common_steps.rb +++ b/tests/browser/features/step_definitions/common_steps.rb @@ -5,3 +5,31 @@ Given(/^I am logged in$/) do visit(LoginPage).login_with(@mediawiki_username, @mediawiki_password) end + +def language_to_code(language) + case language + when 'German' + 'de' + when 'English' + 'en' + else + pending + end +end + +def get_font(selector) + @browser.execute_script( return $( '#{selector}' ).css( 'font-family' ); ) +end + +def get_content_font() + get_font('#mw-content-text') +end + +def get_interface_font() + get_font('body') +end + +After('@reset-preferences-after') do |scenario| + visit(ResetPreferencesPage) + on(ResetPreferencesPage).submit_element.click +end diff --git a/tests/browser/features/step_definitions/panel_steps.rb b/tests/browser/features/step_definitions/panel_steps.rb new file mode 100644 index 000..e12371f --- /dev/null +++ b/tests/browser/features/step_definitions/panel_steps.rb @@ -0,0 +1,97 @@ +Given(/^I set (.*?) as the interface language$/) do |language| + code =
[MediaWiki-commits] [Gerrit] Avoid crash after ve.dm.Surface.purgeHistory(). - change (mediawiki...VisualEditor)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/81224 Change subject: Avoid crash after ve.dm.Surface.purgeHistory(). .. Avoid crash after ve.dm.Surface.purgeHistory(). The selection property is never null; it is initialized to Range(0,0). If it is set to null in purgeHistory(), the next call to ve.dm.Surface.change() will crash. Change-Id: Ia45c0ba26291e8ad09c445fdf2323710b5ab409f --- M modules/ve/dm/ve.dm.Surface.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor refs/changes/24/81224/1 diff --git a/modules/ve/dm/ve.dm.Surface.js b/modules/ve/dm/ve.dm.Surface.js index c8dfc1d..db27b5a 100644 --- a/modules/ve/dm/ve.dm.Surface.js +++ b/modules/ve/dm/ve.dm.Surface.js @@ -125,7 +125,7 @@ if ( !this.enabled ) { return; } - this.selection = null; + this.selection = new ve.Range( 0, 0 ); this.smallStack = []; this.bigStack = []; this.undoIndex = 0; -- To view, visit https://gerrit.wikimedia.org/r/81224 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia45c0ba26291e8ad09c445fdf2323710b5ab409f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/VisualEditor Gerrit-Branch: master Gerrit-Owner: Cscott canan...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Added validation to QueryEntityDeserializer - change (mediawiki...WikibaseQuery)
jenkins-bot has submitted this change and it was merged. Change subject: Added validation to QueryEntityDeserializer .. Added validation to QueryEntityDeserializer Change-Id: I169aab35421eff5278bfdc826b39eb6ce6e62ed0 --- M Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php M src/Wikibase/Query/QueryEntityDeserializer.php 2 files changed, 269 insertions(+), 16 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php index 1044646..70662e1 100644 --- a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php +++ b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php @@ -251,4 +251,204 @@ ); } + /** +* @dataProvider invalidIdProvider +*/ + public function testCannotDeserializeWithInvalidId( $invalidIdSerialization ) { + $serialization = $this-newQueryEntitySerialization(); + $serialization['entity'] = $invalidIdSerialization; + + $this-setExpectedException( 'Deserializers\Exceptions\DeserializationException' ); + $this-newQueryEntityDeserializer()-deserialize( $serialization ); + } + + public function invalidIdProvider() { + $argLists = array(); + + $argLists[] = array( + 'foo' + ); + + $argLists[] = array( + array() + ); + + $argLists[] = array( + array( 'item' ) + ); + + $argLists[] = array( + array( 'item', '42' ) + ); + + $argLists[] = array( + array( 42, 42 ) + ); + + $argLists[] = array( + array( 'item', 42, 'foo' ) + ); + + $argLists[] = array( + array( array(), false ) + ); + + return $argLists; + } + + /** +* @dataProvider invalidLabelsProvider +*/ + public function testCannotDeserializeWithInvalidLabels( $invalidLabelsSerialization ) { + $serialization = $this-newQueryEntitySerialization(); + $serialization['label'] = $invalidLabelsSerialization; + + $this-setExpectedException( 'Deserializers\Exceptions\DeserializationException' ); + $this-newQueryEntityDeserializer()-deserialize( $serialization ); + } + + public function invalidLabelsProvider() { + $argLists = array(); + + $argLists[] = array( + 'foo' + ); + + $argLists[] = array( + array( array() ) + ); + + $argLists[] = array( + array( 'de' = array( 'foo' ) ) + ); + + $argLists[] = array( + 42 = 'foo' + ); + + $argLists[] = array( + 'en' = 'foo', + 'bar' + ); + + $argLists[] = array( + 'en' = 'foo', + 'de' = false + ); + + return $argLists; + } + + /** +* @dataProvider invalidLabelsProvider +*/ + public function testCannotDeserializeWithInvalidDescriptions( $invalidDescriptionsSerialization ) { + $serialization = $this-newQueryEntitySerialization(); + $serialization['description'] = $invalidDescriptionsSerialization; + + $this-setExpectedException( 'Deserializers\Exceptions\DeserializationException' ); + $this-newQueryEntityDeserializer()-deserialize( $serialization ); + } + + /** +* @dataProvider invalidAliasesProvider +*/ + public function testCannotDeserializeWithInvalidAliases( $invalidAliasesSerialization ) { + $serialization = $this-newQueryEntitySerialization(); + $serialization['aliases'] = $invalidAliasesSerialization; + + $this-setExpectedException( 'Deserializers\Exceptions\DeserializationException' ); + $this-newQueryEntityDeserializer()-deserialize( $serialization ); + } + + public function invalidAliasesProvider() { + $argLists = array(); + + $argLists[] = array( + 'foo' + ); + + $argLists[] = array( + array( array() ) + ); + + $argLists[] = array( + array( 'de' = 'foo' ) + ); + + $argLists[] = array( + array(
[MediaWiki-commits] [Gerrit] use addSources in addSource per Merlijn - change (pywikibot/core)
FelixReimann has uploaded a new change for review. https://gerrit.wikimedia.org/r/81225 Change subject: use addSources in addSource per Merlijn .. use addSources in addSource per Merlijn removed time type for extra branch wper Merlijn Change-Id: I263ead65f241db0cc8dca25abd3b3a28e23f9a40 --- M pywikibot/page.py M pywikibot/site.py 2 files changed, 1 insertion(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/25/81225/1 diff --git a/pywikibot/page.py b/pywikibot/page.py index 16f32a0..1994169 100644 --- a/pywikibot/page.py +++ b/pywikibot/page.py @@ -2824,10 +2824,7 @@ source is a Claim. adds it as a reference. -data = self.repo.editSource(self, source, new=True, **kwargs) -source.hash = data['reference']['hash'] -self.on_item.lastrevid = data['pageinfo']['lastrevid'] -self.sources.append([source]) + self.addSources([source]) def addSources(self, sources, **kwargs): diff --git a/pywikibot/site.py b/pywikibot/site.py index 2e86a9f..3c8fabf 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3553,10 +3553,6 @@ datavalue = {'type': 'string', 'value': src._formatDataValue(), } - elif src.getType() == 'time': - datavalue = {'type': 'time', - 'value': src._formatDataValue(), - } else: raise NotImplementedError('%s datatype is not supported yet.' % src.getType()) valuesnaks = [] -- To view, visit https://gerrit.wikimedia.org/r/81225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I263ead65f241db0cc8dca25abd3b3a28e23f9a40 Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: FelixReimann fe...@fex-it.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implemented stubbing in QueryEntity - change (mediawiki...WikibaseQuery)
jenkins-bot has submitted this change and it was merged. Change subject: Implemented stubbing in QueryEntity .. Implemented stubbing in QueryEntity Change-Id: Iea6fe41bcf6dc1b5e5437dfae5d5152df91e1df6 --- M Tests/Phpunit/Wikibase/Query/QueryEntityTest.php M src/Wikibase/Query/QueryEntity.php 2 files changed, 39 insertions(+), 54 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php b/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php index 73a5782..8c070ad 100644 --- a/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php +++ b/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php @@ -52,34 +52,18 @@ $this-assertTrue( true ); } -// public function testStubDoesNotMessThingsUp() { -// $queryEntity = $this-getNewSimpleEntity(); -// -// $query = $this-newQuery(); -// -// $queryEntity-setQuery( $query ); -// -// $queryEntity-stub(); -// $obtainedQuery = $queryEntity-getQuery(); -// -// $this-assertInstanceOf( 'Ask\Language\Query', $obtainedQuery ); -// $this-assertEquals( $query, $obtainedQuery ); -// } -// -// public function testArraySerlialzationRoundtripWithQuery() { -// $queryEntity = $this-getNewSimpleEntity(); -// -// $query = $this-newQuery(); -// -// $queryEntity-setQuery( $query ); -// -// $serialization = $queryEntity-toArray(); -// -// $newQueryEntity = $queryEntity::newFromArray( $serialization ); -// -// $queryEntity-stub(); -// -// $this-assertEquals( $queryEntity, $newQueryEntity ); -// } + public function testStubDoesNotMessThingsUp() { + $queryEntity = $this-getNewSimpleEntity(); + + $query = $this-newQuery(); + + $queryEntity-setQuery( $query ); + + $queryEntity-stub(); + $obtainedQuery = $queryEntity-getQuery(); + + $this-assertInstanceOf( 'Ask\Language\Query', $obtainedQuery ); + $this-assertEquals( $query, $obtainedQuery ); + } } diff --git a/src/Wikibase/Query/QueryEntity.php b/src/Wikibase/Query/QueryEntity.php index ea134d5..abb3e1c 100644 --- a/src/Wikibase/Query/QueryEntity.php +++ b/src/Wikibase/Query/QueryEntity.php @@ -5,7 +5,6 @@ use Ask\DeserializerFactory; use Ask\Language\Query; use Ask\SerializerFactory; -use InvalidArgumentException; use MWException; use RuntimeException; use Wikibase\Entity; @@ -49,6 +48,8 @@ * @throws RuntimeException */ public function getQuery() { + $this-unstubQuery(); + return $this-query; } @@ -74,29 +75,29 @@ return QueryEntity::ENTITY_TYPE; } -// /** -// * @see Entity::stub -// */ -// public function stub() { -// parent::stub(); -// -// if ( $this-query !== null ) { -// $serializerFactory = new SerializerFactory(); -// -// $this-data['query'] = $serializerFactory-newQuerySerializer()-serialize( $this-query ); -// $this-query = null; -// } -// } -// -// /** -// * @see Entity::unstubQuery -// */ -// protected function unstubQuery() { -// if( $this-query === null array_key_exists( 'query', $this-data ) ) { -// $deserializerFactory = new DeserializerFactory( WikibaseRepo::getDefaultInstance()-getDataValueFactory() ); -// -// $this-query = $deserializerFactory-newQueryDeSerializer()-deserialize( $this-data['query'] ); -// } -// } + /** +* @see Entity::stub +*/ + public function stub() { + parent::stub(); + + if ( $this-query !== null ) { + $serializerFactory = new SerializerFactory(); + + $this-data['query'] = $serializerFactory-newQuerySerializer()-serialize( $this-query ); + $this-query = null; + } + } + + /** +* @see Entity::unstubQuery +*/ + protected function unstubQuery() { + if( $this-query === null array_key_exists( 'query', $this-data ) ) { + $deserializerFactory = new DeserializerFactory( WikibaseRepo::getDefaultInstance()-getDataValueFactory() ); + + $this-query = $deserializerFactory-newQueryDeSerializer()-deserialize( $this-data['query'] ); + } + } } -- To view, visit https://gerrit.wikimedia.org/r/80022 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iea6fe41bcf6dc1b5e5437dfae5d5152df91e1df6 Gerrit-PatchSet: 1 Gerrit-Project:
[MediaWiki-commits] [Gerrit] Add stub to make branches for all extensions - change (mediawiki...release)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/81226 Change subject: Add stub to make branches for all extensions .. Add stub to make branches for all extensions Change-Id: I2e344875f1635577fb8d6564dbfa75edc7103de7 --- A make-release/make-branches 1 file changed, 185 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/26/81226/1 diff --git a/make-release/make-branches b/make-release/make-branches new file mode 100644 index 000..48a9091 --- /dev/null +++ b/make-release/make-branches @@ -0,0 +1,185 @@ +#!/usr/bin/env php +?php +/** + * Create branches for MediaWiki core and all Wikimedia-hosted + * extension repositories. + * + * Example for REL1_21: + * + * $ cd mediawiki/core + * $ git log --right-only --oneline gerrit/master...gerrit/REL1_21 + * + * Get the last one and take note of the the commit hash. + * This commit is the first one that is in REl1_21 but not in master. + * Now get the CommitDate (not AuthorDate) of the parent of that commit, which + * is the last commit that is both in master and in the release branch. + * We can instruct git to access the parent by tacking ~1 to the hash: + * + * $ git show --format=fuller --quiet 4cb0dc1~1 + * commit 49eacb3b3ae9cebdc7a407360454af3c1e33b3c9 + * CommitDate: Sat Mar 16 12:00:59 2013 + + * + * @author Chad Horohoe, 2012 + * @author Timo Tijhof, 2013 + * @author Mark A. Hershberger, 2013 + * @license WTFPL (See LICENSE file) + */ + +if ( php_sapi_name() !== 'cli' ) { + echo This script only works from the command line\n; + exit( 1 ); +} + +$self = basename( __FILE__ ); + +if ( count( $argv ) 2 ) { + echo + usage: $self branch-name\n + . \n + . Example: $self REL1_21\n; + exit( 1 ); +} + +$maker = new MakeExtensionBranches( array( + 'branchName' = $argv[1], +) ); + +$maker-run(); + +class MakeExtensionBranches { + + protected $codeDir; + protected $conf, $opts; + + public function __construct( $opts ) { + $this-codeDir = __DIR__; + + require {$this-codeDir}/default.conf; + if ( file_exists( {$this-codeDir}/local.conf ) ) { + require {$this-codeDir}/local.conf; + } + + $this-conf = $conf; + $this-opts = (object) $opts; + + } + + protected function setup() { + if ( !$this-conf-extRepos ) { + // Fetch from Gerrit + $list = $this-execReadCmd( $exit, 'ssh', '-p', '29418', 'gerrit.wikimedia.org', 'gerrit', 'ls-projects', '-p', 'mediawiki/extensions' ); + // Trim leading/trailing whitespace + $list = array_map( 'trim', $list ); + // Ignore empty lines + $list = array_filter( $list ); + + $this-conf-extRepos = $list; + } + } + + public function branchAndTag( $name, $url, $dir ) { + $this-execReadCmd( $exitcode, 'git', 'clone', '-q', $url, '-b', 'master', $name ); + $this-chdir( $dir ); + + $out = $exitcode = null; + // Check if the branch exists already + $branchName = $this-opts-branchName; + $this-execReadCmd( $exitcode, 'git', 'show-branch', 'origin/', $branchName ); + if ( $exitcode == 0 ) { + echo Skipping $extRepo: Branch exists already\n; + continue; + } + $commit = $this-execReadCmd( $exitcode, 'git', 'rev-list', '-n', '1', '--before', $this-opts-branchDate, 'master' ); + if ( !$commit ) { + echo Skipping $extRepo: Repo does not have a commit before the branch date\n; + continue; + } + if ( $this-conf-verbose ) { + echo ... $extRepo: Branching $branchName at $commit\n; + } + $this-execReadCmd( $exitcode, 'git', 'checkout', '-q', $commit ); + $this-execReadCmd( $exitcode, 'git', 'branch', $branchName, $exitcode ); + if ( $exitcode != 0 ) { + echo Skipping $extRepo: Creating branch failed (exit code: $exitcode)\n; + continue; + } + $this-execWriteCmd( $exitcode, 'git', 'push', 'origin', $branchName:refs/heads/$branchName ); + } + + public function run() { + $this-setup(); + $this-setupBuildDirectory(); + + $this-branchCore(); + $this-tagCore(); + + foreach ( $this-conf-extRepos as $extRepo ) { + if ( $extRepo === 'mediawiki/extensions' ) { +
[MediaWiki-commits] [Gerrit] expose fixed makeRelease parameters to cli args re-tabify - change (mediawiki...release)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/81227 Change subject: expose fixed makeRelease parameters to cli args re-tabify .. expose fixed makeRelease parameters to cli args re-tabify Change-Id: Ib37db6a02c21752980d72e15a3e724c23c9bc824 --- M make-release/make-release 1 file changed, 325 insertions(+), 312 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/27/81227/1 diff --git a/make-release/make-release b/make-release/make-release index a0554cf..4e93bd4 100755 --- a/make-release/make-release +++ b/make-release/make-release @@ -11,10 +11,10 @@ def dieUsage(): -print + print Usage: ./make-release --snapshot - ./make-release [--yes] [--no-previous] next-version [previous-version] + ./make-release [--help] [--snapshot] [--git-root=URL] [--smw] [--mw-root=DIR] [--mw-branch=BRANCH] [--yes] [--no-previous] next-version [previous-version] Example: ./make-release 1.19.0 @@ -25,398 +25,411 @@ Use --no-previous to disable the diff to previous entirely. -sys.exit(1) + sys.exit(1) def main(): -try: -options, args = getopt.getopt(sys.argv[1:], '', ['help', 'snapshot', 'yes', 'no-previous', 'git-root=', 'smw']) -except getopt.GetoptError, err: -print str(err) -dieUsage() + try: + options, args = getopt.getopt(sys.argv[1:], '', ['help', 'snapshot', 'yes', 'no-previous', 'git-root=', 'smw', 'mw-root=', 'mw-branch=']) + except getopt.GetoptError, err: + print str(err) + dieUsage() -extensions = [] -smwExtensions = [ -SemanticMediaWiki, SemanticResultFormats, SemanticForms, -SemanticCompoundQueries, SemanticInternalObjects, SemanticDrilldown, -SemanticMaps, SemanticWatchlist, SemanticTasks, SemanticFormsInputs, -SemanticImageInput, Validator, AdminLinks, ApprovedRevs, Arrays, DataTransfer, -ExternalData, HeaderTabs, Maps, PageSchemas, ReplaceText, Widgets] -snapshot = False -yes = False -noPrevious = False -gitRoot = 'ssh://gerrit.wikimedia.org:29418/mediawiki' -smw = False -for name, value in options: -if name == '--help': -dieUsage() -elif name == '--snapshot': -snapshot = True -elif name == '--yes': -yes = True -elif name == '--no-previous': -noPrevious = True -elif name == '--git-root': -gitRoot = value -elif name == '--smw': -smw = True + mwRootDir = None + mwBranch = None + extensions = [] + smwExtensions = [ + SemanticMediaWiki, SemanticResultFormats, SemanticForms, + SemanticCompoundQueries, SemanticInternalObjects, SemanticDrilldown, + SemanticMaps, SemanticWatchlist, SemanticTasks, SemanticFormsInputs, + SemanticImageInput, Validator, AdminLinks, ApprovedRevs, Arrays, DataTransfer, + ExternalData, HeaderTabs, Maps, PageSchemas, ReplaceText, Widgets] + snapshot = False + yes = False + noPrevious = False + gitRoot = 'ssh://gerrit.wikimedia.org:29418/mediawiki' + smw = False + for name, value in options: + if name == '--help': + dieUsage() + elif name == '--snapshot': + snapshot = True + elif name == '--yes': + yes = True + elif name == '--no-previous': + noPrevious = True + elif name == '--git-root': + gitRoot = value + elif name == '--smw': + smw = True + elif name == '--mw-root' + mwRootDir = value + elif name == '--mw-branch' + mwBranch = value -# Snapshot release? -if snapshot: -makeRelease( -version='snapshot-' + time.strftime('%Y%m%d', time.gmtime()), -branch='trunk', -dir='snapshots', -gitRoot=gitRoot) -return -# Need a version specified if not snapshot -if len(args) == 0: -dieUsage() + # Snapshot release? + if snapshot: + makeRelease( + version = 'snapshot-' + time.strftime('%Y%m%d', time.gmtime()), + branch = 'trunk', + dir = 'snapshots', + gitRoot = gitRoot) + return -decomposed = decomposeVersion(args[0]) -if decomposed is None: -print 'Invalid version number %s' % (args[0]) -sys.exit(1) + # Need a version specified if not snapshot + if len(args) == 0: +
[MediaWiki-commits] [Gerrit] get rid of -merge jobs (no more triggered) - change (integration/jenkins-job-builder-config)
Hashar has uploaded a new change for review. https://gerrit.wikimedia.org/r/81228 Change subject: get rid of -merge jobs (no more triggered) .. get rid of -merge jobs (no more triggered) Our Zuul setup no more trigger merge jobs since it will fails whenever it is not able to merge a patchset. This simply remove the merge jobs in Jenkins. Bug: 51395 Change-Id: I0491793b8949eb205b1418fb42c0cd2460569fdb --- M mediawiki-extensions.yaml M mediawiki.yaml 2 files changed, 0 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config refs/changes/28/81228/1 diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 7b0ae68..5e3ab05 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -1,10 +1,4 @@ - job-template: -name: '{name}-{ext-name}-merge' -defaults: use-zuul-for-mw-ext -triggers: - - zuul - -- job-template: # TODO: Use global '{name}-phplint' template instead name: '{name}-{ext-name}-lint' node: hasSlaveScripts @@ -158,7 +152,6 @@ - job-group: name: mwext-check-jobs jobs: - - '{name}-{ext-name}-merge' - '{name}-{ext-name}-lint' - '{name}-{ext-name}-whitespaces' - '{name}-{ext-name}-jslint' diff --git a/mediawiki.yaml b/mediawiki.yaml index 5050e12..c94fafc 100644 --- a/mediawiki.yaml +++ b/mediawiki.yaml @@ -7,16 +7,6 @@ # use a specific git macro to prevents Jenkins from updating all the # submodules we do not care about. See bug 42455. -# Basic jobs used to merge the change against the latest -# version in the repository. -- job-template: -name: '{name}-merge' -defaults: use-zuul -scm: - - git-mwcore-nosubmodules -triggers: - - zuul - - job-template: name: '{name}-lint' node: hasSlaveScripts @@ -133,7 +123,6 @@ - job-group: name: mediawiki-jobs jobs: - - '{name}-merge' - '{name}-lint' - '{name}-jslint' - '{name}-qunit' -- To view, visit https://gerrit.wikimedia.org/r/81228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0491793b8949eb205b1418fb42c0cd2460569fdb Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Merge WIP Refactor VE headings scenarios - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/81229 Change subject: Merge WIP Refactor VE headings scenarios .. Merge WIP Refactor VE headings scenarios Change-Id: I024d4f299e225fb13ef918f3522bc5b10954779d --- 0 files changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/29/81229/1 -- To view, visit https://gerrit.wikimedia.org/r/81229 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I024d4f299e225fb13ef918f3522bc5b10954779d Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org Gerrit-Reviewer: Cmcmahon cmcma...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] get rid of -merge jobs (no more triggered) - change (integration/jenkins-job-builder-config)
jenkins-bot has submitted this change and it was merged. Change subject: get rid of -merge jobs (no more triggered) .. get rid of -merge jobs (no more triggered) Our Zuul setup no more trigger merge jobs since it will fails whenever it is not able to merge a patchset. This simply remove the merge jobs in Jenkins. Bug: 51395 Change-Id: I0491793b8949eb205b1418fb42c0cd2460569fdb --- M mediawiki-extensions.yaml M mediawiki.yaml 2 files changed, 0 insertions(+), 18 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml index 7b0ae68..5e3ab05 100644 --- a/mediawiki-extensions.yaml +++ b/mediawiki-extensions.yaml @@ -1,10 +1,4 @@ - job-template: -name: '{name}-{ext-name}-merge' -defaults: use-zuul-for-mw-ext -triggers: - - zuul - -- job-template: # TODO: Use global '{name}-phplint' template instead name: '{name}-{ext-name}-lint' node: hasSlaveScripts @@ -158,7 +152,6 @@ - job-group: name: mwext-check-jobs jobs: - - '{name}-{ext-name}-merge' - '{name}-{ext-name}-lint' - '{name}-{ext-name}-whitespaces' - '{name}-{ext-name}-jslint' diff --git a/mediawiki.yaml b/mediawiki.yaml index 5050e12..c94fafc 100644 --- a/mediawiki.yaml +++ b/mediawiki.yaml @@ -7,16 +7,6 @@ # use a specific git macro to prevents Jenkins from updating all the # submodules we do not care about. See bug 42455. -# Basic jobs used to merge the change against the latest -# version in the repository. -- job-template: -name: '{name}-merge' -defaults: use-zuul -scm: - - git-mwcore-nosubmodules -triggers: - - zuul - - job-template: name: '{name}-lint' node: hasSlaveScripts @@ -133,7 +123,6 @@ - job-group: name: mediawiki-jobs jobs: - - '{name}-merge' - '{name}-lint' - '{name}-jslint' - '{name}-qunit' -- To view, visit https://gerrit.wikimedia.org/r/81228 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0491793b8949eb205b1418fb42c0cd2460569fdb Gerrit-PatchSet: 1 Gerrit-Project: integration/jenkins-job-builder-config Gerrit-Branch: master Gerrit-Owner: Hashar has...@free.fr Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide errors from the property parser func for now. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/81230 Change subject: Hide errors from the property parser func for now. .. Hide errors from the property parser func for now. Many geo-coordinates trigger spurious error messages on wikipedia at the moment. We'll just ignore these errors for now, to avoid confusion. Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 --- M client/includes/parserhooks/PropertyParserFunction.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/30/81230/1 diff --git a/client/includes/parserhooks/PropertyParserFunction.php b/client/includes/parserhooks/PropertyParserFunction.php index 4941640..4721b78 100644 --- a/client/includes/parserhooks/PropertyParserFunction.php +++ b/client/includes/parserhooks/PropertyParserFunction.php @@ -199,7 +199,7 @@ $status = $instance-renderForEntityId( $entityId, $propertyLabel ); - if ( !$status-isGood() ) { + if ( !$status-isGood() false ) { // patched out to hide issue with geo-coordinat data type for now. // stuff the error messages into the ParserOutput, so we can render them later somewhere $errors = $parser-getOutput()-getExtensionData( 'wikibase-property-render-errors' ); @@ -207,7 +207,7 @@ $errors = array(); } - //XXX: if Status sucked less, we'd could get an array of Message objects + //XXX: if Status sucked less, we could get an array of Message objects $errors[] = $status-getWikiText(); $parser-getOutput()-setExtensionData( 'wikibase-property-render-errors', $errors ); -- To view, visit https://gerrit.wikimedia.org/r/81230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix call to non-existing method in error case. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/81231 Change subject: Fix call to non-existing method in error case. .. Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/31/81231/1 diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index 2bdbe3a..9be9422 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -51,7 +51,7 @@ // in the DataTypes library have been made. if ( $dataValue-getType() === 'bad' ) { - throw new IllegalValueException( $dataValue-getError() ); + throw new IllegalValueException( $dataValue-getReason() ); } $valueFormatters = $dataType-getFormatters(); -- To view, visit https://gerrit.wikimedia.org/r/81231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix call to non-existing method in error case. - change (mediawiki...Wikibase)
Daniel Kinzler has uploaded a new change for review. https://gerrit.wikimedia.org/r/81232 Change subject: Fix call to non-existing method in error case. .. Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/32/81232/1 diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index 05f430e..c4f7fe0 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -37,7 +37,7 @@ // in the DataTypes library have been made. if ( $dataValue-getType() === 'bad' ) { - throw new IllegalValueException( $dataValue-getError() ); + throw new IllegalValueException( $dataValue-getReason() ); } $valueFormatters = $dataType-getFormatters(); -- To view, visit https://gerrit.wikimedia.org/r/81232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix call to non-existing method in error case. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix call to non-existing method in error case. .. Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index 2bdbe3a..9be9422 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -51,7 +51,7 @@ // in the DataTypes library have been made. if ( $dataValue-getType() === 'bad' ) { - throw new IllegalValueException( $dataValue-getError() ); + throw new IllegalValueException( $dataValue-getReason() ); } $valueFormatters = $dataType-getFormatters(); -- To view, visit https://gerrit.wikimedia.org/r/81231 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide errors from the property parser func for now. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Hide errors from the property parser func for now. .. Hide errors from the property parser func for now. Many geo-coordinates trigger spurious error messages on wikipedia at the moment. We'll just ignore these errors for now, to avoid confusion. Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 --- M client/includes/parserhooks/PropertyParserFunction.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/client/includes/parserhooks/PropertyParserFunction.php b/client/includes/parserhooks/PropertyParserFunction.php index 4941640..4721b78 100644 --- a/client/includes/parserhooks/PropertyParserFunction.php +++ b/client/includes/parserhooks/PropertyParserFunction.php @@ -199,7 +199,7 @@ $status = $instance-renderForEntityId( $entityId, $propertyLabel ); - if ( !$status-isGood() ) { + if ( !$status-isGood() false ) { // patched out to hide issue with geo-coordinat data type for now. // stuff the error messages into the ParserOutput, so we can render them later somewhere $errors = $parser-getOutput()-getExtensionData( 'wikibase-property-render-errors' ); @@ -207,7 +207,7 @@ $errors = array(); } - //XXX: if Status sucked less, we'd could get an array of Message objects + //XXX: if Status sucked less, we could get an array of Message objects $errors[] = $status-getWikiText(); $parser-getOutput()-setExtensionData( 'wikibase-property-render-errors', $errors ); -- To view, visit https://gerrit.wikimedia.org/r/81230 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix call to non-existing method in error case. - change (mediawiki...Wikibase)
jenkins-bot has submitted this change and it was merged. Change subject: Fix call to non-existing method in error case. .. Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: Denny Vrandecic: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index 05f430e..c4f7fe0 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -37,7 +37,7 @@ // in the DataTypes library have been made. if ( $dataValue-getType() === 'bad' ) { - throw new IllegalValueException( $dataValue-getError() ); + throw new IllegalValueException( $dataValue-getReason() ); } $valueFormatters = $dataType-getFormatters(); -- To view, visit https://gerrit.wikimedia.org/r/81232 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikibase, fix issue with property parser function - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81233 Change subject: Update Wikibase, fix issue with property parser function .. Update Wikibase, fix issue with property parser function Change-Id: Id13fb475f7eda81ff85cf7473e430eafbba48979 --- M extensions/Wikibase 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/33/81233/1 diff --git a/extensions/Wikibase b/extensions/Wikibase index 354ab00..2c4b619 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit 354ab003651484dc849b7da437b695ff5754f1a0 +Subproject commit 2c4b619b62f62cec99798341aea7d15de1b8495a -- To view, visit https://gerrit.wikimedia.org/r/81233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id13fb475f7eda81ff85cf7473e430eafbba48979 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf14 Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix call to non-existing method in error case. - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81234 Change subject: Fix call to non-existing method in error case. .. Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/34/81234/1 diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index e706600..e6a6cbc 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -49,6 +49,10 @@ // TODO: update this code to obtain the string formatter as soon as corresponding changes // in the DataTypes library have been made. + if ( $dataValue-getType() === 'bad' ) { + throw new IllegalValueException( $dataValue-getReason() ); + } + $valueFormatters = $dataType-getFormatters(); $valueFormatter = reset( $valueFormatters ); -- To view, visit https://gerrit.wikimedia.org/r/81234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf11 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Implement support for time datatype - change (pywikibot/core)
Merlijn van Deen has uploaded a new change for review. https://gerrit.wikimedia.org/r/81236 Change subject: Implement support for time datatype .. Implement support for time datatype Change-Id: I4e13f797d7979d5944fa8822ea09076448b9990e Original-Change-Id: Iac583043531ba3f30985244ffad2aef2ad549f51 --- M pywikibot/site.py 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core refs/changes/36/81236/1 diff --git a/pywikibot/site.py b/pywikibot/site.py index 3c8fabf..2e86a9f 100644 --- a/pywikibot/site.py +++ b/pywikibot/site.py @@ -3553,6 +3553,10 @@ datavalue = {'type': 'string', 'value': src._formatDataValue(), } + elif src.getType() == 'time': + datavalue = {'type': 'time', + 'value': src._formatDataValue(), + } else: raise NotImplementedError('%s datatype is not supported yet.' % src.getType()) valuesnaks = [] -- To view, visit https://gerrit.wikimedia.org/r/81236 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4e13f797d7979d5944fa8822ea09076448b9990e Gerrit-PatchSet: 1 Gerrit-Project: pywikibot/core Gerrit-Branch: master Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl Gerrit-Reviewer: FelixReimann fe...@fex-it.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide errors from the property parser func for now. - change (mediawiki...Wikibase)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81235 Change subject: Hide errors from the property parser func for now. .. Hide errors from the property parser func for now. Many geo-coordinates trigger spurious error messages on wikipedia at the moment. We'll just ignore these errors for now, to avoid confusion. Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 --- M client/includes/parserhooks/PropertyParserFunction.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/35/81235/1 diff --git a/client/includes/parserhooks/PropertyParserFunction.php b/client/includes/parserhooks/PropertyParserFunction.php index 4941640..4721b78 100644 --- a/client/includes/parserhooks/PropertyParserFunction.php +++ b/client/includes/parserhooks/PropertyParserFunction.php @@ -199,7 +199,7 @@ $status = $instance-renderForEntityId( $entityId, $propertyLabel ); - if ( !$status-isGood() ) { + if ( !$status-isGood() false ) { // patched out to hide issue with geo-coordinat data type for now. // stuff the error messages into the ParserOutput, so we can render them later somewhere $errors = $parser-getOutput()-getExtensionData( 'wikibase-property-render-errors' ); @@ -207,7 +207,7 @@ $errors = array(); } - //XXX: if Status sucked less, we'd could get an array of Message objects + //XXX: if Status sucked less, we could get an array of Message objects $errors[] = $status-getWikiText(); $parser-getOutput()-setExtensionData( 'wikibase-property-render-errors', $errors ); -- To view, visit https://gerrit.wikimedia.org/r/81235 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf11 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Update Wikibase, fix for property parser function - change (mediawiki/core)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81237 Change subject: Update Wikibase, fix for property parser function .. Update Wikibase, fix for property parser function Change-Id: Ifaa5c4ca705d53fc25bab7d75da594b5740b5541 --- M extensions/Wikibase 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/37/81237/1 diff --git a/extensions/Wikibase b/extensions/Wikibase index 75b4eed..7ebb116 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit 75b4eed3aac5d7956ec9ec7613b20511e3251679 +Subproject commit 7ebb116c03d3e2bda604ce9f50065d46c0bbcfcc -- To view, visit https://gerrit.wikimedia.org/r/81237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifaa5c4ca705d53fc25bab7d75da594b5740b5541 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf13 Gerrit-Owner: Aude aude.w...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fix call to non-existing method in error case. - change (mediawiki...Wikibase)
Aude has submitted this change and it was merged. Change subject: Fix call to non-existing method in error case. .. Fix call to non-existing method in error case. Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 --- M lib/includes/TypedValueFormatter.php 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Aude: Verified; Looks good to me, approved diff --git a/lib/includes/TypedValueFormatter.php b/lib/includes/TypedValueFormatter.php index e706600..e6a6cbc 100644 --- a/lib/includes/TypedValueFormatter.php +++ b/lib/includes/TypedValueFormatter.php @@ -49,6 +49,10 @@ // TODO: update this code to obtain the string formatter as soon as corresponding changes // in the DataTypes library have been made. + if ( $dataValue-getType() === 'bad' ) { + throw new IllegalValueException( $dataValue-getReason() ); + } + $valueFormatters = $dataType-getFormatters(); $valueFormatter = reset( $valueFormatters ); -- To view, visit https://gerrit.wikimedia.org/r/81234 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id85d3182a8aaba53a3c863c12adefe0ec537f387 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf11 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Hide errors from the property parser func for now. - change (mediawiki...Wikibase)
Aude has submitted this change and it was merged. Change subject: Hide errors from the property parser func for now. .. Hide errors from the property parser func for now. Many geo-coordinates trigger spurious error messages on wikipedia at the moment. We'll just ignore these errors for now, to avoid confusion. Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 --- M client/includes/parserhooks/PropertyParserFunction.php 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: Aude: Verified; Looks good to me, approved diff --git a/client/includes/parserhooks/PropertyParserFunction.php b/client/includes/parserhooks/PropertyParserFunction.php index 4941640..4721b78 100644 --- a/client/includes/parserhooks/PropertyParserFunction.php +++ b/client/includes/parserhooks/PropertyParserFunction.php @@ -199,7 +199,7 @@ $status = $instance-renderForEntityId( $entityId, $propertyLabel ); - if ( !$status-isGood() ) { + if ( !$status-isGood() false ) { // patched out to hide issue with geo-coordinat data type for now. // stuff the error messages into the ParserOutput, so we can render them later somewhere $errors = $parser-getOutput()-getExtensionData( 'wikibase-property-render-errors' ); @@ -207,7 +207,7 @@ $errors = array(); } - //XXX: if Status sucked less, we'd could get an array of Message objects + //XXX: if Status sucked less, we could get an array of Message objects $errors[] = $status-getWikiText(); $parser-getOutput()-setExtensionData( 'wikibase-property-render-errors', $errors ); -- To view, visit https://gerrit.wikimedia.org/r/81235 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I8166f3c1fdafa1dea8fef455c7dbc03acaaed6b3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: mw1.22-wmf11 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Revert WIP Refactor VE headings scenarios - change (qa/browsertests)
Cmcmahon has submitted this change and it was merged. Change subject: Revert WIP Refactor VE headings scenarios .. Revert WIP Refactor VE headings scenarios This reverts commit a614172462d2eec5951b89ae6ce4af1a80fde43b. Change-Id: I56fc13106e1826a1fc2352985bd2673bba618e85 --- M features/step_definitions/page_steps.rb M features/step_definitions/visual_editor_headings_steps.rb M features/support/pages/visual_editor_page.rb M features/visual_editor_headings.feature 4 files changed, 41 insertions(+), 120 deletions(-) Approvals: Cmcmahon: Looks good to me, approved jenkins-bot: Verified diff --git a/features/step_definitions/page_steps.rb b/features/step_definitions/page_steps.rb index bac0d26..92cb91a 100644 --- a/features/step_definitions/page_steps.rb +++ b/features/step_definitions/page_steps.rb @@ -130,4 +130,4 @@ page.body_content.should match(/Moved/) page.body_content.should_not match(/Redirect page/) end -end +end \ No newline at end of file diff --git a/features/step_definitions/visual_editor_headings_steps.rb b/features/step_definitions/visual_editor_headings_steps.rb index ec5f764..c4e24af 100644 --- a/features/step_definitions/visual_editor_headings_steps.rb +++ b/features/step_definitions/visual_editor_headings_steps.rb @@ -1,4 +1,12 @@ -When(/^I click the down arrow on Headings interface$/) do +When(/^I click the Headings pull\-down menu$/) do + on(VisualEditorPage).ve_heading_menu_element.when_present.click + end + +Given(/^I can see the Headings interface$/) do + on(VisualEditorPage).ve_heading_ui.should match Regexp.escape('Paragraph') +end + +When(/^I click the down arrow$/) do on(VisualEditorPage).downarrow_element.when_present.click end @@ -13,10 +21,6 @@ end page.paragraph_diff_view.should match Regexp.escape('Editing with ') end -end - -Then(/^I should be able to click the up arrow on the save box$/) do - on(VisualEditorPage).uparrow_element.when_present.click end When(/^I click Heading$/) do @@ -58,54 +62,3 @@ end end -When(/^I click Sub\-Heading3$/) do - on(VisualEditorPage).subheading3_element.when_present.click -end - -Then(/^a sub\-heading3 should appear in the diff view$/) do - on(VisualEditorPage) do |page| -page.wait_until(10) do - page.heading_diff_view.include? '=Editing ' -end -page.heading_diff_view.should match Regexp.escape('=Editing with ') - end -end - -When(/^I click Sub\-Heading4$/) do - on(VisualEditorPage).subheading4_element.when_present.click -end - -Then(/^a sub\-heading4 should appear in the diff view$/) do - on(VisualEditorPage) do |page| -page.wait_until(10) do - page.heading_diff_view.include? '==Editing ' -end -page.heading_diff_view.should match Regexp.escape('==Editing with ') - end -end - -When(/^I click Preformatted$/) do - on(VisualEditorPage).preformatted_element.when_present.click -end - -Then(/^a Preformatted should appear in the diff view$/) do - on(VisualEditorPage) do |page| -page.wait_until(10) do - page.heading_diff_view.include? ' Editing ' -end -page.heading_diff_view.should match Regexp.escape(' Editing with ') - end -end - - When(/^I click Page title$/) do - on(VisualEditorPage).page_title_element.when_present.click -end - -Then(/^a Page title should appear in the diff view$/) do - on(VisualEditorPage) do |page| -page.wait_until(10) do - page.heading_diff_view.include? '=Editing ' -end -page.heading_diff_view.should match Regexp.escape('=Editing with ') - end -end diff --git a/features/support/pages/visual_editor_page.rb b/features/support/pages/visual_editor_page.rb index e6ee578..9fa0d56 100644 --- a/features/support/pages/visual_editor_page.rb +++ b/features/support/pages/visual_editor_page.rb @@ -8,7 +8,6 @@ div(:content, class: 've-ce-documentNode ve-ce-branchNode') text_area(:describe_change, id: 've-init-mw-viewPageTarget-saveDialog-editSummary') div(:diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer') - div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down') a(:edit_ve, text: 'Edit') div(:heading_diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer') div(:insert_references, class: 've-ui-window-title') @@ -36,6 +35,7 @@ span(:apply_changes, text: 'Apply changes', frame: frame) text_field(:content_box, index: 0, frame: frame) span(:create_new, text:'Insert reference', frame: frame) +div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down') span(:heading, text: 'Heading') div(:insert_reference, class: 've-ui-widget ve-ui-flaggableElement-primary ve-ui-buttonWidget ve-ui-window-applyButton', frame: frame) a(:leftarrowclose, class: 've-ui-widget ve-ui-iconButtonWidget ve-ui-icon-previous ve-ui-inspector-closeButton', frame: frame) @@ -44,21 +44,16 @@ span(:newpage_linksuggestion, text: 'DoesNotExist')
[MediaWiki-commits] [Gerrit] Use original DV type when serializing bad values. - change (mediawiki...WikibaseDataModel)
Aude has uploaded a new change for review. https://gerrit.wikimedia.org/r/81239 Change subject: Use original DV type when serializing bad values. .. Use original DV type when serializing bad values. UnDeserializableValue is used to represent values that could not be unserialized. When re-serializing them, we should restore the original type and data as it were, instead of saving bad as the type. Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb --- M DataModel/Snak/PropertyValueSnak.php M tests/phpunit/Snak/PropertyValueSnakTest.php 2 files changed, 36 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel refs/changes/39/81239/1 diff --git a/DataModel/Snak/PropertyValueSnak.php b/DataModel/Snak/PropertyValueSnak.php index c45f37a..2e5a886 100644 --- a/DataModel/Snak/PropertyValueSnak.php +++ b/DataModel/Snak/PropertyValueSnak.php @@ -88,7 +88,16 @@ public function toArray() { $data = parent::toArray(); - $data[] = $this-dataValue-getType(); + // Since we use getArrayValue() and getType() directly instead of + // the generic toArray() method, we need to handle the special case + // of bad values separately, to restore the original type info. + if ( $this-dataValue instanceof UnDeserializableValue ) { + $type = $this-dataValue-getTargetType(); + } else { + $type = $this-dataValue-getType(); + } + + $data[] = $type; $data[] = $this-dataValue-getArrayValue(); return $data; diff --git a/tests/phpunit/Snak/PropertyValueSnakTest.php b/tests/phpunit/Snak/PropertyValueSnakTest.php index 2f6fa9b..bdcbace 100644 --- a/tests/phpunit/Snak/PropertyValueSnakTest.php +++ b/tests/phpunit/Snak/PropertyValueSnakTest.php @@ -3,6 +3,9 @@ namespace Wikibase\Test; use DataValues\StringValue; +use DataValues\UnDeserializableValue; +use Wikibase\EntityId; +use Wikibase\Property; use Wikibase\PropertyValueSnak; /** @@ -73,4 +76,27 @@ return $argLists; } + /** +* @dataProvider toArrayProvider +*/ + public function testToArray( PropertyValueSnak $snak, array $expected ) { + $actual = $snak-toArray(); + + $this-assertEquals( $expected, $actual ); + } + + public static function toArrayProvider() { + $q1 = new EntityId( Property::ENTITY_TYPE, 1 ); + + return array( + 'string-value' = array( + new PropertyValueSnak( $q1, new StringValue( 'boo' ) ), + array( 'value', $q1-getNumericId(), 'string', 'boo' ) + ), + 'bad-value' = array( + new PropertyValueSnak( $q1, new UnDeserializableValue( 77, 'string', 'not a string' ) ), + array( 'value', $q1-getNumericId(), 'string', 77 ) + ), + ); + } } -- To view, visit https://gerrit.wikimedia.org/r/81239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use original DV type when serializing bad values. - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Use original DV type when serializing bad values. .. Use original DV type when serializing bad values. UnDeserializableValue is used to represent values that could not be unserialized. When re-serializing them, we should restore the original type and data as it were, instead of saving bad as the type. Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb --- M DataModel/Snak/PropertyValueSnak.php M tests/phpunit/Snak/PropertyValueSnakTest.php 2 files changed, 36 insertions(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/DataModel/Snak/PropertyValueSnak.php b/DataModel/Snak/PropertyValueSnak.php index c45f37a..2e5a886 100644 --- a/DataModel/Snak/PropertyValueSnak.php +++ b/DataModel/Snak/PropertyValueSnak.php @@ -88,7 +88,16 @@ public function toArray() { $data = parent::toArray(); - $data[] = $this-dataValue-getType(); + // Since we use getArrayValue() and getType() directly instead of + // the generic toArray() method, we need to handle the special case + // of bad values separately, to restore the original type info. + if ( $this-dataValue instanceof UnDeserializableValue ) { + $type = $this-dataValue-getTargetType(); + } else { + $type = $this-dataValue-getType(); + } + + $data[] = $type; $data[] = $this-dataValue-getArrayValue(); return $data; diff --git a/tests/phpunit/Snak/PropertyValueSnakTest.php b/tests/phpunit/Snak/PropertyValueSnakTest.php index 2f6fa9b..bdcbace 100644 --- a/tests/phpunit/Snak/PropertyValueSnakTest.php +++ b/tests/phpunit/Snak/PropertyValueSnakTest.php @@ -3,6 +3,9 @@ namespace Wikibase\Test; use DataValues\StringValue; +use DataValues\UnDeserializableValue; +use Wikibase\EntityId; +use Wikibase\Property; use Wikibase\PropertyValueSnak; /** @@ -73,4 +76,27 @@ return $argLists; } + /** +* @dataProvider toArrayProvider +*/ + public function testToArray( PropertyValueSnak $snak, array $expected ) { + $actual = $snak-toArray(); + + $this-assertEquals( $expected, $actual ); + } + + public static function toArrayProvider() { + $q1 = new EntityId( Property::ENTITY_TYPE, 1 ); + + return array( + 'string-value' = array( + new PropertyValueSnak( $q1, new StringValue( 'boo' ) ), + array( 'value', $q1-getNumericId(), 'string', 'boo' ) + ), + 'bad-value' = array( + new PropertyValueSnak( $q1, new UnDeserializableValue( 77, 'string', 'not a string' ) ), + array( 'value', $q1-getNumericId(), 'string', 77 ) + ), + ); + } } -- To view, visit https://gerrit.wikimedia.org/r/81239 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: mw1.22-wmf14 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Use original DV type when serializing bad values. - change (mediawiki...WikibaseDataModel)
jenkins-bot has submitted this change and it was merged. Change subject: Use original DV type when serializing bad values. .. Use original DV type when serializing bad values. UnDeserializableValue is used to represent values that could not be unserialized. When re-serializing them, we should restore the original type and data as it were, instead of saving bad as the type. Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb --- M DataModel/Snak/PropertyValueSnak.php M tests/phpunit/Snak/PropertyValueSnakTest.php 2 files changed, 36 insertions(+), 1 deletion(-) Approvals: Aude: Looks good to me, approved jenkins-bot: Verified diff --git a/DataModel/Snak/PropertyValueSnak.php b/DataModel/Snak/PropertyValueSnak.php index c45f37a..2e5a886 100644 --- a/DataModel/Snak/PropertyValueSnak.php +++ b/DataModel/Snak/PropertyValueSnak.php @@ -88,7 +88,16 @@ public function toArray() { $data = parent::toArray(); - $data[] = $this-dataValue-getType(); + // Since we use getArrayValue() and getType() directly instead of + // the generic toArray() method, we need to handle the special case + // of bad values separately, to restore the original type info. + if ( $this-dataValue instanceof UnDeserializableValue ) { + $type = $this-dataValue-getTargetType(); + } else { + $type = $this-dataValue-getType(); + } + + $data[] = $type; $data[] = $this-dataValue-getArrayValue(); return $data; diff --git a/tests/phpunit/Snak/PropertyValueSnakTest.php b/tests/phpunit/Snak/PropertyValueSnakTest.php index 69dc6f0..61afcb8 100644 --- a/tests/phpunit/Snak/PropertyValueSnakTest.php +++ b/tests/phpunit/Snak/PropertyValueSnakTest.php @@ -3,6 +3,9 @@ namespace Wikibase\Test; use DataValues\StringValue; +use DataValues\UnDeserializableValue; +use Wikibase\EntityId; +use Wikibase\Property; use Wikibase\PropertyValueSnak; /** @@ -73,4 +76,27 @@ return $argLists; } + /** +* @dataProvider toArrayProvider +*/ + public function testToArray( PropertyValueSnak $snak, array $expected ) { + $actual = $snak-toArray(); + + $this-assertEquals( $expected, $actual ); + } + + public static function toArrayProvider() { + $q1 = new EntityId( Property::ENTITY_TYPE, 1 ); + + return array( + 'string-value' = array( + new PropertyValueSnak( $q1, new StringValue( 'boo' ) ), + array( 'value', $q1-getNumericId(), 'string', 'boo' ) + ), + 'bad-value' = array( + new PropertyValueSnak( $q1, new UnDeserializableValue( 77, 'string', 'not a string' ) ), + array( 'value', $q1-getNumericId(), 'string', 77 ) + ), + ); + } } -- To view, visit https://gerrit.wikimedia.org/r/81214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ic75833eca87677c65d7f9b6500f6dcfca80aedfb Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/extensions/WikibaseDataModel Gerrit-Branch: master Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de Gerrit-Reviewer: Addshore addshorew...@gmail.com Gerrit-Reviewer: Aude aude.w...@gmail.com Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] expose fixed makeRelease parameters to cli args flake8/pep8 ... - change (mediawiki...release)
MarkAHershberger has uploaded a new change for review. https://gerrit.wikimedia.org/r/81240 Change subject: expose fixed makeRelease parameters to cli args flake8/pep8 clean .. expose fixed makeRelease parameters to cli args flake8/pep8 clean Change-Id: Iba2b2fc9cbbe30ffd1bd79688b302ca2460e7427 --- M make-release/make-release 1 file changed, 30 insertions(+), 18 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release refs/changes/40/81240/1 diff --git a/make-release/make-release b/make-release/make-release index a0554cf..3b8ed73 100755 --- a/make-release/make-release +++ b/make-release/make-release @@ -1,5 +1,5 @@ #!/usr/bin/python -# vim:sw=4:ts=4:et: +# vim:sw = 4:ts=4:et: import getopt import hashlib @@ -14,7 +14,7 @@ print Usage: ./make-release --snapshot - ./make-release [--yes] [--no-previous] next-version [previous-version] + ./make-release [--help] [--snapshot] [--git-root = URL] [--smw] [--mw-root = DIR] [--mw-branch = BRANCH] [--yes] [--no-previous] next-version [previous-version] Example: ./make-release 1.19.0 @@ -30,11 +30,13 @@ def main(): try: -options, args = getopt.getopt(sys.argv[1:], '', ['help', 'snapshot', 'yes', 'no-previous', 'git-root=', 'smw']) +options, args = getopt.getopt(sys.argv[1:], '', ['help', 'snapshot', 'yes', 'no-previous', 'git-root = ', 'smw', 'mw-root = ', 'mw-branch = ']) except getopt.GetoptError, err: print str(err) dieUsage() +mwRootDir = None +mwBranch = None extensions = [] smwExtensions = [ SemanticMediaWiki, SemanticResultFormats, SemanticForms, @@ -60,6 +62,10 @@ gitRoot = value elif name == '--smw': smw = True +elif name == '--mw-root': +mwRootDir = value +elif name == '--mw-branch': +mwBranch = value # Snapshot release? if snapshot: @@ -74,12 +80,18 @@ if len(args) == 0: dieUsage() -decomposed = decomposeVersion(args[0]) +version = args[0] + +decomposed = decomposeVersion(version) if decomposed is None: -print 'Invalid version number %s' % (args[0]) +print 'Invalid version number %s' % (version) sys.exit(1) -version = decomposed['major'] +if mwRootDir is None: +mwRootDir = decomposed['major'] + +if mwBranch is None: +mwBranch = decomposed['branch'] if smw: # Other extensions for inclusion @@ -90,16 +102,16 @@ # Given the previous version on the command line makeRelease( extensions=extensions, -version=args[0], +version=version, prevVersion=args[1], prevBranch=versionToBranch(args[1]), -branch=decomposed['branch'], -dir=decomposed['major'], +branch=mwBranch, +dir=mwRootDir, gitRoot=gitRoot) return if decomposed['prevVersion'] is None: -if not ask(No previous release found. Do you want to make a release with no patch?): +if not yes and not ask(No previous release found. Do you want to make a release with no patch?): print 'Please specify the correct previous release on the command line' sys.exit(1) else: @@ -108,22 +120,22 @@ if noPrevious: makeRelease( extensions=extensions, -version=args[0], -branch=decomposed['branch'], -dir=decomposed['major'], +version=version, +branch=mwBranch, +dir=mwRootDir, gitRoot=gitRoot) else: -if not ask(Was %s the previous release? % (decomposed['prevVersion'])): +if not yes and not ask(Was %s the previous release? % (decomposed['prevVersion'])): print 'Please specify the correct previous release on the command line' sys.exit(1) makeRelease( extensions=extensions, -version=args[0], +version=version, prevVersion=decomposed['prevVersion'], prevBranch=decomposed['prevBranch'], -branch=decomposed['branch'], -dir=decomposed['major'], +branch=mwBranch, +dir=mwRootDir, gitRoot=gitRoot) @@ -294,7 +306,7 @@ def makeTarFile(package, file, dir, rootDir, argAdd=[]): # Generate the .tar.gz file outFile = open(dir + '/' + file + '.tar.gz', 'w') -args = ['tar', '--format=gnu', '--exclude-vcs', '--exclude-from', rootDir + '/tarignore'] +args = ['tar', '--format = gnu', '--exclude-vcs', '--exclude-from', rootDir + '/tarignore'] args += argAdd args += ['-c', package] print ' '.join(args) -- To view, visit https://gerrit.wikimedia.org/r/81240 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
[MediaWiki-commits] [Gerrit] Update Wikibase, fix for property parser function - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikibase, fix for property parser function .. Update Wikibase, fix for property parser function Change-Id: Ifaa5c4ca705d53fc25bab7d75da594b5740b5541 --- M extensions/Wikibase 1 file changed, 0 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/Wikibase b/extensions/Wikibase index 75b4eed..7ebb116 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit 75b4eed3aac5d7956ec9ec7613b20511e3251679 +Subproject commit 7ebb116c03d3e2bda604ce9f50065d46c0bbcfcc -- To view, visit https://gerrit.wikimedia.org/r/81237 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ifaa5c4ca705d53fc25bab7d75da594b5740b5541 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf13 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] WIP Refactor VE headings scenarios - change (qa/browsertests)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/81241 Change subject: WIP Refactor VE headings scenarios .. WIP Refactor VE headings scenarios Merged, then reverted. Here is it ready to be merged again. Change-Id: I3a19e7ffdf7289e7a453b4771c849233eea31131 --- M features/step_definitions/page_steps.rb M features/step_definitions/visual_editor_headings_steps.rb M features/support/pages/visual_editor_page.rb M features/visual_editor_headings.feature 4 files changed, 118 insertions(+), 39 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/41/81241/1 diff --git a/features/step_definitions/page_steps.rb b/features/step_definitions/page_steps.rb index 92cb91a..bac0d26 100644 --- a/features/step_definitions/page_steps.rb +++ b/features/step_definitions/page_steps.rb @@ -130,4 +130,4 @@ page.body_content.should match(/Moved/) page.body_content.should_not match(/Redirect page/) end -end \ No newline at end of file +end diff --git a/features/step_definitions/visual_editor_headings_steps.rb b/features/step_definitions/visual_editor_headings_steps.rb index c4e24af..ec5f764 100644 --- a/features/step_definitions/visual_editor_headings_steps.rb +++ b/features/step_definitions/visual_editor_headings_steps.rb @@ -1,12 +1,4 @@ -When(/^I click the Headings pull\-down menu$/) do - on(VisualEditorPage).ve_heading_menu_element.when_present.click - end - -Given(/^I can see the Headings interface$/) do - on(VisualEditorPage).ve_heading_ui.should match Regexp.escape('Paragraph') -end - -When(/^I click the down arrow$/) do +When(/^I click the down arrow on Headings interface$/) do on(VisualEditorPage).downarrow_element.when_present.click end @@ -21,6 +13,10 @@ end page.paragraph_diff_view.should match Regexp.escape('Editing with ') end +end + +Then(/^I should be able to click the up arrow on the save box$/) do + on(VisualEditorPage).uparrow_element.when_present.click end When(/^I click Heading$/) do @@ -62,3 +58,54 @@ end end +When(/^I click Sub\-Heading3$/) do + on(VisualEditorPage).subheading3_element.when_present.click +end + +Then(/^a sub\-heading3 should appear in the diff view$/) do + on(VisualEditorPage) do |page| +page.wait_until(10) do + page.heading_diff_view.include? '=Editing ' +end +page.heading_diff_view.should match Regexp.escape('=Editing with ') + end +end + +When(/^I click Sub\-Heading4$/) do + on(VisualEditorPage).subheading4_element.when_present.click +end + +Then(/^a sub\-heading4 should appear in the diff view$/) do + on(VisualEditorPage) do |page| +page.wait_until(10) do + page.heading_diff_view.include? '==Editing ' +end +page.heading_diff_view.should match Regexp.escape('==Editing with ') + end +end + +When(/^I click Preformatted$/) do + on(VisualEditorPage).preformatted_element.when_present.click +end + +Then(/^a Preformatted should appear in the diff view$/) do + on(VisualEditorPage) do |page| +page.wait_until(10) do + page.heading_diff_view.include? ' Editing ' +end +page.heading_diff_view.should match Regexp.escape(' Editing with ') + end +end + + When(/^I click Page title$/) do + on(VisualEditorPage).page_title_element.when_present.click +end + +Then(/^a Page title should appear in the diff view$/) do + on(VisualEditorPage) do |page| +page.wait_until(10) do + page.heading_diff_view.include? '=Editing ' +end +page.heading_diff_view.should match Regexp.escape('=Editing with ') + end +end diff --git a/features/support/pages/visual_editor_page.rb b/features/support/pages/visual_editor_page.rb index 9fa0d56..e6ee578 100644 --- a/features/support/pages/visual_editor_page.rb +++ b/features/support/pages/visual_editor_page.rb @@ -8,6 +8,7 @@ div(:content, class: 've-ce-documentNode ve-ce-branchNode') text_area(:describe_change, id: 've-init-mw-viewPageTarget-saveDialog-editSummary') div(:diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer') + div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down') a(:edit_ve, text: 'Edit') div(:heading_diff_view, class: 've-init-mw-viewPageTarget-saveDialog-viewer') div(:insert_references, class: 've-ui-window-title') @@ -35,7 +36,6 @@ span(:apply_changes, text: 'Apply changes', frame: frame) text_field(:content_box, index: 0, frame: frame) span(:create_new, text:'Insert reference', frame: frame) -div(:downarrow, class: 've-ui-dropdownTool-icon ve-ui-icon-down') span(:heading, text: 'Heading') div(:insert_reference, class: 've-ui-widget ve-ui-flaggableElement-primary ve-ui-buttonWidget ve-ui-window-applyButton', frame: frame) a(:leftarrowclose, class: 've-ui-widget ve-ui-iconButtonWidget ve-ui-icon-previous ve-ui-inspector-closeButton', frame: frame) @@ -44,16 +44,21 @@ span(:newpage_linksuggestion, text:
[MediaWiki-commits] [Gerrit] Update Wikibase, fix issue with property parser function - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Update Wikibase, fix issue with property parser function .. Update Wikibase, fix issue with property parser function Change-Id: Id13fb475f7eda81ff85cf7473e430eafbba48979 --- M extensions/Wikibase M extensions/WikibaseDataModel 2 files changed, 0 insertions(+), 0 deletions(-) Approvals: Hashar: Looks good to me, approved jenkins-bot: Verified diff --git a/extensions/Wikibase b/extensions/Wikibase index 354ab00..2c4b619 16 --- a/extensions/Wikibase +++ b/extensions/Wikibase -Subproject commit 354ab003651484dc849b7da437b695ff5754f1a0 +Subproject commit 2c4b619b62f62cec99798341aea7d15de1b8495a diff --git a/extensions/WikibaseDataModel b/extensions/WikibaseDataModel index b77b0dc..f6586db 16 --- a/extensions/WikibaseDataModel +++ b/extensions/WikibaseDataModel -Subproject commit b77b0dc3bae5707ff986d5a51d93f0fda62b4f3d +Subproject commit f6586dbc4f172f63f20ad2ef09314f32981c1d7a -- To view, visit https://gerrit.wikimedia.org/r/81233 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id13fb475f7eda81ff85cf7473e430eafbba48979 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: wmf/1.22wmf14 Gerrit-Owner: Aude aude.w...@gmail.com Gerrit-Reviewer: Hashar has...@free.fr Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] There is no need for any Git setup - change (qa/browsertests)
Zfilipin has uploaded a new change for review. https://gerrit.wikimedia.org/r/81242 Change subject: There is no need for any Git setup .. There is no need for any Git setup We use anonymous HTTP for all Git repositories. Change-Id: I00df5a1d773fa4f4e8616c024749258a2d4736c2 --- M docs/jenkins.md 1 file changed, 0 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests refs/changes/42/81242/1 diff --git a/docs/jenkins.md b/docs/jenkins.md index 76b4efb..620d42f 100644 --- a/docs/jenkins.md +++ b/docs/jenkins.md @@ -4,16 +4,6 @@ - Jenkins Manage Jenkins Manage Plugins Available ChuckNorris Plugin, Green Balls, Jenkins instant-messaging plugin, Jenkins IRC Plugin -## Git - -- Jenkins Manage Jenkins Configure System - -or - -- Jenkins (job) Configure - - CloudBees DEV@cloud Authorization CloudBees Public Key copy -- https://gerrit.wikimedia.org/r/#/settings/ssh-keys Add Key ... paste Add - # IRC Notification - Enable IRC Notification check -- To view, visit https://gerrit.wikimedia.org/r/81242 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00df5a1d773fa4f4e8616c024749258a2d4736c2 Gerrit-PatchSet: 1 Gerrit-Project: qa/browsertests Gerrit-Branch: master Gerrit-Owner: Zfilipin zfili...@wikimedia.org ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Add *_delta stats for vhtcpd ganglia. - change (operations/puppet)
BBlack has submitted this change and it was merged. Change subject: Add *_delta stats for vhtcpd ganglia. .. Add *_delta stats for vhtcpd ganglia. Augment vhtcpd data collected by ganglia with delta metrics which record the difference between the current sample and the prior sample. This should help make spotting the time rate of change differences easier for human eyes. - increase gmond script internal cache time to 30s. - add vhtcpd_inpkts_recvd_delta, vhtcpd_inpkts_sane_delta, vhtcpd_inpkts_enqueued_delta, vhtcpd_inpkts_dequeued_delta, vhtcpd_queue_overflows_delta, vhtcpd_queue_max_size_delta stats. Change-Id: I5b91a21751f1a40565645edeaf5456fb9a8e78e4 --- M modules/varnish/files/ganglia/ganglia-vhtcpd.py M modules/varnish/templates/ganglia/vhtcpd.pyconf.erb 2 files changed, 64 insertions(+), 1 deletion(-) Approvals: BBlack: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/varnish/files/ganglia/ganglia-vhtcpd.py b/modules/varnish/files/ganglia/ganglia-vhtcpd.py index 0994037..6c31566 100644 --- a/modules/varnish/files/ganglia/ganglia-vhtcpd.py +++ b/modules/varnish/files/ganglia/ganglia-vhtcpd.py @@ -25,7 +25,7 @@ CONF = { 'log': '/tmp/vhtcpd.stats', 'prefix': 'vhtcpd_', -'cache_secs': 5, +'cache_secs': 30, 'groups': 'vhtcpd', } METRICS = { @@ -192,6 +192,45 @@ 'units': 'count', 'description': 'Maximum number of packets in queue since startup/overflow', })) + +# *_delta metrics compute diff from prior sample using internal cache +descriptors.append(build_desc(skel, { +'name': CONF['prefix'] + 'inpkts_recvd_delta', +'call_back': get_delta, +'units': 'pkts', +'description': 'Multicast packets since last check', +})) +descriptors.append(build_desc(skel, { +'name': CONF['prefix'] + 'inpkts_sane_delta', +'call_back': get_delta, +'units': 'pkts', +'description': 'Sane packets since last check', +})) +descriptors.append(build_desc(skel, { +'name': CONF['prefix'] + 'inpkts_enqueued_delta', +'call_back': get_delta, +'units': 'pkts', +'description': 'Pakets enqueued since last check', +})) +descriptors.append(build_desc(skel, { +'name': CONF['prefix'] + 'inpkts_dequeued_delta', +'call_back': get_delta, +'units': 'pkts', +'description': 'Packets dequeued since last check', +})) +descriptors.append(build_desc(skel, { +'name': CONF['prefix'] + 'queue_overflows_delta', +'call_back': get_delta, +'units': 'count', +'description': 'Number of queue overflows since last check', +})) +descriptors.append(build_desc(skel, { +'name': CONF['prefix'] + 'queue_max_size_delta', +'call_back': get_delta, +'units': 'count', +'description': 'Maximum number of packets in queue since last check/overflow', +})) + return descriptors #end metric_init diff --git a/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb b/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb index 5d26129..f0ca14e 100644 --- a/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb +++ b/modules/varnish/templates/ganglia/vhtcpd.pyconf.erb @@ -47,4 +47,28 @@ name = vhtcpd_queue_max_size title = Maximum number of packets in queue since startup/overflow (count) } +metric { +name = vhtcpd_inpkts_recvd_delta +title = Multicast packets since last check +} +metric { +name = vhtcpd_inpkts_sane_delta +title = Sane packets since last check +} +metric { +name = vhtcpd_inpkts_enqueued_delta +title = Pakets enqueued since last check +} +metric { +name = vhtcpd_inpkts_dequeued_delta +title = Packets dequeued since last check +} +metric { +name = vhtcpd_queue_overflows_delta +title = Number of queue overflows since last check +} +metric { +name = vhtcpd_queue_max_size_delta +title = Maximum number of packets in queue since last check/overflow +} } -- To view, visit https://gerrit.wikimedia.org/r/80151 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I5b91a21751f1a40565645edeaf5456fb9a8e78e4 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis bda...@wikimedia.org Gerrit-Reviewer: BBlack bbl...@wikimedia.org Gerrit-Reviewer: jenkins-bot ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits