ADI-Labs / density

wireless density API
13 stars 26 forks source link

Update travis to use vulture during testing #212

Closed alexander-yu closed 7 years ago

alexander-yu commented 7 years ago

Incorporating vulture into travis so that code can be linted for dead code fragments. Updated YAML files and scripts, and added a whitelist.py module, which is used by vulture as a list of functions/attributes to ignore.

Turns out that because vulture only performs static analysis, by design it's going to generate a number of false positives; it marks a lot of Flask routes as unused (unless they're being explicitly used elsewhere, it seems), as well as attribute assignments for things like bokeh figures (and probably assignment of attributes to pandas DataFrames, in a similar vein). In this sense the whitelist.py module is somewhat longish, but helpful to have.

vulture also ignores any unused local variables that start with an underscore.

alanhdu commented 7 years ago

Also needs a rebase (get rid of the merge commits).

alanhdu commented 7 years ago

If you want to merge the vulture stuff in, go ahead (LGTM), although I think it's probably more trouble than it's worth. If you don't want to, just close this PR and open up another one.

Do you want to obtain another PR about the os.urandom and API key nonsense?

alexander-yu commented 7 years ago

I'll just end up closing this PR; I'll make another PR for the API key stuff.