Metadata-Version: 2.1
Name: panoramic-cli
Version: 1.3.2
Summary: Panoramic Command Line Tool
Home-page: https://github.com/panoramichq/panoramic-cli
Author: Panoramic
Maintainer: Panoramic
License: UNKNOWN
Project-URL: Source Code, https://github.com/panoramichq/panoramic-cli
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: panoramic-auth (>=0.2.0)
Requires-Dist: requests (>=2.24.0)
Requires-Dist: click (>=7.1.2)
Requires-Dist: colorama (>=0.4.3)
Requires-Dist: PyYAML (==5.3.1)
Requires-Dist: packaging (>=20.4)
Requires-Dist: tqdm (>=4.47.0.)
Requires-Dist: python-dotenv (>=0.14.0)
Requires-Dist: jsonschema (>=3.2.0)
Requires-Dist: importlib-resources ; python_version < "3.7"
Provides-Extra: dev
Requires-Dist: pytest (>=5.3.5) ; extra == 'dev'
Requires-Dist: responses (>=0.10.14) ; extra == 'dev'
Requires-Dist: freezegun (>=0.3.15) ; extra == 'dev'
Requires-Dist: pytest-recording (>=0.8.1) ; extra == 'dev'
Requires-Dist: mypy (>=0.790) ; extra == 'dev'
Requires-Dist: flake8 (>=3.8.3) ; extra == 'dev'
Requires-Dist: black (==20.8b0) ; extra == 'dev'
Requires-Dist: pre-commit (>=2.1.1) ; extra == 'dev'
Provides-Extra: tests
Requires-Dist: pytest (>=5.3.5) ; extra == 'tests'
Requires-Dist: responses (>=0.10.14) ; extra == 'tests'
Requires-Dist: freezegun (>=0.3.15) ; extra == 'tests'
Requires-Dist: pytest-recording (>=0.8.1) ; extra == 'tests'

# Panoramic CLI

[![Build Status](https://travis-ci.com/panoramichq/panoramic-cli.svg?branch=master)](https://travis-ci.com/panoramichq/panoramic-cli)
[![Last Commit](https://img.shields.io/github/last-commit/panoramichq/panoramic-cli)](https://github.com/panoramichq/panoramic-cli/commits)
[![Latest Release](https://img.shields.io/github/v/release/panoramichq/panoramic-cli)](https://github.com/panoramichq/panoramic-cli/releases)
[![License](https://img.shields.io/pypi/l/panoramic-cli.svg)](https://github.com/panoramichq/panoramic-cli/blob/master/LICENSE)
[![PyPI Download](https://img.shields.io/pypi/pyversions/panoramic-cli.svg)](https://pypi.org/project/panoramic-cli/)

This repository contains the Panoramic Command Line tool. This tool allows you to create & maintain your Panoramic data models. It is built with Python 3.6+ and can be installed via PyPI or other similar tools.

## Installation

To install the CLI, use [`pip`](https://pip.pypa.io/en/stable/quickstart/) or [`pipenv`](https://docs.pipenv.org):

```console
$ pip install -U panoramic-cli
```

## Usage

Once you install the CLI tool, you can call it using `pano` on the command line. For more information, run `pano` with no commands to see the help information:

```
Usage: pano [OPTIONS] COMMAND [ARGS]...

Options:
  --debug     Enables debug mode
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  configure         Configure pano CLI options
  detect-joins      Detect joins under a dataset
  field             Commands on local field files.
  init              Initialize metadata repository
  list-companies    List available companies
  list-connections  List available data connections
  pull              Pull models from remote
  push              Push models to remote
  scan              Scan models from source
  validate          Validate local files
```

## Release process

To release a new version of the library, follow these steps:

* In your PR, update version in [__version__.py](src/panoramic/cli/__version__.py) and add entry to [CHANGELOG.md](CHANGELOG.md)
* After merge, tag the commit with version number from setup.py. For example `git tag v0.1.1`.
* Once the tag is pushed, it will trigger a build with Travis, which will publish the new version on PyPI.

## Development

### Virtual Environment Using venv

Add python virtual environment using python venv (adds `.venv` inside current directory):

```
> python3 -m venv .venv
```

Then, you can switch to it from command-line using following command:

```
> source .venv/bin/activate
```

### Virtual Environment Using pyenv

Alternatively if you use pyenv and pyenv-virtualenv, you can create virtual environment using:

```
> pyenv virtualenv pano-cli
```

And use the created virtual environment:

```
> pyenv local pano-cli
```

### Build and Run

Use following command to install dependencies (make sure you have correct python environment active):

```
> make install
```

Now you should have `pano` package available. First create config. You need to ask friendly SRE Team Member for OAuth credentials for yourself.

```
> pano configure
```

And finally you are ready to use `pano`. You can find all commands in help:

```
> pano -h
```

## Tests

Use following command to run all tests:

```
> make test
```

Use following command to run all other checks:

```
> make lint
```

## Pre commit hooks

You can install pre-commit. It is useful to avoid commiting code that doesn't pass the linter. It installs git hooks that run pre-commit.

```
> make pre-commit-install
```

## VSCode

You can use following debug config to run pano cli using VSCode debugger:

```
{
    "name": "Python: Pano CLI Scan",
    "type": "python",
    "request": "launch",
    "module": "panoramic.cli",
    "args": ["scan", "testsource"]
}
```


