Skip to main content

Panoramic Command Line Tool

Project description

Pano Data Tool

Build Status Last Commit Latest Release License PyPI Download

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

Installation

To install the CLI, use pip or pipenv:

$ pip install -U pano

Usage

Once you install the 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:
  detect-joins      Detect joins under a dataset
  field             Commands on local field files.
  init              Initialize metadata repository
  scan              Scan remote database and generates models for found objects
  validate          Validate local files

See docs folder for more extensive documentation.

Release process

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

  • In your PR, update version in __version__.py and add entry to 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 GitHub Actions, which will publish the new version on PyPI and create a release on GitHub.

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

Capture expectations for tests by setting environment variable APP_WRITE_EXPECTATIONS=true.

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

Generate documentation about TEL functions

Documentation under docs folder can be generated by running

> make docs

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"]
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pano-2.1.0.tar.gz (223.2 kB view details)

Uploaded Source

Built Distribution

pano-2.1.0-py3-none-any.whl (236.2 kB view details)

Uploaded Python 3

File details

Details for the file pano-2.1.0.tar.gz.

File metadata

  • Download URL: pano-2.1.0.tar.gz
  • Upload date:
  • Size: 223.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for pano-2.1.0.tar.gz
Algorithm Hash digest
SHA256 90066e7623a342d2de50cc54671d9d47a8e4a90722a6285fd73c7c9485d1170d
MD5 cf147d871b2a95aeda040513098a9018
BLAKE2b-256 e74a3a8c9a29d060eba68df04e4d9199e94e3e52cf68206599ac8b60b8bc747d

See more details on using hashes here.

File details

Details for the file pano-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: pano-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 236.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for pano-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c9578e53ca17032592f545113608b6e0ef4cf379f472cf9d9525e898397efd5
MD5 35e093103d9a4b15f393da27a66a7777
BLAKE2b-256 f4b8c6ce2f943c343b9d578d07584ab613361413665f4820d6fcf2de764de9e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page