[Wikitech-l] Map internationalization beat: more on how our maps work with OSM data

2018-04-26 Thread Joe Matazzoni
Following up on yesterday’s announcement encouraging people to try out 
internationalized maps on testwiki [1], I added more information today [2] 
about how the feature works. 

In particular, in yesterday’s post we introduced the new map parameter and 
value, lang=“local”, which causes a map to display in the language of the 
territory mapped—essentially turning off internationalization and reverting to 
the current (soon to be former) map behavior, which displays maps only in the 
language(s) of the territory mapped.  The new post dives into the OpenStreetMap 
data quirks that make a such a feature necessary and explains when you might 
want to use it.  

So if you’re interested in wiki maps, have a look. You can see the 
internationalization features in action on a sample page I put on testwiki [3]. 
And please remember to leave your feedback on the Map Improvements 2018 talk 
page [4]. We’re listening! 

[1] 
https://www.mediawiki.org/wiki/Map_improvements_2018#April_25,_2018,_You_can_now_try_out_internationalization_(on_testwiki)
 

[2] 
https://www.mediawiki.org/wiki/Map_improvements_2018#April_26,_2018:_OSM_name_data_quirks_and_the_uses_of_lang=%E2%80%9Clocal%E2%80%9D
 

 
[3]  https://test2.wikipedia.org/wiki/Map_internationalization_examples 
 
[4] https://www.mediawiki.org/wiki/Talk:Map_improvements_2018 
 
_

Joe Matazzoni 
Product Manager, Collaboration
Wikimedia Foundation, San Francisco

"Imagine a world in which every single human being can freely share in the sum 
of all knowledge." 




___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] Changes to SWAT deployment policies, effective Monday April 30th

2018-04-26 Thread Greg Grossmeier
Hello,

I have made two changes to SWAT policies today.

First, we now disallow multi-sync patch deployments. See T187761[0].
This means that the sync order of files is determined by git commit
parent relationships (or Gerrit's "depends-on"). This is to prevent SWAT
deployers from accidentally syncing two patches in the wrong order.

Second, we are reducing the number of allowed patches from 8 to 4. This
is to reduce stress on the SWAT deployer as well as set expectations for
requesters on the pace of the windows. See the approximate best case
time spent breakdown[1] for how we came to this number.

I've updated the on-wiki documentation on wikitech[2][3].


Thank you for flying scap,

Greg


[0] https://phabricator.wikimedia.org/T187761
[1] 
* +2/Wait for Jenkins to merge - 2 min
* prepare git on tin - 1 min
* Deploy to mwdebug - 1 min
* Verify on mwdebug - 3 min
* Deploy to production - 1 min
* Verify & wait/watch logs - 2 min
[2] 
https://wikitech.wikimedia.org/w/index.php?title=SWAT_deploys=prev=1789212
[3] 
https://wikitech.wikimedia.org/w/index.php?title=SWAT_deploys=next=1789212

-- 
| Greg GrossmeierGPG: B2FA 27B1 F7EB D327 6B8E |
| Release Team ManagerA18D 1138 8E47 FAC8 1C7D |

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Brad Jorsch (Anomie)
On Thu, Apr 26, 2018 at 3:55 PM, Kunal Mehta  wrote:

> | includes/Storage/RevisionSlots.php|  58.33 |  49.35 |
>

Most of the issue there is that hasSameContent() is not being recorded as
"covered" at all because you forgot the @covers annotation on
testHasSameContent().

I also see an added uncovered line in setSlotsInternal(). Probably that too
is actually being covered but nothing has a @covers annotation for the
method.


> | includes/Storage/SlotRecord.php   |  94.64 |  94.51 |
>

Coverage of all the existing code is unchanged. The patch adds 13 lines in
hasSameContentAs(), but only covers 12 of them with tests. Line 594 was
missed, which explains the slight decrease.

In this case no method-level @covers is needed because SlotRecordTest has
"@covers \MediaWiki\Storage\SlotRecord" at the class level.


-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Trey Jones
If you haven't checked out https://doc.wikimedia.org/cover/, you should!
You can see what code is covered (and by which tests) and what code is not
covered if you want to generally improve test coverage.

Two things:

1) A coverage report like that, instead of just numbers showing the
relative change, would make it much easier to figure out what needs test
coverage but doesn't have it when submitting a patch to Gerrit.

2) From looking at the coverage reports, a pattern I've seen, at least in
the generally well-covered code I work with most, is that failure checks
are the general kind of code most likely to not be covered by tests,
especially the cases that are never supposed to happen, like something
being unexpectedly null, empty, or undefined.

My new unofficial (and somewhat inefficient) plan is to cover what I can
when I write new code, but expect test coverage to sometimes decrease. Once
the code is merged, and the test coverage report updates, I can find the
specific code branches that aren't covered and add more tests. It's not
efficient, but it does let you ratchet up the coverage over time much more
easily than before.

—Trey

Trey Jones
Sr. Software Engineer, Search Platform
Wikimedia Foundation

On Thu, Apr 26, 2018 at 3:02 PM, Daniel Kinzler  wrote:

