Open jayvdb opened 8 years ago
I guess they won't be installed by default then?
right, which will speed up installation and reduce headaches for all.
There are actually two sets of bear dependencies.
Direct imports
bears/python/PEP8Bear.py
and bears/python/PEP8NotebookBear.py
imports autopep8
directly.
bears/natural_language/LanguageToolBear.py
imports guess_language
and language_check
directly.
bears/python/PyCommentedCodeBear.py
imports eradicate
directly.
bears/general/InvalidLinkBear.py
imports requests
directly.
etc
Indirect imports
bears/cmake/CMakeLintBear.py
invokes cmakelint
, which depends on cmakelint
etc.
IMO these are all optional. Without them, the bear wont run, but coala will run and other bears can be used.
Which means that dependency_management
may be the only actual requirement, as almost every bear needs it, and even that requirement will probably be relocated into the main coala
setup.py.
how would I install optional packages for a bear (or even all bears if I want to) conveniently?
how would I install optional packages for a bear (or even all bears if I want to) conveniently?
See SomeProject[foo, bar]
in https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers
For all bears, pip install coala-bears[alldeps]
as mentioned in the issue description.
We can make as many extras as we like, with as many overlapping subsets as we want.
e.g. bear specific extras
pip install coala-bears[bear1,bear2,etc]
and language specific extras
pip install coala-bears[python,php,etc]
And a user could mix them like
pip install coala-bears[python,InferBear,etc]
For all bears, pip install coala-bears[alldeps] as mentioned in the issue description.
ah sorry seems I've missed that in the text :)
A lot of auditing required between requirements.txt and the generated version; e,g. https://github.com/coala/coala-bears/issues/1212
And PipRequirements
(all of package_management) is not ready for this. See https://gitlab.com/coala/package_manager/issues/6
Now, the only requirements needed by coala-bears is coala
. I think it would be good if we kept it that way.
I've done most of the fixes to python dependencies (see https://github.com/coala/coala-bears/issues/1231 and https://github.com/coala/coala-bears/pull/1230), and then will PR a "switch to using generated bear-requirements.txt".
There are then some extra GCI tasks I can create to improve setup.py and the requirements generator.
Not quite solved.
@jayvdb status? do we still need to remove things?
Ya, we need to remove things from setup.py . Ideally we fix the repos that depend on bears being automatically installed. e.g. the docker, but it is broken atm due to https://github.com/coala/docker-coala-base/issues/87
Ideally we fix the repos that depend on bears being automatically installed.
coala and the docker have been fixed to use alldeps
.
coala-atom CI installs coala-bears, which may need fixing, but .. CircleCI is broken anyway: https://github.com/coala/coala-atom/issues/38
Presumably other editor plugin repos also need to be checked.
This problem has caused a huge breakage as VintBear is broken until https://github.com/Kuniwak/vint/pull/217 is fixed. Everything fails as can be seen at https://github.com/coala/coala/pull/4283
It should be possible to install this package without any bear dependencies.
setup.py shoukd use extras for each Python dependency that bears use. And then an additional extra "alldeps" which includes all bear deps. Once done, people should migrate to using pip install
coala-bears[alldeps]
and then we can remove them from the default deps.Or we could create a coala-bears-minimal package which has no bear deps.