These are chat archives for coala/coala-bears

20th
Jul 2018
John Vandenberg
@jayvdb
Jul 20 2018 03:56
@arjunsinghy96, coala/coala-bears#1669 needs a rebase
John Vandenberg
@jayvdb
Jul 20 2018 05:41
@ishanSrt coala/coala-quickstart#236 should be easy to get in
Ishan Srivastava
@ishanSrt
Jul 20 2018 05:45
👍
John Vandenberg
@jayvdb
Jul 20 2018 07:00
@MorTD , would you like to do coala/documentation#447 ? ;)
Ishan Srivastava
@ishanSrt
Jul 20 2018 08:41
coala/coala-quickstart#236 done except gitmate broke down
do we have a bug about that?
@satwikkansal ^
Ankit Joshi
@MacBox7
Jul 20 2018 09:47
No. It's I think because of my changes.
Not in master.
John Vandenberg
@jayvdb
Jul 20 2018 09:48
quickstart had a bug about intermittent failures
it required two pushes to work, iirc
Ankit Joshi
@MacBox7
Jul 20 2018 09:48
coala_quickstart doesn't runs coala. So why are we integrating NoFutureImportBear.
also all repos use gitmate, which does run coala
Ankit Joshi
@MacBox7
Jul 20 2018 09:50
Yeah. It wasn't there in CircleCI.
The setup.py was converting coala-pyflakes to coala==pyflakes. Thus the issue.
John Vandenberg
@jayvdb
Jul 20 2018 09:54
ah yes, that is a bug in the moban . shall I assign to you?
Ankit Joshi
@MacBox7
Jul 20 2018 09:55
Yeah. Sure.
John Vandenberg
@jayvdb
Jul 20 2018 09:59
assigned and suggestion on https://gitlab.com/coala/mobans/issues/51
Ishan Srivastava
@ishanSrt
Jul 20 2018 09:59
NoFutureImportBear isn’t there in coala-bears version QuickStart is dependent upon. Won’t that result in an error on running coala on the local repo if we directly add it to .coafile?
John Vandenberg
@jayvdb
Jul 20 2018 10:01
@ishanSrt coala should warn it cant find the bear, but otherwise be ok
test it ;-)
Ankit Joshi
@MacBox7
Jul 20 2018 10:07
The tests are passing on CI. However I have to run python setup.py install twice on my local PC. Not sure what is the reason.
Ankit Joshi
@MacBox7
Jul 20 2018 10:27
Should I create a PYPI distribution for coala-pyflakes?
John Vandenberg
@jayvdb
Jul 20 2018 10:28
no.
virresh hasnt either yet. distribution will come after it has been tested on coala repos, and you repo moved into coala
Ankit Joshi
@MacBox7
Jul 20 2018 10:28
okay.
Nitanshu
@nvzard
Jul 20 2018 11:31
This InvalidLinkBear is killing me recently. https://github.com/coala/corobo/pull/572#issuecomment-406569979
I can't figure are what wrong with it. Earlier gitmate-bot showed errors but those used to get fixed by a force push but now even CI have started to fail due to it. Not able to fix it using force pushes
John Vandenberg
@jayvdb
Jul 20 2018 11:41
That is gitmate bot - Yuki is on it
Ishan Srivastava
@ishanSrt
Jul 20 2018 11:43
The links are broken from travis comments
the example link for gitlab merge request should be added to ignore the invalid link bear
while the lmgtfy site diesn’t have a SSL certificate
so https —> http should fix it
Nitanshu
@nvzard
Jul 20 2018 11:49
but InvalidLinkBear in not showing any warning for the lmgtfy and gitlab locally, nor it was showing warnings few days ago on the CI builds. Something must have went wrong recently.
maybe lmgtfy's ssl certificate got expired recently. Not sure what's wrong with gitlab's link
Ishan Srivastava
@ishanSrt
Jul 20 2018 11:52
that merge link is invalid. its just an example https://gitlab.com/a/b/merge_requests/2
Mor Elmaliach
@MorTD
Jul 20 2018 12:04
@jayvdb I would like to! yes
John Vandenberg
@jayvdb
Jul 20 2018 12:36
assigned
thx
@anctartica fyi you are missing an eol in the generated file ;-)
the jinja rules for adding/suppressing eol's can be tricky
otherwise -- looking good
Ankit Joshi
@MacBox7
Jul 20 2018 12:46
@jayvdb did some research and this is what I think would be best.
John Vandenberg
@jayvdb
Jul 20 2018 12:54
replied
saksham189
@saksham189
Jul 20 2018 13:05
cabal is not able to parse the version
John Vandenberg
@jayvdb
Jul 20 2018 13:06
ok. strip the tail of the version
saksham189
@saksham189
Jul 20 2018 13:13
in moban.yaml?
John Vandenberg
@jayvdb
Jul 20 2018 13:22
no, in the jinja template, remove the bit that cabal wont parse
saksham189
@saksham189
Jul 20 2018 13:23
so we are not using a variable anymore
John Vandenberg
@jayvdb
Jul 20 2018 13:40
you are using the part of the variable that cabal can understand
and add a comment about why you are simplifying the version
saksham189
@saksham189
Jul 20 2018 14:23

