Skip to content

Commit d3bd6c4

Browse files
committed
_reports: Add anctaritca's GSoC report
1 parent f6cf0eb commit d3bd6c4

File tree

1 file changed

+266
-0
lines changed

1 file changed

+266
-0
lines changed

_reports/saksham.md

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

0 commit comments

Comments
 (0)