Skip to content

Commit 4310397

Browse files
committed
_reports: Add anctartica's GSoC report
1 parent e7057b3 commit 4310397

File tree

1 file changed

+309
-0
lines changed

1 file changed

+309
-0
lines changed

_reports/saksham.md

Lines changed: 309 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,309 @@
1+
---
2+
categories:
3+
- GSoC
4+
- 2018
5+
- StatusReport
6+
report_year: 2018
7+
date: 2018-08-12
8+
student: Saksham Bansal
9+
organisation: coala
10+
organisation_link: https://coala.io
11+
project: Improve installation of coala and coala-bears
12+
project_link: https://summerofcode.withgoogle.com/projects/#4642118669172736
13+
tarball: https://rawgit.com/anctartica/GSoC-Report/master/work.tar.gz
14+
sha256sum: 3f2f7637e08a669ceff1dc701f3d7c22df22b301e6b59957650dccd104008863
15+
mentors: >
16+
[Muhammad Kaisar Arkhan](https://github.com/yukiisbored),
17+
[Matt Bodenhamer](https://github.com/mbodenhamer),
18+
[Andrey Safonov](https://github.com/xferra)
19+
phase:
20+
- Bonding: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/10
21+
- Phase 1: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/11
22+
- Phase 2: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/12
23+
- Phase 3: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/13
24+
bio: >
25+
I'm a sophomore year student studying Computer Science at Netaji Subhash
26+
Institute of Technology, Dehli. I am always looking for opportunities to
27+
put my programming skill to good use by contributing to open source which also
28+
allows me to improve my own skill.
29+
social:
30+
- GitHub:
31+
- username: anctartica
32+
- link: https://github.com/anctartica
33+
- GitLab:
34+
- username: anctartica
35+
- link: https://gitlab.com/anctartica
36+
- Gitter:
37+
- username: anctartica
38+
- link: https://gitter.im/anctartica
39+
- OpenHub:
40+
- username: anctartica
41+
- link: https://www.openhub.net/accounts/anctartica
42+
43+
blog: https://medium.com/@sakshamb.co.17
44+
activity:
45+
- 1:
46+
- repo: cEPs
47+
- link: https://github.com/coala/cEPs/commit/ca27c58eef778fd7b3aff3b874b0e58f56e4a559
48+
- details: >
49+
Create a proposal regarding the project.
50+
- 2:
51+
- repo: cib
52+
- link: https://gitlab.com/coala/cib/commit/b9f35115b42b105c550cf53c44a01f1257680697
53+
- details: >
54+
Add appveyor CI.
55+
- 3:
56+
- repo: cib
57+
- link: https://gitlab.com/coala/cib/commit/1e2d7170f4f9eb232c48f4d372d957b3c423d05c
58+
- details: >
59+
Use dependency management master
60+
- 4:
61+
- repo: cib
62+
- link: https://gitlab.com/coala/cib/commit/5e8cffc70834ab7263316a7e1648c037b52e2206
63+
- details: >
64+
Fix docopt usage pattern.
65+
- 5:
66+
- repo: cib
67+
- link: https://gitlab.com/coala/cib/commit/aa5e957018331db0d09099963bad1c2b86d147c5
68+
- details: >
69+
Fix incorrect behaviour
70+
- 6:
71+
- repo: cib
72+
- link: https://gitlab.com/coala/cib/commit/437a8e527d2b64d471d3022996ddf24ab754cb5a
73+
- details: >
74+
Clean up code required for 100% coverage
75+
- 7:
76+
- repo: cib
77+
- link: https://gitlab.com/coala/cib/commit/a18ac700bb4d7dbfe24c2103697d07fdfe00656d
78+
- details: >
79+
Use pragma no cover due to bug with coverage
80+
- 8:
81+
- repo: cib
82+
- link: https://gitlab.com/coala/cib/commit/7b5284dfdaf6c23c7573e570c806eba4fde368a5
83+
- details: >
84+
Fix bug in code for complete coverage
85+
- 9:
86+
- repo: cib
87+
- link: https://gitlab.com/coala/cib/commit/551516fcd5aac2bf46615d6a7827a7a9e8e7505a
88+
- details: >
89+
Add unittests for 100% coverage
90+
- 10:
91+
- repo: cib
92+
- link: https://gitlab.com/coala/cib/commit/df1ffac4e49eead45e56e8649d1378f62330a2a4
93+
- details: >
94+
Mobanise setup.cfg
95+
- 11:
96+
- repo: cib
97+
- link: https://gitlab.com/coala/cib/commit/139490a906645afb704aa083dfbc26727c2a412f
98+
- details: >
99+
Allow showing multiple bears
100+
- 12:
101+
- repo: cib
102+
- link: https://gitlab.com/coala/cib/commit/403056e7302097aca59f97a3ebbe30c13558bce6
103+
- details: >
104+
Remove useless if conditions
105+
- 13:
106+
- repo: cib
107+
- link: https://gitlab.com/coala/cib/commit/7a929ef94ea2ab88bcce40c9e079adf3e9258127
108+
- details: >
109+
Ignore build dir
110+
- 14:
111+
- repo: cib
112+
- link: https://gitlab.com/coala/cib/commit/13995e3afef600dcc880dc23a83826d9695536f8
113+
- details: >
114+
Remove unused import
115+
- 15:
116+
- repo: cib
117+
- link: https://gitlab.com/coala/cib/commit/93c5197af4a713b9579107e4725ea5de4cb6d5f3
118+
- details: >
119+
Remove call_without_output
120+
- 16:
121+
- repo: coala-mobans
122+
- link: https://gitlab.com/coala/mobans/commit/3f0557bfe4fca5e9bf99ae0226b091f19f5589ab
123+
- details: >
124+
Remove test_pyversion
125+
- 17:
126+
- repo: coala-mobans
127+
- link: https://gitlab.com/coala/mobans/commit/943e54125c7d354098ee11370251b0eec4ac81ef
128+
- details: >
129+
Add variable for cache dir on appveyor
130+
- 18:
131+
- repo: coala-mobans
132+
- link: https://gitlab.com/coala/mobans/commit/a7b8f2ff0f3e68bd56afa98a12d88054d6080ab2
133+
- details: >
134+
Add option for Python 3.6 jobs on all repos
135+
- 19:
136+
- repo: coala-mobans
137+
- link: https://gitlab.com/coala/mobans/commit/dd81996f93b3a48efe18b907fc2190f40ee11bdd
138+
- details: >
139+
Add template for init file for exporting version
140+
- 20:
141+
- repo: coala-mobans
142+
- link: https://gitlab.com/coala/mobans/commit/8eaac28f36ed8c48ef2462268b764c7d0f484346
143+
- details: >
144+
Remove brackets around string with one item in setup.py template
145+
- 21:
146+
- repo: coala-mobans
147+
- link: https://gitlab.com/coala/mobans/commit/c3bfe9a235613fd5701cd55f3e2fc5ea4f9f761c
148+
- details: >
149+
Run coala static code analysis from Appveyor
150+
- 22:
151+
- repo: coala-mobans
152+
- link: https://gitlab.com/coala/mobans/commit/b10ecd5acdfd1c6fc0cb64a696ca8b40ecc8abc2
153+
- details: >
154+
Pin setuptool to 21 for supporting environment markers
155+
- 23:
156+
- repo: coala-mobans
157+
- link: https://gitlab.com/coala/mobans/commit/7aeb5b7c197cf3d2f5d7a6ed947bed8a1fcf7078
158+
- details: >
159+
Use coala-bears master for coala analysis on Appveyor
160+
- 24:
161+
- repo: coala-mobans
162+
- link: https://gitlab.com/coala/mobans/commit/431d06caaf60eb45d36688244ed110f90f6a58ec
163+
- details: >
164+
Create coveragerc template to resolve a bug with coverage on cib
165+
- 25:
166+
- repo: coala-utils
167+
- link: https://gitlab.com/coala/coala-utils/commit/43c81871476e14ce0d777129bff8cdfc557be342
168+
- details: >
169+
Remove error handling on import for complete test coverage on Appveyor build
170+
- 26:
171+
- repo: coala-utils
172+
- link: https://gitlab.com/coala/coala-utils/commit/18c91bb2824e6bcb09de14af3ae38ec279b8d9e3
173+
- details: >
174+
use __all__ for exports to prevent failing coala --ci check
175+
- 27:
176+
- repo: coala-utils
177+
- link: https://gitlab.com/coala/coala-utils/commit/25cc5a3178586a1d51d0385eca12a176914a0b8c
178+
- details: >
179+
Use appveyor template for coala-utils
180+
- 28:
181+
- repo: coala-utils
182+
- link: https://gitlab.com/coala/coala-utils/commit/43075452b59994bea598f325edc7903113a8d89c
183+
- details: >
184+
Ignore build dir from coafile
185+
- 29:
186+
- repo: coala-utils
187+
- link: https://gitlab.com/coala/coala-utils/commit/ac382613bb2f62eaac8b9e68b35421ae43dd93eb
188+
- details: >
189+
Use __all__ in init.py
190+
- 30:
191+
- repo: coala-bears
192+
- link: https://github.com/coala/coala-bears/commit/c35a2ed04935fd7665514e6af7828f1bfd931a03
193+
- details: >
194+
Improve and cleanup script for generating bear requirements and generate cabal requirements
195+
- 31:
196+
- repo: coala-bears
197+
- link: https://github.com/coala/coala-bears/commit/26b696969dd38ca1a1ab91163e0154f6c905e252
198+
- details: >
199+
Move the generate_package script from the coala-bears package to .ci directory
200+
- 32:
201+
- repo: coala-bears
202+
- link: https://github.com/coala/coala-bears/commit/efdfbc1cec98db76a5bb2c75fbfa414686be4db8
203+
- details: >
204+
Use CabalRequirement for HaskellLintBear
205+
- 33:
206+
- repo: coala-bears
207+
- link: https://github.com/coala/coala-bears/commit/e62d16f8315e4dcd10c9c57af3ab3e5973b10d73
208+
- details: >
209+
Add language setting for ESLintBear using various plugins for eslint
210+
- 34:
211+
- repo: coala-bears
212+
- link: https://gitlab.com/coala/package_manager/commit/a786450e5cdfd3172caf86c60786c0d1ce6ee10f
213+
- details: >
214+
Add GherkinLintBear
215+
- 35:
216+
- repo: coala-bears
217+
- link: https://gitlab.com/coala/package_manager/commit/868afe0dcdf6ab0c964f1ce72152fedb132f44cb
218+
- details: >
219+
Add BashateBear
220+
- 36:
221+
- repo: dependency_management
222+
- link: https://gitlab.com/coala/package_manager/commit/75b3c37f7ffd7b6c9f693d131bf4f627fd95373d
223+
- details: >
224+
Add PlatformRequirement class for system specific package managers
225+
- 37:
226+
- repo: dependency_management
227+
- link: https://gitlab.com/coala/package_manager/commit/a786450e5cdfd3172caf86c60786c0d1ce6ee10f
228+
- details: >
229+
Return exitcode after running the install command
230+
- 38:
231+
- repo: dependency_management
232+
- link: https://gitlab.com/coala/package_manager/commit/868afe0dcdf6ab0c964f1ce72152fedb132f44cb
233+
- details: >
234+
Add CabalRequirement for backwards compatibility
235+
- 39:
236+
- repo: dependency_management
237+
- link: https://gitlab.com/coala/package_manager/commit/995b50ba1861296d333442be9e16ba2b1c4a47b6
238+
- details: >
239+
Run pip as python module
240+
- 40:
241+
- repo: bear-install-playbook
242+
- link: https://gitlab.com/coala/bear-install-playbook/commit/7ba1c3ef9c29dc58a1c5b0109328317f3b0924df
243+
- details: >
244+
Add playbook for installing individual bears
245+
- 41:
246+
- repo: bear-install-playbook
247+
- link: https://gitlab.com/coala/bear-install-playbook/commit/1b288844aa157ff4e8c80a3179c5d58163a2719f
248+
- details: >
249+
Test playbook using docker + Travic CI
250+
- 42:
251+
- repo: bear-install-playbook
252+
- link: https://gitlab.com/coala/bear-install-playbook/commit/7dee7591927c0883269f5741102b90bfb93f84ff
253+
- details: >
254+
Add instructions on using playbook
255+
- 43:
256+
- repo: bear-install-playbook
257+
- link: https://gitlab.com/coala/bear-install-playbook/commit/c82a9737c6852d09f681a7fc98a0f094dd38194b
258+
- details: >
259+
Add coafile for running static code analysis by coala
260+
---
261+
262+
### Improve Installation of coala and coala-bears
263+
264+
#### Work Done
265+
266+
coala uses a `DistributionRequirement` class to represent dependencies
267+
from system specific package managers such as apt, yum, dnf. This project
268+
breaks the class into multiple subclasses one for each package manager that
269+
all inherit from the base `PlatformRequirement` class and deprecates
270+
the older class. Additionaly, the project added a repository for
271+
Ansible playbooks that allow to install individual bears for coala.
272+
Lastly, the project involved fixing and improving the exiting cib install bears
273+
tool which uses the dependency management API by adding 100% test coverage.
274+
275+
**Major tasks of the project:**
276+
277+
1. Create a separate repository `bear-install-playbook` for Ansible playbook
278+
that would allow to install individual bear and their dependencies.
279+
2. Testing the playbook using docker and Travis CI.
280+
3. Improving the existing cib bear install tool and cleaning up the code.
281+
4. Adding 100% test coverage for the cib tool.
282+
5. Improve the existing templates in mobans such as by running ci check
283+
from the Appveyor template.
284+
6. Add a PlatformRequirement class for system specific package managers
285+
and deprecate the existing DistributionRequirement class.
286+
7. Move the generate_package script from bears.
287+
8. Improving the exiting generate_requirements script and allow
288+
it to generate CabalRequiremnents from bears as well.
289+
290+
#### Challenges
291+
292+
The major challenge of the project was trying to test the Ansible
293+
playbook by installing the dependencies of the bear inside docker on Travis
294+
CI. It was very difficult to properly setup some of the package managers inside
295+
the docker container and I had to run the Travis build more than a 100 times.
296+
Eventually, I ended using Ansible roles that could setup the package managers
297+
on the host machine which made it a lot easier.
298+
299+
#### Future prospects of the projects
300+
301+
There is a lot more functionality that can be used from Ansible. Ansible allows
302+
us to create roles that run various tasks and define variables to complete a task
303+
for numerous platforms. These roles can be uploaded to Ansible-galaxy. We could
304+
create roles for installing certain bears that require different installation
305+
instruction for each distribution. There could be a role that could create a
306+
virtualenv with coala setup and install an appropritate python version for
307+
multiple platforms if it is not already there. Ansible-galaxy already has
308+
a lot of roles that can setup various package managers for multiple
309+
distributions.

0 commit comments

Comments
 (0)