These are chat archives for coala/coala-bears

2nd
Nov 2017
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:05

Can anyone help me i have installed all requirements form coala and coala-bears
then when i run

coala --bears MarkdownBear --files README.md -V --flush-cache

It shows

(coala-venv) vaibhav@vaibhav-HP-Notebook:~/test$ coala --bears MarkdownBear --files README.md -V --flush-cache
[WARNING][11:32:59] 'cli' is an internally reserved section name. It may have been generated into your coafile while running coala with `--save`. The settings in that section will inherit implicitly to all sections as defaults just like CLI args do.Please change the name of that section in your coafile to avoid any unexpected behavior.
[DEBUG][11:33:00] Platform Linux -- Python 3.5.2, coalib 0.12.0.dev20171031222703
[DEBUG][11:33:00] The file cache was successfully flushed.
Executing section cli...
[DEBUG][11:33:00] Files that will be checked:
/home/vaibhav/test/README.md
[ERROR][11:33:00] The bear MarkdownBear does not fulfill all requirements. 'remark' is not installed.
Remark is not installed
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:13
I tried to install remark-cli and others manually through npm but failing , It should have to install automatically when we install coal -bears,need to know someone else also failing?
John Vandenberg
@jayvdb
Nov 02 2017 06:15
there are lots of ways it can fail; they are local machine issues. could be PATH related, or NODE_PATH related, etc, etc
The easiest way to avoid all that is to use our Docker image, but beware .. it is rather large
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:16
Thats why i installed it in virtual-env
ok
John Vandenberg
@jayvdb
Nov 02 2017 06:16
virtualenv is a Python thing
node/npm has no idea about Python virtualenv
it would be lovely if there was one tool which virtual-env-ised all languages at the same time.
they do exist, but they are usually also part of frameworks and also want to virtualise AWS and everything else
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:19
Oh ok
Need to know if you want to run MarkDownBear, how you will start with
John Vandenberg
@jayvdb
Nov 02 2017 06:20
well the first step is to see if it is PATH related. which remark ?

Its like

NpmRequirement('remark-cli', '2'),
                    NpmRequirement('remark-lint', '5'),
                    NpmRequirement('remark-validate-links', '5')

these 3 requirement have to get installed automatically when we install coala-bears

John Vandenberg
@jayvdb
Nov 02 2017 06:24
dude, you asked for help. what is the output of which remark ?
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:25
The bear MarkdownBear does not fulfill all requirements. 'remark' is not installed.
John Vandenberg
@jayvdb
Nov 02 2017 06:26
on your command line, please type which remark, press enter, and tell me what it replied with
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:27
(coala-venv) vaibhav@vaibhav-HP-Notebook:~/test$ which remark
(coala-venv) vaibhav@vaibhav-HP-Notebook:~/test$
nothing :sweat_smile:
I think first i have to read first https://github.com/wooorm/remark-lint
John Vandenberg
@jayvdb
Nov 02 2017 06:29

I tried to install remark-cli and others manually through npm but failing

please do npm install remark-cli and paste the results somewhere and provide a link here.

fwiw, we have a bug in http://docs.coala.io/en/latest/Users/Install.html#js-dependencies - npm install -g does not work
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:32
It works https://pastebin.com/ah9DNdEQ
but then also MarkdownBear showing same error
I think its a PATH problem
John Vandenberg
@jayvdb
Nov 02 2017 06:33
ok, so you should have a directory /home/vaibhav/test/node_modules/.bin which you need to add to your PATH
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:36
I have /home/vaibhav/test/node_modules but not /home/vaibhav/test/node_modules/.bin
John Vandenberg
@jayvdb
Nov 02 2017 06:36
hmm, ok, find find /home/vaibhav/test/node_modules -name remark
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:36
in node_module I have all remark-cli,remark-lint and others
John Vandenberg
@jayvdb
Nov 02 2017 06:37
and look for a bin/remark somewhere in there
probably /home/vaibhav/test/node_modules/remark-cli/bin/remark
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:40
Screenshot from 2017-11-02 12-08-27.png
Nope only these 3 files
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 06:46
I will read more about it as i am definetely missing something
John Vandenberg
@jayvdb
Nov 02 2017 06:47
ok, remark-lint is not necessary. you only need to get remark-cli working.
Adhityaa
@adtac
Nov 02 2017 06:49

The easiest way to avoid all that is to use our Docker image, but beware .. it is rather large

I'm wondering if it's feasible to offer docker images with the user selecting the languages they want. Like, if they select python, javascript, css, then just those dependencies and bears will be installed. Basically select checkboxes and you get a Dockerfile?

John Vandenberg
@jayvdb
Nov 02 2017 06:49
yup. definitely doable, discussed many times, but nobody does it ;-)
Adhityaa
@adtac
Nov 02 2017 06:50
ok, I'll hack on this today :)
John Vandenberg
@jayvdb
Nov 02 2017 06:50
two relevant issues in the repo , offering tools which make it quite maintainable to do that
rocker , and ? docker-make
I was going down the rocker approach. but got pulled away with work. and now the docker repo is busted as usual.
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 07:08
One thing white spaces in commit message did't get detected , its actually possible to make gitmate bot checks that whitespace like SpaceConsistencyBear??
John Vandenberg
@jayvdb
Nov 02 2017 07:08
gitmate-bot uses coala and the .coafile ;-)
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 07:08
ok :+1:
Monal Shadi
@Monal5031
Nov 02 2017 07:36