> Hi all!
>
> While I think it's great that CI is making sure that test coverage
> improves, I'm
> struggeling with making this work for me. It seems to me the stats that
> are used
> to detect test coverage are faulty, or at least unintuitive.
>
> See for instance . Please
> explain to
> me how this decreases test coverage
>  patch/2480/console>.
> What am I missing? As far as I can see, all new code has tests. I'm having
> similar issues with several of my patches.
>
> Also, am I correct in thinking that I could introduce a completely new
> 1000 line
> class with no tests, and that would *not* be detected as decreasing
> coverage,
> since the new class didn't have any coverage before?
>
> --
> Daniel Kinzler
> Principal Platform Engineer
>
> Wikimedia Deutschland
> Gesellschaft zur Förderung Freien Wissens e.V.
>
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Kunal Mehta
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

Hi,

On 04/26/2018 12:02 PM, Daniel Kinzler wrote:
> Hi all!
> 
> While I think it's great that CI is making sure that test coverage
>  improves, I'm struggeling with making this work for me. It seems 
> to me the stats that are used to detect test coverage are faulty, 
> or at least unintuitive.
> 
> See for instance . 
> Please explain to me how this decreases test coverage 
> .
>
>
>
> 
What am I missing? As far as I can see, all new code has tests. I'm havi
ng
> similar issues with several of my patches.

Two files have less coverage than they did before your patch:

+---+++
| Filename  | Old %  | New %  |
+---+++
| includes/Storage/RevisionSlots.php|  58.33 |  49.35 |
| includes/Storage/SlotRecord.php   |  94.64 |  94.51 |
+---+++

The second one is probably unfair to complain on, but guessing by the
percentage, the first one is likely a legitimate loss of test coverage.

phpunit-patch-coverage will claim coverage is lower if any file
decreases in coverage percentage.

There's a pre-existing task called "phpunit-patch-coverage logic on
when coverage goes down in one file and up for others needs
improving"[1], which probably is what you're describing. Suggestions
on how to handle these cases is welcome!

[1] https://phabricator.wikimedia.org/T188687

- -- Legoktm
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEE+h6fmkHn9DUCyl1jUvyOe+23/KIFAlriLqAACgkQUvyOe+23
/KJmBg/+IexdTh+TepaFpejFDnyqxcIQbFETBJKoC4r0G+YSd8LIu9KAY52Zc/uf
OoeYNbT9z5eTqR1ckS95T3nVOF29y+Yylky1VX262vQaorEcPADtXAqglLCmRFg4
F/c4RdQdIABeagoYNivCO49pFA8tARKBoiJgQDR0CLoeh7Cs0VNoSfNnlTXdGduA
o8R74ScOswbBfTsm3ybrfwuiKYADZOE1U51ftKeJmMRKoF9+lE9OiFfOF/iI4xNA
SEXtyqgm9tJY2NqmVNkxUsAfcGa+sHKcBebiIkYxEoeV8Knjn3vs2n2jKJcssddO
wQvDGv4N7XKieGcMxkM1SN36q4GCvOYFeQYh9FuScpW36XnGF8cHNtPel+CcFu52
IUGAeZMZ9FRQ2sjhDRCwxwFy1fDVy5Smnew4surmBWDzF6nrBGMEeq23DDknyx+U
Lf2+1wqbhGmBdzW2c8cmhQOdrfkq9j9IFXHPqkhXC3k/FClKhn7bz9tPeVsPnFJX
16q6vBbln1ntPCJUTST7tlp3ciAoxj4r3gopwGdcDXNGf53BgKMa1YFQhWmqlx/D
XASrc/8VCGRIsbPEMNcBmJs93eLvvL7UIOUcsJ2ouPqDb6G+brHyKanTfPUQwnvj
i+KzYpdYUkH+6a5OAo2A09hDtx5ALmHH3pm+eKcRicG61OHBGHY=
=uP+6
-END PGP SIGNATURE-

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Isarra Yos

On 26/04/18 19:02, Daniel Kinzler wrote:

Also, am I correct in thinking that I could introduce a completely new 1000 line
class with no tests, and that would *not* be detected as decreasing coverage,
since the new class didn't have any coverage before?


Given that I've done similar (not a new class, but a bunch of functions 
to an existing test-free class) and had it not complain, quite possibly! 
Is weird, but given that the class in question is terrifying soup, I'm 
glad it didn't complain there because I wouldn't even know where to 
begin adding coverage.


-I


___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] "PHP test coverage decreased" - really?

2018-04-26 Thread Daniel Kinzler
Hi all!

While I think it's great that CI is making sure that test coverage improves, I'm
struggeling with making this work for me. It seems to me the stats that are used
to detect test coverage are faulty, or at least unintuitive.

See for instance . Please explain to
me how this decreases test coverage
.
What am I missing? As far as I can see, all new code has tests. I'm having
similar issues with several of my patches.

Also, am I correct in thinking that I could introduce a completely new 1000 line
class with no tests, and that would *not* be detected as decreasing coverage,
since the new class didn't have any coverage before?

-- 
Daniel Kinzler
Principal Platform Engineer

Wikimedia Deutschland
Gesellschaft zur Förderung Freien Wissens e.V.

___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l