Closed yogeshg closed 6 years ago
Merging #118 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #118 +/- ##
=======================================
Coverage 85.38% 85.38%
=======================================
Files 33 33
Lines 1923 1923
Branches 44 44
=======================================
Hits 1642 1642
Misses 281 281
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 9f05fc2...c6bdd8a. Read the comment docs.
This pr was split into #121 and #124
Motivation
Developers need to run several tools and setting these up could be a hassle. These tools include but are not limited to setting up the environment, running style checks, running tests etc. For different projects, these tools may have different default values.
Documentation is needed for these default values to allow users to run these tools. But we never read documentation, so an interactive script with default values and options to run these tools in a limited scope might be useful. Limited scope might mean only the files changed, different python or spark versions etc.
Tools like pylint, prospector etc. do a great job of giving users flexibility, but they are mostly run with the default values. They also do not give options to run on only currently touched files -- this defintion is also broad.
This is why we might want a script to help the user do everything they need and also guide them through the process through "--help" and autocomplete options. It should also be easy for us to maintain such a script and users to read it to see what goes on under the hood. Luckily for us python
argh
package usesparseargs
andargscomplete
packages to expose python functions on bash with great help and autocompletion funcitonality.Demo
Tools
pylint
is configured for variable names as bothsnake_case
andcamelCase
camelCase
while keeping everything elsesnake_case
prospector
haspylint
and some other tests like code complexity, we can start using these laternose
tests inrun-tests.sh
after setting some environment variables and specifying defaultsRFormula
orVectorAssembler
orml.feautres
but to run bothRFormula
andVectorAssembler
we need more than one commandsrun-tests.sh
and some requirements for that are also requirements ofpylint
, all such can be included inenvsetup
Misc:
argh
generates help files from argumentsargcomplete
generates autocomplete -- some config required.