Metadata-Version: 2.1
Name: sonyci
Version: 0.2.3
Summary: A Sony Ci api client
Author-Email: WGBH-MLA <ryan_harbert@wgbh.org>
License: MIT
Requires-Python: >=3.8
Requires-Dist: pydantic>=2.3
Requires-Dist: requests-oauth2client~=1.1
Requires-Dist: loguru>=0.7
Requires-Dist: pytest~=7.4; extra == "test"
Requires-Dist: vcrpy~=4.4; extra == "test"
Requires-Dist: pytest-vcr~=1.0; extra == "test"
Requires-Dist: pytest-cov~=4.1; extra == "test"
Requires-Dist: pytest-sugar~=0.9; extra == "test"
Requires-Dist: pytest-xdist~=3.3; extra == "test"
Requires-Dist: urllib3~=1.26; extra == "test"
Requires-Dist: typer[all]~=0.9; extra == "cli"
Requires-Dist: typer~=0.9; extra == "cli-ci"
Requires-Dist: trogon~=0.5; extra == "tui"
Requires-Dist: mkdocs~=1.5; extra == "docs"
Requires-Dist: mkdocs-material~=9.2; extra == "docs"
Requires-Dist: mkdocs-git-revision-date-localized-plugin~=1.2; extra == "docs"
Requires-Dist: mike~=1.1; extra == "docs"
Requires-Dist: mkdocstrings[python]~=0.22; extra == "docs"
Requires-Dist: mkdocs-jupyter~=0.24; extra == "docs"
Provides-Extra: test
Provides-Extra: cli
Provides-Extra: cli-ci
Provides-Extra: tui
Provides-Extra: docs
Description-Content-Type: text/markdown

![deploy](https://github.com/WGBH-MLA/sonyci/actions/workflows/CI.yml/badge.svg)
[![codecov](https://codecov.io/gh/WGBH-MLA/sonyci/branch/main/graph/badge.svg?token=6J7UUYW9I9)](https://codecov.io/gh/WGBH-MLA/sonyci)
<a href="https://codecov.io/gh/WGBH-MLA/sonyci"><img height=20 src="https://codecov.io/gh/WGBH-MLA/sonyci/branch/main/graphs/tree.svg?token=6J7UUYW9I9"></img></a>

# sonyci

A Sony Ci api client

## Install

```shell
pdm install
```

## Configure

Create a file called `.cred` with the following contents, and add your credentials:

```shell
export CI_USERNAME=
export CI_PASSWORD=
export CI_CLIENT_ID=
export CI_CLIENT_SECRET=
export CI_WORKSPACE_ID=
```

Activate the variables:

```shell
source .cred
```

Alternate notation: (May not be available in your terminal)

```shell
. .cred
```

## Use

Run the cli with `ci`

```shell
$ ci -h

 Usage: ci [OPTIONS] COMMAND [ARGS]...

╭─ Options ─────────────────────────────────────────────────────────────────────────────────────╮
│ --version             -v            Show the version and exit.                                │
│ --token               -t      TEXT  Sony CI token. [env var: TOKEN] [default: None]           │
│ --install-completion                Install completion for the current shell.                 │
│ --show-completion                   Show completion for the current shell, to copy it or      │
│                                     customize the installation.                               │
│ --help                -h            Show this message and exit.                               │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────────────────────────────────╮
│ login                    Login to Sony CI.                                                    │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯

```

### Login

```shell
ci login
```

## develop

### pre-commit secret scanning

0. Install [ggshield](https://docs.gitguardian.com/ggshield-docs/getting-started)

```shell
pip install ggshield
# or
brew install gitguardian/tap/ggshield
```

1. Login to gitguardian

```shell
ggshield auth login
```

2. Install the pre-commit hooks

```shell
pre-commit install
```