the jinja rules for adding/suppressing eol's can be tricky

I tried too many times now but I am not able to get a eol without leaving a blank line in the template

John Vandenberg
@jayvdb
Jul 20 2018 14:42
@MacBox7 @nemaniarjun @yukiisbored , want to help with jinja syntax at coala/coala-bears#2625
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 15:58
@jayvdb I have replied there have a look
Test failed on travis on some TextLintBear?
John Vandenberg
@jayvdb
Jul 20 2018 16:03
@RaiVaibhav replied
Mor Elmaliach
@MorTD
Jul 20 2018 16:07
I would love it if someone could explain what's not right with my PR for #2585, I followed the guidelines and wrote it as it should 😕
Pr is #2624
saksham189
@saksham189
Jul 20 2018 16:34
coala/coala-bears#2627
John Vandenberg
@jayvdb
Jul 20 2018 17:12
thx @anctartica . now can you stack #2625 on top of #2627
Ishan Srivastava
@ishanSrt
Jul 20 2018 17:27

@MorTD listen to gitmate bot and @MacBox7’s comments

I followed the guidelines and wrote it as it should

that doesn’t seem to be the case. go through it again and amend you commit message.

Vaibhav Rai
@RaiVaibhav
Jul 20 2018 17:33
Anyone know how to test Bear result which have length greater >=2 with one case i.e, bear it yielding 2 results object I want to test both
Currenlty I am doing something like this
https://bpaste.net/show/3c0d9579259f
didn't work :/
It always says list differ, seems like its not considering the second element of list
but when I remove the additional info from both it checks both element of list
Ishan Srivastava
@ishanSrt
Jul 20 2018 17:38
If you don’t use bear test helper, it would be quite easy
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 17:39
yeah I know :P, but I want to test full John any help here?
Ishan Srivastava
@ishanSrt
Jul 20 2018 17:43
what’s your yield statement in the bear?
Ishan Srivastava
@ishanSrt
Jul 20 2018 17:47
but where are you yielding more than one results?
looking at what you are testing it against you should be yielding something like
yield [result obj 1, result obj 2]
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 17:47
I am not safety will
safety.check will do the work
Ishan Srivastava
@ishanSrt
Jul 20 2018 17:50
what you are testing it against is wrong which is a list of 2 result objects
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 17:54
safety.check returns a list which contains two elements for for loop will run twice so 2 results object will be there
Ishan Srivastava
@ishanSrt
Jul 20 2018 17:57
they will be yielded one after the other
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 17:57
I am using safety version 1.8.2, can you check once I run the debugger and verified that part
Ishan Srivastava
@ishanSrt
Jul 20 2018 18:00
its just this
def fun():
    for i in range(2):
        yield i

if __name__  == '__main__':
    a = fun()
    for i in a:
        print(i)

Output:

0
1

Not

[0, 1]

😉

Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:02

change to

if __name__  == '__main__':
    a = fun()
    for i in a:
        yield i

Now we will get a generator which after that getting converted to list like list(results) then will have to two results object

Ishan Srivastava
@ishanSrt
Jul 20 2018 18:03
^^^ whats that? yield without a function?
even if you convert it to a list and iterate through it each element output will be the same as above
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:04
that fun() you demonstrated is actually a safety.check() which is returning a list,
Ishan Srivastava
@ishanSrt
Jul 20 2018 18:05
yeah execute is the middle man here which is converting it to list
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:05

yeah execute is the middle man here which is converting it to list

Yeah

Ishan Srivastava
@ishanSrt
Jul 20 2018 18:06
As i said each element will not change
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:07
You said there is one result object if I understand correctly?
Ishan Srivastava
@ishanSrt
Jul 20 2018 18:07

No

they will be yielded one after the other

Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:08
yeah but in last we will get two results object IMO?
Ishan Srivastava
@ishanSrt
Jul 20 2018 18:12
oh ok then never mind 😛, thought that we used bear testing helper by iterating through results
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:15
I am also not confirmed still :p
Ishan Srivastava
@ishanSrt
Jul 20 2018 18:16
set self.maxDiff = None in bear test helper to get the full diff and I guess you will be able to see the value of both args of the assert statement properly inspected to the value of each sub object’s variables
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 18:17
yeah doing same, but some strange things going on here :laughing:
Vaibhav Rai
@RaiVaibhav
Jul 20 2018 21:19
@jayvdb Updated the test of PySafetyBear have a look coala/coala-bears#2626