reviews


Namereviews JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttps://github.com/apoclyps/reviews
SummaryA terminal UI dashboard to monitor requests for code review across Github repositories.
upload_time2023-02-03 09:03:35
maintainer
docs_urlNone
authorKyle Harrison
requires_python
licenseMIT
keywords reviews pull request review
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Reviews

[![Tests](https://github.com/apoclyps/reviews/actions/workflows/test.yml/badge.svg)](https://github.com/apoclyps/reviews/actions/workflows/test.yml)
![pypi](https://img.shields.io/pypi/v/reviews.svg)
![versions](https://img.shields.io/pypi/pyversions/reviews.svg)

![](https://banners.beyondco.de/Reviews.png?theme=light&packageManager=pip+install&packageName=reviews&pattern=plus&style=style_1&description=Monitor+requests+for+Code+Reviews&md=1&showWatermark=0&fontSize=225px&images=link&widths=250)

Simplify requests for code review with an all-in-one TUI dashboard providing an overview of open PRs requiring review!

### Quick Start

If you want to get up and running with Reviews immediately, run:

```bash
export GITHUB_USER="your-github-username"
export GITHUB_TOKEN="your personal GitHub token used for interacting with the API"
export REVIEWS_GITHUB_REPOSITORY_CONFIGURATION="apoclyps/reviews"

pip install --upgrade reviews

reviews config --show

reviews dashboard
```

[![asciicast](https://asciinema.org/a/414444.svg)](https://asciinema.org/a/414444)

### Additional Support

#### View Configuration

If 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):

```bash
reviews config --hide

reviews config --show
```

#### Gitlab

If you wish to use `reviews` with Gitlab, you will need to specify the configuration like so: `product id:project name/repository` and use the `--provider=gitlab` flag when running `reviews`:

```bash
export GITLAB_USER=user
export GITLAB_TOKEN=token
export REVIEWS_GITLAB_REPOSITORY_CONFIGURATION="27629846:apoclyps/reviews"

reviews dashboard --provider=gitlab
```

### Getting started with local development

To build and run the CLI on your host, you will need Python 3.9, pip, and virtualenv to build and run `review`.
If you wish to publish a PR with your changes, first create a fork on Github and clone that code.

```bash
$ gh repo clone apoclyps/reviews
$ cd reviews
$ python3 -m venv env
$ source env/bin/activate
(env)$ pip install -r requirements_dev.txt
(env)$ pip install -r requirements.txt
(env)$ python -m reviews dashboard
```

If you wish to keep a copy of Reviews on your host system, you can install and run it using:

```bash
$ export REVIEWS_GITHUB_REPOSITORY_CONFIGURATION="apoclyps/reviews"
$ python -m venv env
$ source env/bin/activate
$ python -m pip install -e .
$ reviews -h
```

You can run the Reviews within Docker:

```bash
docker-compose build cli && docker-compose run --rm cli python -m reviews dashboard
```

To build an image and run that image with all of the necessary dependencies using the following commands:

```bash
$ docker-compose build cli
$ docker-compose run --rm cli python -m reviews dashboard
```

For instructions on setting up a development environment outside of Docker, check out the [wiki](https://github.com/apoclyps/reviews/wiki/Development-Enviromnent).

### Configuration

Reviews supports both .ini and .env files. Reviews always searches for configuration in this order:

* Environment variables;
* Repository: ini or .env file;
* Configuration Path
* Review Defaults

The following steps are used to provide the configuration using a `.env` or `.ini` file. The configuration can be read from within the module/repository (default location set by decouple) using the `.env` file or via a location specified by an environmental variable that points to a `.ini` file located in the root of the project or in a location specified by `PATH_TO_CONFIG`.

#### Using an `.env` file within the repository

```bash
cd /home/<your-user>/workspace/apoclyps/reviews
touch .env

echo "REVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example" >> .env
python -m reviews config
```

#### Using an `.ini` file within the repository

```bash
cd /home/<your-user>/workspace/apoclyps/reviews
touch settings.ini
echo "[settings]\nREVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example" >> settings.ini

python -m reviews config
```

#### Providing a configuration path

If you wish to set the configuration path to use an `ini` or `.env` file when running the application, you can use the configuration of a specific file by supplying the path to the configuration like so:

```bash
cd /home/apoclyps/
touch settings.ini
echo "[settings]\nREVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example" >> settings.ini

cd /home/<your-user>/workspace/apoclyps/reviews
export REVIEWS_PATH_TO_CONFIG=/home/<your-user>/

python -m reviews config
```

If at any time, you want to confirm your configuration reflects the file you have provided, you can use `reviews config` to view what current configuration of Reviews.

### Testing

A test suite has been included to ensure Reviews functions correctly.

To run the entire test suite with verbose output, run the following:

```bash
$ pytest -vvv
```

Alternatively, to run a single set of tests.

```bash
$ pytest -vvv tests/test_config.py
```

All tests can be run within docker by using the following command:

```bash
$ docker-compose build pytest && docker-compose run --rm pytest
```

### Linting

To 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 up ``pre-commit`` to 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:
```bash
pre-commit install
```

### Contributions

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/apoclyps/reviews",
    "name": "reviews",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Reviews,pull request review",
    "author": "Kyle Harrison",
    "author_email": "kyle.harrison.dev@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e7/8f/736054ab7a548e6dfab5f7b56b43ee38fff1d2880274f60d5071dfdcb634/reviews-0.6.0.tar.gz",
    "platform": null,
    "description": "# Reviews\n\n[![Tests](https://github.com/apoclyps/reviews/actions/workflows/test.yml/badge.svg)](https://github.com/apoclyps/reviews/actions/workflows/test.yml)\n![pypi](https://img.shields.io/pypi/v/reviews.svg)\n![versions](https://img.shields.io/pypi/pyversions/reviews.svg)\n\n![](https://banners.beyondco.de/Reviews.png?theme=light&packageManager=pip+install&packageName=reviews&pattern=plus&style=style_1&description=Monitor+requests+for+Code+Reviews&md=1&showWatermark=0&fontSize=225px&images=link&widths=250)\n\nSimplify requests for code review with an all-in-one TUI dashboard providing an overview of open PRs requiring review!\n\n### Quick Start\n\nIf you want to get up and running with Reviews immediately, run:\n\n```bash\nexport GITHUB_USER=\"your-github-username\"\nexport GITHUB_TOKEN=\"your personal GitHub token used for interacting with the API\"\nexport REVIEWS_GITHUB_REPOSITORY_CONFIGURATION=\"apoclyps/reviews\"\n\npip install --upgrade reviews\n\nreviews config --show\n\nreviews dashboard\n```\n\n[![asciicast](https://asciinema.org/a/414444.svg)](https://asciinema.org/a/414444)\n\n### Additional Support\n\n#### View Configuration\n\nIf 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):\n\n```bash\nreviews config --hide\n\nreviews config --show\n```\n\n#### Gitlab\n\nIf you wish to use `reviews` with Gitlab, you will need to specify the configuration like so: `product id:project name/repository` and use the `--provider=gitlab` flag when running `reviews`:\n\n```bash\nexport GITLAB_USER=user\nexport GITLAB_TOKEN=token\nexport REVIEWS_GITLAB_REPOSITORY_CONFIGURATION=\"27629846:apoclyps/reviews\"\n\nreviews dashboard --provider=gitlab\n```\n\n### Getting started with local development\n\nTo build and run the CLI on your host, you will need Python 3.9, pip, and virtualenv to build and run `review`.\nIf you wish to publish a PR with your changes, first create a fork on Github and clone that code.\n\n```bash\n$ gh repo clone apoclyps/reviews\n$ cd reviews\n$ python3 -m venv env\n$ source env/bin/activate\n(env)$ pip install -r requirements_dev.txt\n(env)$ pip install -r requirements.txt\n(env)$ python -m reviews dashboard\n```\n\nIf you wish to keep a copy of Reviews on your host system, you can install and run it using:\n\n```bash\n$ export REVIEWS_GITHUB_REPOSITORY_CONFIGURATION=\"apoclyps/reviews\"\n$ python -m venv env\n$ source env/bin/activate\n$ python -m pip install -e .\n$ reviews -h\n```\n\nYou can run the Reviews within Docker:\n\n```bash\ndocker-compose build cli && docker-compose run --rm cli python -m reviews dashboard\n```\n\nTo build an image and run that image with all of the necessary dependencies using the following commands:\n\n```bash\n$ docker-compose build cli\n$ docker-compose run --rm cli python -m reviews dashboard\n```\n\nFor instructions on setting up a development environment outside of Docker, check out the [wiki](https://github.com/apoclyps/reviews/wiki/Development-Enviromnent).\n\n### Configuration\n\nReviews supports both .ini and .env files. Reviews always searches for configuration in this order:\n\n* Environment variables;\n* Repository: ini or .env file;\n* Configuration Path\n* Review Defaults\n\nThe following steps are used to provide the configuration using a `.env` or `.ini` file. The configuration can be read from within the module/repository (default location set by decouple) using the `.env` file or via a location specified by an environmental variable that points to a `.ini` file located in the root of the project or in a location specified by `PATH_TO_CONFIG`.\n\n#### Using an `.env` file within the repository\n\n```bash\ncd /home/<your-user>/workspace/apoclyps/reviews\ntouch .env\n\necho \"REVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example\" >> .env\npython -m reviews config\n```\n\n#### Using an `.ini` file within the repository\n\n```bash\ncd /home/<your-user>/workspace/apoclyps/reviews\ntouch settings.ini\necho \"[settings]\\nREVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example\" >> settings.ini\n\npython -m reviews config\n```\n\n#### Providing a configuration path\n\nIf you wish to set the configuration path to use an `ini` or `.env` file when running the application, you can use the configuration of a specific file by supplying the path to the configuration like so:\n\n```bash\ncd /home/apoclyps/\ntouch settings.ini\necho \"[settings]\\nREVIEWS_REPOSITORY_CONFIGURATION=apoclyps/micropython-by-example\" >> settings.ini\n\ncd /home/<your-user>/workspace/apoclyps/reviews\nexport REVIEWS_PATH_TO_CONFIG=/home/<your-user>/\n\npython -m reviews config\n```\n\nIf at any time, you want to confirm your configuration reflects the file you have provided, you can use `reviews config` to view what current configuration of Reviews.\n\n### Testing\n\nA test suite has been included to ensure Reviews functions correctly.\n\nTo run the entire test suite with verbose output, run the following:\n\n```bash\n$ pytest -vvv\n```\n\nAlternatively, to run a single set of tests.\n\n```bash\n$ pytest -vvv tests/test_config.py\n```\n\nAll tests can be run within docker by using the following command:\n\n```bash\n$ docker-compose build pytest && docker-compose run --rm pytest\n```\n\n### Linting\n\nTo run individual linting steps:\n\n```\ndocker-compose build test\ndocker-compose run --rm --no-deps test isort .\ndocker-compose run --rm --no-deps test black --line-length 119 --check .\ndocker-compose run --rm --no-deps test mypy .\ndocker-compose run --rm --no-deps test flake8 .\ndocker-compose run --rm --no-deps test pylint --rcfile=.pylintrc reviews\ndocker-compose run --rm --no-deps test bandit reviews\ndocker-compose run --rm --no-deps test vulture --min-confidence 90 reviews\ndocker-compose run --rm --no-deps test codespell reviews\ndocker-compose run --rm --no-deps test find . -name '*.py' -exec pyupgrade {} +\n```\n\nYou can also set up ``pre-commit`` to run the linting steps automatically during the commit phase,\nthe pre-commit pipeline can be set up by running the following command on the project root:\n```bash\npre-commit install\n```\n\n### Contributions\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A terminal UI dashboard to monitor requests for code review across Github repositories.",
    "version": "0.6.0",
    "split_keywords": [
        "reviews",
        "pull request review"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6830dac8027d73c7f9f363b3c8e0d840289485cbdd6fd5d32fa5cb12a8ab0375",
                "md5": "67bdf3512c0ae35248a6502758e32a54",
                "sha256": "04cdfc23c9a5ef18e7fece99570e3ffeab6d0e9899223ec64b06a8d0a477b808"
            },
            "downloads": -1,
            "filename": "reviews-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "67bdf3512c0ae35248a6502758e32a54",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 18345,
            "upload_time": "2023-02-03T09:03:33",
            "upload_time_iso_8601": "2023-02-03T09:03:33.498793Z",
            "url": "https://files.pythonhosted.org/packages/68/30/dac8027d73c7f9f363b3c8e0d840289485cbdd6fd5d32fa5cb12a8ab0375/reviews-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e78f736054ab7a548e6dfab5f7b56b43ee38fff1d2880274f60d5071dfdcb634",
                "md5": "9c5a52f353b0f7ae1a3c3ecf2b4edd8c",
                "sha256": "5ebe84320f19dce0137c44025a71e63eb0c08512d351d9f5ce0e0de8ad15ac98"
            },
            "downloads": -1,
            "filename": "reviews-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9c5a52f353b0f7ae1a3c3ecf2b4edd8c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15702,
            "upload_time": "2023-02-03T09:03:35",
            "upload_time_iso_8601": "2023-02-03T09:03:35.261815Z",
            "url": "https://files.pythonhosted.org/packages/e7/8f/736054ab7a548e6dfab5f7b56b43ee38fff1d2880274f60d5071dfdcb634/reviews-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-03 09:03:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "apoclyps",
    "github_project": "reviews",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "reviews"
}
        
Elapsed time: 0.03595s