These are chat archives for coala/coala-bears

1st
Jun 2018
jsecrest
@jsecrest
Jun 01 2018 05:02

So, @ishanSrt , to expand on what you were saying

imo you can add a quick patch by adding an extra setting which when enabled, will detect inconsistencies for all cell types, and appropriate tests

That might be a little bit of an undertaking - I don't think we'd want to apply pep8 to a markdown cell right? So I'd need to add a feature for markdown checking, and I'm not sure what other things we'd need to add... line length and what else?

For anybody who's interested, I'm trying to flesh out the best way to handle coala/coala-bears#2465 - see my couple of comments.
Ishan Srivastava
@ishanSrt
Jun 01 2018 05:07

and I'm not sure what other things we'd need to add... line length and what else?

those are supposed to be controlled by the other params

I don't think we'd want to apply pep8 to a markdown cell right?

What I suggested was to create an additional argument, which when True, will apply the settings provided by the other params to all the cells

that is if this feature seems desirable
jsecrest
@jsecrest
Jun 01 2018 05:08
ah, okay, that makes sense. I don't suppose you can link any issues where that's been done before? I've never written a bear and I'm kind of floundering around and learning things (which is great!) I'd love to see an example of how that would work.
jsecrest
@jsecrest
Jun 01 2018 05:09
Cool. I'll start by looking at that.
Vaibhav Rai
@RaiVaibhav
Jun 01 2018 05:12
@jsecrest I think you need BEAR_DEPS?
jsecrest
@jsecrest
Jun 01 2018 05:13
Sorry, I'm not following. What do I need?
Vaibhav Rai
@RaiVaibhav
Jun 01 2018 05:14
To add the the feature in current bear, can't say confirm that this is exactly what you need
Palash Nigam
@palash25
Jun 01 2018 05:15
@jsecrest some bear classe have this field called BEAR_DEPS which contains a set of bears that that bear is dependent on
jsecrest
@jsecrest
Jun 01 2018 05:15
ah, cool
that probably is exactly what I'd want if the feature was added to the bear
Vaibhav Rai
@RaiVaibhav
Jun 01 2018 05:16
:+1:
jsecrest
@jsecrest
Jun 01 2018 05:18
so in coala/coala-bears#2465 i'm trying to figure out a little about how we do things here - as seen in my comments I've figured out that the bear is working as intended and that the line length issue is actually a feature request. I'm not sure if I'm supposed to just add the feature as a part of the issue or if we close the issue and start a new one as a feature request.
I'm also not sure if the feature for checking jupyter notebook markdown should be part of the PEP8NotebookBear or if it should be its own MarkdownNotebookBear
In my head it seems like PEP8NotebookBear should just be for PEP8 as per the name, but maybe that's not how we go about things.
Vaibhav Rai
@RaiVaibhav
Jun 01 2018 05:20
Take a worst case, It may happen that you have to add both :stuck_out_tongue: , and issue can be opened anytime
jsecrest
@jsecrest
Jun 01 2018 05:20
ha ha
Ishan Srivastava
@ishanSrt
Jun 01 2018 05:21
No BEAR_DEPS won’t help,
its just for preprocessing the results of the entire file_dict with another bear, while what is needed is to pass selective text to the bear.
jsecrest
@jsecrest
Jun 01 2018 05:22
Wouldn't that be helpful if I wanted to run a markdown check on a markdown cell?
Ishan Srivastava
@ishanSrt
Jun 01 2018 05:23
No, you will have to implement this feature yourself
jsecrest
@jsecrest
Jun 01 2018 05:23
Ah, okay.
Ishan Srivastava
@ishanSrt
Jun 01 2018 05:24
not sure about the standard rulesets for markdown in jupyter notebooks, but for starters just add an extra argument to the bear which will use the settings from the other params for all the cells instead of just for the code
jsecrest
@jsecrest
Jun 01 2018 05:24
Oh, after re-reading your remark I think I understand. So file_dict would be our list of all files to check and it would check the full file not a slective part right?
Ishan Srivastava
@ishanSrt
Jun 01 2018 05:24
yes
jsecrest
@jsecrest
Jun 01 2018 05:25
got you, I think I'm starting to understand.
Ishan Srivastava
@ishanSrt
Jun 01 2018 05:25
afterwards check the rule sets for markdown in jupyter notebooks and add extra settings to the bear which will only apply ot markdown cells
jsecrest
@jsecrest
Jun 01 2018 05:27
Okay that makes sense.
Vaibhav Rai
@RaiVaibhav
Jun 01 2018 06:00

No BEAR_DEPS won’t help,

:+1:

Ishan Srivastava
@ishanSrt
Jun 01 2018 06:12
@jayvdb coala/coala-bears#2519 blocking Green Mode Project
John Vandenberg
@jayvdb
Jun 01 2018 07:03
Nope
As i sad in cep bool are tristate
Ishan Srivastava
@ishanSrt
Jun 01 2018 07:05
No way to extract type annotations to differentiate b/w a bool None and a normal None
maybe it can be achieved if type annotations are made with contracts
John Vandenberg
@jayvdb
Jun 01 2018 07:14
what we could do is use type slannotation (bool, NoneType) where None is permitted
But, that will be almost all of them
Better to have a strict_bool which requires only True or False.
Ishan Srivastava
@ishanSrt
Jun 01 2018 07:17
so what are you recommending?

i submit a PR with

Better to have a strict_bool which requires only True or False.

?
John Vandenberg
@jayvdb
Jun 01 2018 07:18
Whichever is the least amount of change
This should have been in the cep
You are effectively requiring all bear settings comply with a new rule.
Ishan Srivastava
@ishanSrt
Jun 01 2018 07:21
i can add custom classes which emit out None
i see that they are intended to apply no rule for the settings
John Vandenberg
@jayvdb
Jun 01 2018 15:01
Yup. It is by design tristate