Skip to content

Commit 79fb79a

Browse files
committed
reports: Add anctaritca's GSoC report
1 parent 0896afa commit 79fb79a

File tree

1 file changed

+269
-0
lines changed

1 file changed

+269
-0
lines changed

reports/saksham.md

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

0 commit comments

Comments
 (0)