atlanhq / camelot

Camelot: PDF Table Extraction for Humans
https://camelot-py.readthedocs.io
Other
3.65k stars 357 forks source link

[MRG] Fixed #343: Use @group(name=) instead of overriding HelpFormater.write_usage #344

Closed dimitern closed 5 years ago

dimitern commented 5 years ago

Fixes issue #343 In order not to show camelot as the program name in the help output (passing --help), it's enough to set @group(name='camelot') on the main Click group for the CLI. The existing approach which monkey patches click.HelpFormatter.write_usage(), will affect any other Click CLI tool that uses camelot as its dependency, e.g. Excalibur.

Added a test to verify it works as expected in the help output.

dimitern commented 5 years ago

@vinayak-mehta Hey, it looks like the repository has been renamed from socialcopsdev/camelot to atlanhq/camelot, but the TravisCI config still references the old name, and PRs are not picked up on the new name (likewise with Codecov). Just wanted to let you know. Thanks!

vinayak-mehta commented 5 years ago

It has been renamed back for now. Thanks for raising this PR! Please give me some time to review and merge it :)

codecov-io commented 5 years ago

Codecov Report

Merging #344 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #344   +/-   ##
=======================================
  Coverage   87.64%   87.64%           
=======================================
  Files          13       13           
  Lines        1505     1505           
  Branches      348      348           
=======================================
  Hits         1319     1319           
  Misses        129      129           
  Partials       57       57
Impacted Files Coverage Δ
camelot/cli.py 86.32% <100%> (ø) :arrow_up:

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 de97be2...fc28d87. Read the comment docs.

dimitern commented 5 years ago

Closing in favour of https://github.com/camelot-dev/camelot/pull/5