Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
degagne committed Aug 6, 2021
0 parents commit 1083fa1
Show file tree
Hide file tree
Showing 44 changed files with 2,782 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
77 changes: 77 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# Distribution / packaging
.Python
build/
_build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
Makefile

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
test.py
tests/

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
19 changes: 19 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

python:
version: 3.6
install:
- requirements: docs/requirements.txt
- method: pip
path: .
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.0.1-dev0] - 2021-08-05

- Initial release (new project)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Deric Degagne

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# ranger-cli

[![RangerCLI Version](https://img.shields.io/pypi/v/ranger-cli?style=for-the-badge)](https://pypi.org/project/ranger-cli/)
[![RangerCLI Status](https://img.shields.io/pypi/status/ranger-cli?style=for-the-badge)](https://pypi.org/project/ranger-cli)
[![RangerCLI Python Versions](https://img.shields.io/pypi/pyversions/ranger-cli?style=for-the-badge)](https://pypi.org/project/ranger-cli/)
[![RangerCLI Release](https://img.shields.io/github/release/degagne/ranger-cli?style=for-the-badge)](https://github.com/degagne/ranger-cli/releases/)
[![RangerCLI License](https://img.shields.io/github/license/degagne/ranger-cli?style=for-the-badge)](https://github.com/degagne/ranger-cli/blob/master/LICENSE)

**ranger-cli** provides a straghtforward interface for managing resources within the Apache Ranger framework. The open-source project is hosted on GitHub
and is built on top of the Apache Ranger public REST APIs.

## Installation

It's recommended to be installed using [pip](https://pip.pypa.io/en/stable/).

```bash
pip install ranger-cli
```

Releases are listed on the [Releases](https://github.com/degagne/ranger-cli/releases) page.

## Documentation

For documentation, please visit [ranger-cli](https://ranger-cli.readthedocs.io/en/latest/index.html).

## License

`ranger-cli` is licensed under MIT license. See the [LICENSE](https://github.com/degagne/ranger-cli/blob/master/LICENSE) for more information.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
body, body.wy-body-for-nav {
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
}

.wy-nav-content {
max-width: 900px;
}

div[class^=highlight] {
border: none!important;
}

div[class^=highlight] pre {
font-family: monospace!important;
font-size: 13px!important;
}

.code-block-caption {
font-style: normal!important;
text-align: left!important;
background: #d5d8d9!important;
padding: 8px 12px !important;
}

.highlight {
background: #edf0f2!important;
}

code.literal {
border: none!important;
color: black!important;
font-size: 15px!important;
font-family: monospace!important;
padding: 0px!important;
background: none!important;
}
49 changes: 49 additions & 0 deletions docs/cli/configure.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
=============
Configure CLI
=============

The purpose of the ``configure`` command, is to provide users the ability to create, update or
delete connection profiles. Connection profiles are use to establish connections to Apache
Ranger REST API environments.

To display the usage documentation, run:

.. code-block:: bash
:caption: Bash
$ ranger-cli configure --help
.. contents:: Command examples
:local:
:depth: 2
:backlinks: none

.. raw:: html

<hr>

Create a connection profile
***************************

The following command will create the "default" profile. If you wish to create a different
profile, then you need to include the ``--profile`` option.

.. code-block:: bash
:caption: Bash
$ ranger-cli configure
Delete a connection profile
***************************

To delete a connection profile, execute the ``configure`` with the ``--delete`` flag.

.. code-block:: bash
:caption: Bash
$ ranger-cli configure --delete --profile <profile-name>
.. warning::

Please be advised that if you do not include ``--policy`` option, the default profile
will be deleted if it exists.
90 changes: 90 additions & 0 deletions docs/cli/plugins.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
===========
Plugins CLI
===========

Administration for Apache Ranger's plugins public REST API. Users can view Apache Ranger plugins.

To display usage documentation, run:

.. code-block:: bash
:caption: Bash
$ ranger-cli plugins --help
.. contents:: Command examples
:local:
:depth: 2
:backlinks: none

.. raw:: html

<hr>

Get plugins info
****************

Gets all Apache Ranger plugins info.

To display usage documentation, run:

.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --help
Get plugins info by apptype
***************************

Gets all Apache Ranger plugins info by app type.

To display usage documentation, run:

.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --help
.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --apptype yarn
On success, this command returns a JSON object with the service definitions found.

Get plugins info by hostname
****************************

Gets all Apache Ranger plugins info by hostname.

To display usage documentation, run:

.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --help
.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --hostname nn.example.com
On success, this command returns a JSON object with the service definitions found.

Get plugins info by service name
********************************

Gets all Apache Ranger plugins info by service repository name.

To display usage documentation, run:

.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --help
.. code-block:: bash
:caption: Bash
$ ranger-cli plugins info --service-name cl1_hive
On success, this command returns a JSON object with the service definitions found.

0 comments on commit 1083fa1

Please sign in to comment.