I will read more about it as i am definetely missing something

Try installing remark globally, I had the same error too. But installing globally fixed it :sweat: @RaiVaibhav

Vaibhav Rai
@RaiVaibhav
Nov 02 2017 07:37
:+1:
Adhityaa
@adtac
Nov 02 2017 07:48
.
├── cpp.docker
├── go.docker
├── index.html
├── prefix.docker
├── python.docker
├── r.docker
├── spectre.min.css
└── suffix.docker
so you just put the bits relevant to go in go.docker
John Vandenberg
@jayvdb
Nov 02 2017 07:50
nod. nice UI. that isnt the hard part :P
Adhityaa
@adtac
Nov 02 2017 07:50
I'm splitting the existing Dockerfile into .docker bits right now
so that it actually works (and is not just "<language> stuff" :P)
John Vandenberg
@jayvdb
Nov 02 2017 07:51
the 'problem' is testing the docker works.
Adhityaa
@adtac
Nov 02 2017 07:51
re UI: it's all spectre.css (you don't want to see my CSS skills)
yeah
John Vandenberg
@jayvdb
Nov 02 2017 07:51
actually that can be somewhat avoided by assuming that the full docker works, but the full docker is regularly broken
testing only part of the docker image requires deleting all the other tests
and ... you're splitting based on language of the linter, not the language of the target files
but ... language of the linter is a good start
Adhityaa
@adtac
Nov 02 2017 07:53
right, but that's easily fixable
testing, however, isn't :P
maybe a GSoC project next year ;)
John Vandenberg
@jayvdb
Nov 02 2017 07:54
meh, the kids will have sorted it out by end of GCI
Adhityaa
@adtac
Nov 02 2017 12:56
I'm starting to think the haskell ecosystem is worse than the javascript one. Downloading dependencies for the past few minutes...
John Vandenberg
@jayvdb
Nov 02 2017 13:23
oh it is
modghc (?) is the other nightmare
Adhityaa
@adtac
Nov 02 2017 13:36
managed to get ghcmodbear running :)
doing a bunch of other bears now (just as a proof of concept)
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 13:38
little confusion here --apply-patches works for all the all the bears (which consist this function) or for only Global Bear??
Adhityaa
@adtac
Nov 02 2017 13:39
all bears
that supply a patch
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 13:39
:+1: Thanks
Adhityaa
@adtac
Nov 02 2017 13:40
you could just test this :)
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 13:41
you could just test this :)
:+1:
Adhityaa
@adtac
Nov 02 2017 13:46
http://adtac.pw:8003/ I come bearing more bears :)
Niklas
@NiklasMM
Nov 02 2017 13:46
GTFOBear
mmmh
Adhityaa
@adtac
Nov 02 2017 13:47
wait a second, this is the goal of cib
@Adrianzatreanu I just did your gsoc project for you
John Vandenberg
@jayvdb
Nov 02 2017 13:47
haha
Adhityaa
@adtac
Nov 02 2017 13:55
https://github.com/coala/dockerfile-builder is an interface to build your own Dockerfile with just the bears you want (so that the image size is much smaller than it is now). Devs with coala-docker experience can add their own bears. See a couple of existing .docker files for an example.
@/all ^
John Vandenberg
@jayvdb
Nov 02 2017 13:57
:+1:
Vaibhav Rai
@RaiVaibhav
Nov 02 2017 13:57
:clap:
Arjun Singh Yadav
@arjunsinghy96
Nov 02 2017 14:04
Great :+1:
John Vandenberg
@jayvdb
Nov 02 2017 14:05
we really need to create the docker images, as most people dont know how, and us doing it is simpler than everyone doing it for themselves
at least for common combinations
Adhityaa
@adtac
Nov 02 2017 14:07
there are 2^n combinations though?
John Vandenberg
@jayvdb
Nov 02 2017 14:08
ya, however ppl who want the tiniest possible image are not going to use our generator, as it doesnt give the tiniest image
so 20 common combinations is probably enough to make 95% of ppl happy
Adhityaa
@adtac
Nov 02 2017 14:13
:+1:
Saurav Singh
@damngamerz
Nov 02 2017 14:49
wow great :clap: though I have an extension idea about this....we can meld this into dockercompose builder which will create an image and even run it for you...much more simplicity :tada: I can create an issue about this but need your thoughts on this first @adtac
Adhityaa
@adtac
Nov 02 2017 15:03
I don't have any experience with docker-compose
Saurav Singh
@damngamerz
Nov 02 2017 15:03
I can do it....or i will grab some one who can on Pycon Devsprint :P
Mischa Krüger
@Makman2
Nov 02 2017 20:05

ya, however ppl who want the tiniest possible image are not going to use our generator, as it doesnt give the tiniest image
so 20 common combinations is probably enough to make 95% of ppl happy

though if we really make some very simple interface like ./generate bearA bearB we don't have to provide even 20 ;)