Skip to content

reports: Add anctartica's GSoC report #630

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
309 changes: 309 additions & 0 deletions _reports/saksham.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,309 @@
---
categories:
- GSoC
- 2018
- StatusReport
report_year: 2018
date: 2018-08-12
student: Saksham Bansal
organisation: coala
organisation_link: https://coala.io
project: Improve installation of coala and coala-bears
project_link: https://summerofcode.withgoogle.com/projects/#4642118669172736
tarball: https://rawgit.com/anctartica/GSoC-Report/master/work.tar.gz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extracting this I get

tar: Ignoring unknown extended header keyword 'LIBARCHIVE.creationtime'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'
tar: Ignoring unknown extended header keyword 'SCHILY.dev'
tar: Ignoring unknown extended header keyword 'SCHILY.ino'
tar: Ignoring unknown extended header keyword 'SCHILY.nlink'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also contains .DS_Store

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was due to BSD tar (on mac) vs. GNU tar.
Should be fixed now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still has one .DS_Store in it, but good enough

sha256sum: 3f2f7637e08a669ceff1dc701f3d7c22df22b301e6b59957650dccd104008863
mentors: >
[Muhammad Kaisar Arkhan](https://github.com/yukiisbored),
[Matt Bodenhamer](https://github.com/mbodenhamer),
[Andrey Safonov](https://github.com/xferra)
phase:
- Bonding: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/10
- Phase 1: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/11
- Phase 2: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/12
- Phase 3: https://gitlab.com/coala/GSoC/GSoC-2018/milestones/13
bio: >
I'm a sophomore year student studying Computer Science at Netaji Subhash
Institute of Technology, Dehli. I am always looking for opportunities to
put my programming skill to good use by contributing to open source which also
allows me to improve my own skill.
social:
- GitHub:
- username: anctartica
- link: https://github.com/anctartica
- GitLab:
- username: anctartica
- link: https://gitlab.com/anctartica
- Gitter:
- username: anctartica
- link: https://gitter.im/anctartica
- OpenHub:
- username: anctartica
- link: https://www.openhub.net/accounts/anctartica
email: [email protected]
blog: https://medium.com/@sakshamb.co.17
activity:
- 1:
- repo: cEPs
- link: https://github.com/coala/cEPs/commit/ca27c58eef778fd7b3aff3b874b0e58f56e4a559
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can trim these to 8 character shas.
up to you

- details: >
Create a proposal regarding the project.
- 2:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/b9f35115b42b105c550cf53c44a01f1257680697
- details: >
Add appveyor CI.
- 3:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/1e2d7170f4f9eb232c48f4d372d957b3c423d05c
- details: >
Use dependency management master
- 4:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/5e8cffc70834ab7263316a7e1648c037b52e2206
- details: >
Fix docopt usage pattern.
- 5:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/aa5e957018331db0d09099963bad1c2b86d147c5
- details: >
Fix incorrect behaviour
- 6:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/437a8e527d2b64d471d3022996ddf24ab754cb5a
- details: >
Clean up code required for 100% coverage
- 7:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/a18ac700bb4d7dbfe24c2103697d07fdfe00656d
- details: >
Use pragma no cover due to bug with coverage
- 8:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/7b5284dfdaf6c23c7573e570c806eba4fde368a5
- details: >
Fix bug in code for complete coverage
- 9:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/551516fcd5aac2bf46615d6a7827a7a9e8e7505a
- details: >
Add unittests for 100% coverage
- 10:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/df1ffac4e49eead45e56e8649d1378f62330a2a4
- details: >
Mobanise setup.cfg
- 11:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/139490a906645afb704aa083dfbc26727c2a412f
- details: >
Allow showing multiple bears
- 12:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/403056e7302097aca59f97a3ebbe30c13558bce6
- details: >
Remove useless if conditions
- 13:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/7a929ef94ea2ab88bcce40c9e079adf3e9258127
- details: >
Ignore build dir
- 14:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/13995e3afef600dcc880dc23a83826d9695536f8
- details: >
Remove unused import
- 15:
- repo: cib
- link: https://gitlab.com/coala/cib/commit/93c5197af4a713b9579107e4725ea5de4cb6d5f3
- details: >
Remove call_without_output
- 16:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/3f0557bfe4fca5e9bf99ae0226b091f19f5589ab
- details: >
Remove test_pyversion
- 17:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/943e54125c7d354098ee11370251b0eec4ac81ef
- details: >
Add variable for cache dir on appveyor
- 18:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/a7b8f2ff0f3e68bd56afa98a12d88054d6080ab2
- details: >
Add option for Python 3.6 jobs on all repos
- 19:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/dd81996f93b3a48efe18b907fc2190f40ee11bdd
- details: >
Add template for init file for exporting version
- 20:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/8eaac28f36ed8c48ef2462268b764c7d0f484346
- details: >
Remove brackets around string with one item in setup.py template
- 21:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/c3bfe9a235613fd5701cd55f3e2fc5ea4f9f761c
- details: >
Run coala static code analysis from Appveyor
- 22:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/b10ecd5acdfd1c6fc0cb64a696ca8b40ecc8abc2
- details: >
Pin setuptool to 21 for supporting environment markers
- 23:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/7aeb5b7c197cf3d2f5d7a6ed947bed8a1fcf7078
- details: >
Use coala-bears master for coala analysis on Appveyor
- 24:
- repo: coala-mobans
- link: https://gitlab.com/coala/mobans/commit/431d06caaf60eb45d36688244ed110f90f6a58ec
- details: >
Create coveragerc template to resolve a bug with coverage on cib
- 25:
- repo: coala-utils
- link: https://gitlab.com/coala/coala-utils/commit/43c81871476e14ce0d777129bff8cdfc557be342
- details: >
Remove error handling on import for complete test coverage on Appveyor build
- 26:
- repo: coala-utils
- link: https://gitlab.com/coala/coala-utils/commit/18c91bb2824e6bcb09de14af3ae38ec279b8d9e3
- details: >
Define exports through all to prevent failing coala --ci check
- 27:
- repo: coala-utils
- link: https://gitlab.com/coala/coala-utils/commit/25cc5a3178586a1d51d0385eca12a176914a0b8c
- details: >
Use appveyor template for coala-utils
- 28:
- repo: coala-utils
- link: https://gitlab.com/coala/coala-utils/commit/43075452b59994bea598f325edc7903113a8d89c
- details: >
Ignore build dir from coafile
- 29:
- repo: coala-utils
- link: https://gitlab.com/coala/coala-utils/commit/ac382613bb2f62eaac8b9e68b35421ae43dd93eb
- details: >
Use all in init.py
- 30:
- repo: coala-bears
- link: https://github.com/coala/coala-bears/commit/c35a2ed04935fd7665514e6af7828f1bfd931a03
- details: >
Improve and cleanup script for generating bear requirements and generate cabal requirements
- 31:
- repo: coala-bears
- link: https://github.com/coala/coala-bears/commit/26b696969dd38ca1a1ab91163e0154f6c905e252
- details: >
Move the generate_package script from the coala-bears package to .ci directory
- 32:
- repo: coala-bears
- link: https://github.com/coala/coala-bears/commit/efdfbc1cec98db76a5bb2c75fbfa414686be4db8
- details: >
Use CabalRequirement for HaskellLintBear
- 33:
- repo: coala-bears
- link: https://github.com/coala/coala-bears/commit/e62d16f8315e4dcd10c9c57af3ab3e5973b10d73
- details: >
Add language setting for ESLintBear using various plugins for eslint
- 34:
- repo: coala-bears
- link: https://gitlab.com/coala/package_manager/commit/a786450e5cdfd3172caf86c60786c0d1ce6ee10f
- details: >
Add GherkinLintBear
- 35:
- repo: coala-bears
- link: https://gitlab.com/coala/package_manager/commit/868afe0dcdf6ab0c964f1ce72152fedb132f44cb
- details: >
Add BashateBear
- 36:
- repo: dependency_management
- link: https://gitlab.com/coala/package_manager/commit/75b3c37f7ffd7b6c9f693d131bf4f627fd95373d
- details: >
Add PlatformRequirement class for system specific package managers
- 37:
- repo: dependency_management
- link: https://gitlab.com/coala/package_manager/commit/a786450e5cdfd3172caf86c60786c0d1ce6ee10f
- details: >
Return exitcode after running the install command
- 38:
- repo: dependency_management
- link: https://gitlab.com/coala/package_manager/commit/868afe0dcdf6ab0c964f1ce72152fedb132f44cb
- details: >
Add CabalRequirement for backwards compatibility
- 39:
- repo: dependency_management
- link: https://gitlab.com/coala/package_manager/commit/995b50ba1861296d333442be9e16ba2b1c4a47b6
- details: >
Run pip as python module
- 40:
- repo: bear-install-playbook
- link: https://gitlab.com/coala/bear-install-playbook/commit/7ba1c3ef9c29dc58a1c5b0109328317f3b0924df
- details: >
Add playbook for installing individual bears
- 41:
- repo: bear-install-playbook
- link: https://gitlab.com/coala/bear-install-playbook/commit/1b288844aa157ff4e8c80a3179c5d58163a2719f
- details: >
Test playbook using docker + Travic CI
- 42:
- repo: bear-install-playbook
- link: https://gitlab.com/coala/bear-install-playbook/commit/7dee7591927c0883269f5741102b90bfb93f84ff
- details: >
Add instructions on using playbook
- 43:
- repo: bear-install-playbook
- link: https://gitlab.com/coala/bear-install-playbook/commit/c82a9737c6852d09f681a7fc98a0f094dd38194b
- details: >
Add coafile for running static code analysis by coala
---

### Improve Installation of coala and coala-bears

#### Work Done

coala uses a `DistributionRequirement` class to represent dependencies
from system specific package managers such as apt, yum, dnf. This project
breaks the class into multiple subclasses one for each package manager that
all inherit from the base `PlatformRequirement` class and deprecates
the older class. Additionaly, the project added a repository for
Ansible playbooks that allow to install individual bears for coala.
Lastly, the project involved fixing and improving the exiting cib install bears
tool which uses the dependency management API by adding 100% test coverage.

**Major tasks of the project:**

1. Create a separate repository `bear-install-playbook` for Ansible playbook
that would allow to install individual bear and their dependencies.
2. Testing the playbook using docker and Travis CI.
3. Improving the existing cib bear install tool and cleaning up the code.
4. Adding 100% test coverage for the cib tool.
5. Improve the existing templates in mobans such as by running ci check
from the Appveyor template.
6. Add a PlatformRequirement class for system specific package managers
and deprecate the existing DistributionRequirement class.
7. Move the generate_package script from bears.
8. Improving the exiting generate_requirements script and allow
it to generate CabalRequiremnents from bears as well.

#### Challenges

The major challenge of the project was trying to test the Ansible
playbook by installing the dependencies of the bear inside docker on Travis
CI. It was very difficult to properly setup some of the package managers inside
the docker container and I had to run the Travis build more than a 100 times.
Eventually, I ended using Ansible roles that could setup the package managers
on the host machine which made it a lot easier.

#### Future prospects of the projects

There is a lot more functionality that can be used from Ansible. Ansible allows
us to create roles that run various tasks and define variables to complete a task
for numerous platforms. These roles can be uploaded to Ansible-galaxy. We could
create roles for installing certain bears that require different installation
instruction for each distribution. There could be a role that could create a
virtualenv with coala setup and install an appropritate python version for
multiple platforms if it is not already there. Ansible-galaxy already has
a lot of roles that can setup various package managers for multiple
distributions.