Skip to content
This repository has been archived by the owner on Jun 29, 2020. It is now read-only.
/ py-forks Public archive

A Python util that retrieves a list of forks for a given GitHub user and repo

License

Notifications You must be signed in to change notification settings

critical-path/py-forks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

py-forks v1.0.0

py-forks is a util that retrieves a list of forks for a given GitHub user and repo.

Dependencies

py-forks requires Python and the pip package. It also requires the following packages for usage and testing.

Usage:

  • click
  • requests

Testing:

  • coveralls
  • pylint
  • pytest
  • pytest-cov
  • radon
  • responses

Installing py-forks with test cases and testing dependencies

  1. Clone or download this repository.

  2. Using sudo, run pip with the install command and the --editable option.

sudo pip install --editable .[test]

Installing py-forks without test cases or testing dependencies

  1. Clone or download this repository.

  2. Using sudo, run pip with the install command.

sudo pip install .

Using py-forks with long options

To retrieve a list of forks for all repos associated with a given user, run forks with the --user option.

forks --user <user>

To retrieve a list of forks associated with a given user and a given repo, run forks with the --user and --repo options.

forks --user <user> --repo <repo>

To write the retrieved list of forks to disk, run forks with the --write option.

forks --user <user> --write
forks --user <user> --repo <repo> --write

Using py-forks with short options

To retrieve a list of forks for all repos associated with a given user, run forks with the -u option.

forks -u <user>

To retrieve a list of forks associated with a given user and a given repo, run forks with the -u and -r options.

forks -u <user> -r <repo>

To write the retrieved list of forks to disk, run forks with the -w option.

forks -u <user> -w
forks -u <user> -r <repo> -w

Testing py-forks after installation

  1. Run radon with the mi command and the --show option.
radon mi --show forks
  1. Run pylint.
pylint forks
  1. Run pytest with the -vv, --cov, and --cov-report options.
pytest -vv --cov --cov-report=term-missing

Note

py-forks makes unauthenticated requests to the GitHub API and is, therefore, subject to rate limits.

About

A Python util that retrieves a list of forks for a given GitHub user and repo

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages