Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vguptarippling committed May 14, 2024
0 parents commit 0c79767
Show file tree
Hide file tree
Showing 53 changed files with 2,996 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @Rippling/apps
/rippling_cli/ @Rippling/flux
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint
on:
pull_request:
workflow_dispatch:
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Linter
run: ./run_ruff.sh

mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install poetry
run: pip install poetry

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- run: poetry install

- name: mypy
run: poetry run mypy ./rippling_cli
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Test
on:
pull_request:
workflow_dispatch:
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install poetry
run: pip install poetry

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- run: poetry install

- name: pytest
run: poetry run pytest
166 changes: 166 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

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

# 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

# Formula ruby file
*.rb

# 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/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# 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

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

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

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

# rippling cli
.rippling_cli/
23 changes: 23 additions & 0 deletions DEVELOPER.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Setting up rippling-cli

## Prerequisites

- Python 3.10 or higher
- pip (Python package installer)
- Poetry (Python dependency management and packaging tool)

## Installation

1. Clone the repository:
```
git clone https://github.com/your-repo/rippling-cli.git
```
2. Navigate to the project directory.
3. Create a virtual environment and install the project dependencies using poetry.
```
poetry install
```
4. Install the project in editable mode.
```
python -m pip install -e .
```
69 changes: 69 additions & 0 deletions DEV_TESTING.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
## Running the CLI

### Run using python
Run the following command:
```
python ./rippling_cli/cli/main.py
```
If the setup is complete, you should see the following output.
<details>
<summary>screenshot</summary>

![image](https://github.com/Rippling/rippling-cli/assets/88705494/32909c62-f0b4-429a-b288-1b0cbe82089e)
</details>

### Run using pyinstaller
- Install pyinstaller using the following command:
```
pip install pyinstaller
```
- Install the pyinstaller executable using the following command:
```
pyinstaller rippling_cli/cli/main.py --name rippling --noconfirm
```
- Run the executable using the following command:
```
./dist/rippling/rippling [your command here]
```
You can set up alias for the path of executable to run it from anywhere in the terminal.

### Run using homebrew

Pre-requisites:
- Install the homebrew
- Generate the pyinstaller executable as mentioned above.


Steps:
- Create the tar file using pyinstaller executable.
```
tar -cvf rippling.0.1.0.tar dist/rippling
```
- Gzip the tar file using the below command
```
gzip rippling.0.1.0.tar
```
- Create a formula file rippling.rb in the current directory.
- replace the url with the path of the tar file.
- generate the sha256 of the tar file using the below command.
```
shasum -a 256 rippling.0.1.0.tar.gz
```
```angular2html
class Rippling < Formula
desc "Rippling CLI"
homepage "https://github.com/Rippling/rippling-cli"
url "file:///path/to/rippling-cli/rippling.0.1.0.tar.gz"
sha256 "copy the sha256 of the tar file"
def install
bin.install "rippling/_internal"
bin.install "rippling/rippling"
end
end
```
- Install the formula using the below command.
```
brew install rippling.rb
```
Now you can run the rippling command from anywhere in the terminal.
53 changes: 53 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
End User License Agreement

IMPORTANT: PLEASE READ BEFORE INSTALLATION OR USE OF THE SOFTWARE PROVIDED WITH THIS END USER LICENSE AGREEMENT (AND RELATED DOCUMENTATION) (COLLECTIVELY, “PRODUCT(S)”).

BY INSTALLING OR IN ANY WAY USING THE PRODUCT, THE ENTITY OR COMPANY THAT YOU REPRESENT ("LICENSEE") IS UNCONDITIONALLY CONSENTING TO BE BOUND BY AND IS BECOMING A PARTY TO THIS END USER LICENSE AGREEMENT
AND LIMITED WARRANTY ("AGREEMENT") WITH PEOPLE CENTER, INC. (“RIPPLING”). IF LICENSEE DOES NOT UNCONDITIONALLY AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN INSTALLATION OR USE OF THIS PRODUCT IS STRICTLY
PROHIBITED. IF THESE TERMS ARE CONSIDERED AN OFFER, ACCEPTANCE IS EXPRESSLY LIMITED TO THESE TERMS.

1. GRANT; PROPRIETARY RIGHTS. Subject to the terms of this Agreement, Rippling hereby grants Licensee (and only Licensee) a limited, personal, non-sublicensable, non-transferable, royalty-free, nonexclusive license to
use the Product only for Licensee’s organization’s legitimate and lawful business purposes and only in accordance with the related documentation. As between the parties, title, ownership rights, and intellectual property
rights in and to the Product, and any copies or portions thereof, shall remain in Rippling. Licensee understands that Rippling may modify or discontinue offering the Product at any time. The Product is protected by the
copyright laws of the United States and international copyright treaties, and this Agreement does not grant Licensee any rights not expressly granted herein. Further, Licensee acknowledges that the Product, its features
and functionality, and all related information and documentation are confidential to Rippling and its suppliers (“Confidential Information”), and Licensee agrees at all times to protect and preserve in strict confidence
all such Confidential Information and use it only as expressly permitted herein. Licensee agrees not to permit or authorize access to, or disclosure of any such Confidential Information to any person other than employees
of Licensee who are bound in writing to terms no less restrictive than this Agreement and have a need to access the Product and documentation for the benefit of the Licensee.

2. RESTRICTIONS. Except as expressly and unambiguously permitted by this Agreement, Licensee shall not, nor permit anyone else to, directly or indirectly: (i) reverse engineer, disassemble, decompile or otherwise attempt to
discover the source code or structure, sequence and organization of the Product (except where the foregoing is expressly prohibited by applicable local law, and then only to the extent so prohibited); (ii) use the Product for
performing comparisons or other "benchmarking" activities, either alone or in connection with any software (and Licensee will not publish or disclose any such performance information or comparisons); (iii) use any Product
add-ons or additional features unless Licensee has a valid subscription and has timely paid all applicable fees, or (iv) otherwise use any Product for any purpose not expressly and unambiguously authorized herein (including,
without limitation, for any purpose competitive with Rippling). However, the foregoing is not intended to limit the terms of any applicable open source license that may apply to any portion or component of the Product (as
described in the Product code or relevant documentation). Licensee shall maintain and not remove or obscure any proprietary notices on the Product.

3. SUPPORT AND UPGRADES. This Agreement does not entitle Licensee to any support, upgrades, patches, enhancements, or fixes for the Product (collectively, "Support"). Any such Support for the Product that may be made available
by Rippling shall become part of the Product and subject to this Agreement.

4. FEES. Licensee shall pay Rippling the fees for the Product, if any, designated by Rippling (or its applicable partner). All fees shall be non-refundable and payable in US dollars on the date they come due. Licensee shall
also pay all sales, use, value-added and other taxes, tariffs and duties of any type assessed against Rippling except for U.S. taxes on Rippling’s income.

5. WARRANTY DISCLAIMER. RIPPLING PROVIDES THE PRODUCTS "AS IS" AND WITHOUT WARRANTY OF ANY KIND, AND HEREBY DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE, PERFORMANCE, RELIABILITY, AND NON-INFRINGEMENT. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS AGREEMENT.

6. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, INCLUDING, BUT NOT LIMITED TO, TORT, CONTRACT, NEGLIGENCE, STRICT LIABILITY, OR OTHERWISE, SHALL LICENSOR OR ITS SUPPLIERS OR RESELLERS BE LIABLE
TO LICENSEE OR ANY OTHER PERSON FOR (A) ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, ACCURACY OF RESULTS,
COMPUTER FAILURE OR MALFUNCTION, OR LOSS OR CORRUPTION OF DATA, OR (B) ANY AMOUNT IN THE AGGREGATE IN EXCESS OF THE FEES PAID BY LICENSEE FOR THE APPLICABLE PRODUCT IN THE TWELVE (12) MONTHS PRECEDING THE DATE THE CLAIM AROSE,
OR, IF GREATER, ONE HUNDRED DOLLARS ($100). THE FOREGOING LIMITATIONS SHALL APPLY EVEN IF LICENSOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

7. TERMINATION. Licensee agrees that Rippling, in its sole discretion, may suspend or terminate Licensee’s use of the Product, immediately and for any reason, including, without limitation, if Rippling believes that Licensee
has violated or acted inconsistently with the letter or spirit of this Agreement. Upon receiving notice of termination from Rippling, Licensee will destroy or remove from all computers, networks, and storage media all copies
of the Product. Sections 2 and 4 through 10 shall survive termination of this Agreement.

8. GOVERNMENT USE. If Licensee is part of an agency, department, or other entity of the United States Government (“Government”), the use, duplication, reproduction, release, modification, disclosure or transfer of the Product
is restricted in accordance with the Federal Acquisition Regulations as applied to civilian agencies and the Defense Federal Acquisition Regulation Supplement as applied to military agencies. The Product is “commercial item,”
“commercial computer software” and “commercial computer software documentation.” In accordance with such provisions, any use of the Product by the Government shall be governed solely by the terms of this Agreement.

9. EXPORT CONTROLS. Licensee shall comply with all export laws and restrictions and regulations of the Department of Commerce, the United States Department of Treasury Office of Foreign Assets Control (“OFAC”), or other United
States or foreign agency or authority, and will not export, or allow the export or re-export of, the Product in violation of any such restrictions, laws or regulations. By downloading or using the Product, Licensee is agreeing
to the foregoing and Licensee is representing and warranting that Licensee is not located in, under the control of, or a national or resident of any restricted country or on any such list.

10. MISCELLANEOUS. This Agreement is personal to Licensee and Licensee shall not assign or transfer this Agreement or the Product to any third party under any circumstances. This Agreement represents the complete agreement
concerning this license between the parties and supersedes all prior agreements and representations between them. It may be amended only by a writing executed by both parties. If any provision of this Agreement is held to be
unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable. This Agreement will be governed by the laws of the State of Delaware, exclusive of its rules governing choice
of law and conflict of laws.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# rippling-cli
The Rippling Command Line Interface (Rippling CLI) is a unified tool to programmatically invoke Rippling services. The Flux commands as part of the Rippling CLI allow both first-party and third-party App developers to create, manage and deploy Rippling-hosted integrations.
3 changes: 3 additions & 0 deletions install_hooks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

cp -f run_ruff.sh .git/hooks/pre-commit
Loading

0 comments on commit 0c79767

Please sign in to comment.