georgetown-cset / funder-finder

Retrieve GitHub repo funding information
Apache License 2.0
7 stars 3 forks source link

Bug in CLI --help Documentation #43

Closed jspeed-meyers closed 1 year ago

jspeed-meyers commented 1 year ago
usage: get_funders.py [-h] repo_name

positional arguments:
  repo_name   Identifier for GitHub repo, in the form `owner_name/repo_name` (e.g.
              georgetown-cset/funder-finder)

options:
  -h, --help  show this help message and exit

But it seems that georgetown-cset/funder-finder is an incorrect input? Or am I missing something?

When I run:

python3 funderfinder/get_funders.py --help

I get:

Traceback (most recent call last):
  File "/Users/johnspeedmeyers/Desktop/repos/public/funder-finder/funderfinder/get_funders.py", line 39, in <module>
    print(get_project_funders(args.repo_name))
  File "/Users/johnspeedmeyers/Desktop/repos/public/funder-finder/funderfinder/get_funders.py", line 20, in get_project_funders
    funding = finder.run(repo_name)
  File "/Users/johnspeedmeyers/Desktop/repos/public/funder-finder/funderfinder/sources/github_sponsors.py", line 175, in run
    top_contribs = self.get_gh_top_contributors_json(gh_project_slug)
  File "/Users/johnspeedmeyers/Desktop/repos/public/funder-finder/funderfinder/sources/github_sponsors.py", line 93, in get_gh_top_contributors_json
    for contributor in contributors:
UnboundLocalError: local variable 'contributors' referenced before assignment
jmelot commented 1 year ago

This is just because repo_name is a positional argument. When I run python3 funderfinder/get_funders.py --help I see the usage documentation as expected, so I'm going to close