Kintyre / ksconf

Kintyre's Splunk Configuration tool
Apache License 2.0
50 stars 13 forks source link

Feature CLI subcommands via entry_points #21

Closed lowell80 closed 6 years ago

lowell80 commented 6 years ago

Now using entry_points to dynamically load individual commands. This reorganizes the argparse configuration for the 'ksconf.commands.*' modules and allows for external python packages to publish their own commands to the "ksconf" CLI without editing this package. (This allows for client-specific add-ons, for example.)

Massive code reformatting and doc cleanup

Multiple fixes to the build/CI process.

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 148


Changes Missing Coverage Covered Lines Changed/Added Lines %
ksconf/cli.py 14 15 93.33%
ksconf/util/completers.py 4 5 80.0%
ksconf/commands/sort.py 51 54 94.44%
ksconf/commands/combine.py 68 75 90.67%
ksconf/commands/init.py 64 82 78.05%
ksconf/commands/unarchive.py 179 229 78.17%
ksconf/commands/promote.py 55 113 48.67%
<!-- Total: 589 727 81.02% -->
Files with Coverage Reduction New Missed Lines %
ksconf/commands/promote.py 1 51.61%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 140: -0.4%
Covered Lines: 2076
Relevant Lines: 2298

💛 - Coveralls
codecov-io commented 6 years ago

Codecov Report

Merging #21 into master will decrease coverage by 0.37%. The diff coverage is 81.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
- Coverage   90.93%   90.55%   -0.38%     
==========================================
  Files          23       24       +1     
  Lines        2173     2298     +125     
==========================================
+ Hits         1976     2081     +105     
- Misses        197      217      +20
Impacted Files Coverage Δ
ksconf/util/compare.py 100% <ø> (ø) :arrow_up:
ksconf/consts.py 100% <ø> (ø) :arrow_up:
ksconf/archive.py 96.49% <ø> (ø) :arrow_up:
ksconf/commands/diff.py 100% <100%> (ø) :arrow_up:
ksconf/util/__init__.py 90% <100%> (+10%) :arrow_up:
ksconf/conf/delta.py 100% <100%> (ø) :arrow_up:
ksconf/conf/merge.py 100% <100%> (ø) :arrow_up:
ksconf/commands/minimize.py 100% <100%> (ø) :arrow_up:
ksconf/conf/parser.py 98% <100%> (-0.01%) :arrow_down:
ksconf/commands/check.py 100% <100%> (ø) :arrow_up:
... and 9 more

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 53f61dd...9759fc2. Read the comment docs.

lowell80 commented 6 years ago

Merged to master