Package: reviews
ReviewsSimplify requests for code review with an all-in-one TUI dashboard providing an overview of open PRs requiring review!Quick StartIf you want to get up and running with Reviews immediately, run:exportGITHUB_USER="your-github-username"exportGITHUB_TOKEN="your personal GitHub token used for interacting with the API"exportREVIEWS_GITHUB_REPOSITORY_CONFIGURATION="apoclyps/reviews"pipinstall--upgradereviews

reviewsconfig--show

reviewsdashboardAdditional SupportView ConfigurationIf you wish to view the configuration used by reviews at any time, you can use the following command to show all configuration (with secrets hidden or shown):reviewsconfig--hide

reviewsconfig--showGitlabIf you wish to usereviewswith Gitlab, you will need to specify the configuration like so:product id:project name/repositoryand use the--provider=gitlabflag when runningreviews:exportGITLAB_USER=userexportGITLAB_TOKEN=tokenexportREVIEWS_GITLAB_REPOSITORY_CONFIGURATION="27629846:apoclyps/reviews"reviewsdashboard--provider=gitlabGetting started with local developmentTo build and run the CLI on your host, you will need Python 3.9, pip, and virtualenv to build and runreview.
If you wish to publish a PR with your changes, first create a fork on Github and clone that code.$ghrepocloneapoclyps/reviews
$cdreviews
$python3-mvenvenv
$sourceenv/bin/activate(env)$pipinstall-rrequirements_dev.txt(env)$pipinstall-rrequirements.txt(env)$python-mreviewsdashboardIf you wish to keep a copy of Reviews on your host system, you can install and run it using:$exportREVIEWS_GITHUB_REPOSITORY_CONFIGURATION="apoclyps/reviews"$python-mvenvenv
$sourceenv/bin/activate
$python-mpipinstall-e.
$reviews-hYou can run the Reviews within Docker:docker-composebuildcli&&docker-composerun--rmclipython-mreviewsdashboardTo build an image and run that image with all of the necessary dependencies using the following commands:$docker-composebuildcli
$docker-composerun--rmclipython-mreviewsdashboardFor instructions on setting up a development environment outside of Docker, check out thewiki.ConfigurationReviews supports both .ini and .env files. Reviews always searches for configuration in this order:Environment variables;Repository: ini or .env file;Configuration PathReview DefaultsThe following steps are used to provide the configuration using a.envor.inifile. The configuration can be read from within the module/repository (default location set by decouple) using the.envfile or via a location specified by an environmental variable that points to a.inifile located in the root of the project or in a location specified byPATH_TO_CONFIG.Using an.envfile within the repositorycd/home/<your-user>/workspace/apoclyps/reviews
touch.envecho"REVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example">>.env
python-mreviewsconfigUsing an.inifile within the repositorycd/home/<your-user>/workspace/apoclyps/reviews
touchsettings.iniecho"[settings]\nREVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example">>settings.ini

python-mreviewsconfigProviding a configuration pathIf you wish to set the configuration path to use aninior.envfile when running the application, you can use the configuration of a specific file by supplying the path to the configuration like so:cd/home/apoclyps/
touchsettings.iniecho"[settings]\nREVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example">>settings.inicd/home/<your-user>/workspace/apoclyps/reviewsexportREVIEWS_PATH_TO_CONFIG=/home/<your-user>/

python-mreviewsconfigIf at any time, you want to confirm your configuration reflects the file you have provided, you can usereviews configto view what current configuration of Reviews.TestingA test suite has been included to ensure Reviews functions correctly.To run the entire test suite with verbose output, run the following:$pytest-vvvAlternatively, to run a single set of tests.$pytest-vvvtests/test_config.pyAll tests can be run within docker by using the following command:$docker-composebuildpytest&&docker-composerun--rmpytestLintingTo run individual linting steps:docker-compose build test
docker-compose run --rm --no-deps test isort .
docker-compose run --rm --no-deps test black --line-length 119 --check .
docker-compose run --rm --no-deps test mypy .
docker-compose run --rm --no-deps test flake8 .
docker-compose run --rm --no-deps test pylint --rcfile=.pylintrc reviews
docker-compose run --rm --no-deps test bandit reviews
docker-compose run --rm --no-deps test vulture --min-confidence 90 reviews
docker-compose run --rm --no-deps test codespell reviews
docker-compose run --rm --no-deps test find . -name '*.py' -exec pyupgrade {} +You can also set uppre-committo run the linting steps automatically during the commit phase,
the pre-commit pipeline can be set up by running the following command on the project root:pre-commitinstallContributionsPlease readCONTRIBUTING.mdfor details on our code of conduct, and the process for submitting pull requests to us.