Skip to content

[WIP] Lint script for checking driver compliance to the base / standard Libcloud API and quality checking#774

Closed
Kami wants to merge 2 commits intotrunkfrom
api_compliance_and_quality_checking_script
Closed

[WIP] Lint script for checking driver compliance to the base / standard Libcloud API and quality checking#774
Kami wants to merge 2 commits intotrunkfrom
api_compliance_and_quality_checking_script

Conversation

@Kami
Copy link
Member

@Kami Kami commented Apr 23, 2016

This pull request works on the great initial work and idea from @Jc2k (#211).

Background

I've talked with @tonybaloney the other day on how we could make the library better and more user-friendly. Usually the biggest problem and "unfriendliness" is when the driver doesn't fully comply to the base API. From a high level perspective those small things (e.g. argument is missing an ex_ prefix, etc.) don't seen like a big deal, but they actually are (death by the thousand cuts).

This causes problems because it makes building truly provider agnostic applications harder and means that user needs to build another layer on top of Libcloud which handles those differences and this makes the library less attracting (hey, Libcloud is supposed to abstract those differences away!).

As of now, we do this "compliance against the base / standard API" checking manually during code reviews. Obviously manual process is error prone and wastes a tons of time which could be spend on reviewing things which actually add value.

I think the first step for improving the quality is having a script and automated check (linter or whatever you might call it) which runs on every commit and reports all the violations.

TODO

  • Finish it up (still tons of work and refactoring to be done)
  • Hook it up to the CI (start with the existing warnings not being fatal)
  • Start fixing and improving the existing code (not part of this PR)

from libcloud.compute.base import NodeDriver

import libcloud.dns.providers
from libcloud.dns.base import DNSDriver
Copy link
Contributor

Choose a reason for hiding this comment

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

Add # pylint: disable=unused-import to lines 42, 45 and 48

@tonybaloney
Copy link
Contributor

@Kami are you going to merge this and then keep the fixes to the drivers seperate?

@Kami
Copy link
Member Author

Kami commented Apr 25, 2016

The script / code itself still needs quite a bit more of (refactoring) love before I plan to merge it.

I mostly just wanted to get some feedback on the overall approach to begin with :)

@hubot hubot deleted the api_compliance_and_quality_checking_script branch April 28, 2017 19:08
@hubot hubot restored the api_compliance_and_quality_checking_script branch April 28, 2017 21:37
@stale
Copy link

stale bot commented Jul 16, 2019

Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue.

@stale stale bot added the stale label Jul 16, 2019
@Kami
Copy link
Member Author

Kami commented Jul 18, 2019

Old and out of date PR. Closing.

@stale stale bot removed the stale label Jul 18, 2019
@Kami Kami closed this Jul 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants