Skip to main content

jccli

A command line client used to administrate the hosted Jumpcloud identity provider service.

Getting Started

Install

pip install git+https://github.com/Sage-Bionetworks/jccli

Usage

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

  Run jccli.

Options:
  -k, --key TEXT       Jumpcloud API key
  -v, --verbosity LVL  Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --version            Show the version and exit.
  --help               Show this message and exit.

Commands:
  group  Group of commands for Jumpcloud groups :param ctx: :param key:...
  sync   Sync Jumpcloud with a data file
  user   User group of functions :param ctx: context object :return:
> jccli --key XXXXXXXXXX61d2 user get --username jsmith
{
  "id": "9ba6cc40d82ee45d5f73da2e",
  "account_locked": false,
  "activated": true,
  "firstname": "Joe",
  "job_title": "",
  "lastname": "Smith",
  ..
  ..
}

Contributions

Contributions are welcome.

Requirements

Install these utilities:

Process

Before making a commit, you should syntactically validate your code and configurations with pre-commit.

You can set up pre-commit hooks to automatically be run before every commit by running: pre-commit install. Alternatively, you can manually execute the validations by running pre-commit run --all-files.

Tests

JCCLI's test suite consists of unit tests and integration tests. The integration tests depend on the environment variable JC_API_KEY, which should be a Jumpcloud API key corresponding to a blank Jumpcloud instance which can be used for testing purposes.

We use Travis-CI to automate our testing. This repo's Travis configuration is set up to run the unit test suite (in unit_tests/) on every pull request and push, and to run the integration test suite (in integration_tests/) only on a push.

GitHub

Contributors are requested to use the following process (in the examples, we'll suppose that a user named john-smith wants to fix some typos in the documentation):

  1. Make a fork of JCCLI. E.g. Sage-Bionetworks:jcclijohn-smith:jccli
  2. Make a branch off of master named after a feature or issue. E.g. john-smith:jccli/masterjohn-smith:jccli/fix-typo-in-docs
  3. Make commits to that branch (in this example, john-smith:jccli/fix-typo-in-docs). When pushed to GitHub, they should trigger Travis to run unit tests and integration tests. For the integration tests to pass, contributors need to make sure that the JC_API_KEY environmental variable in their Travis CI environment is set to a Jumpcloud API Key —specifically, one corresponding to a "blank" Jumpcloud instance.
  4. Make a pull request from the feature/issue branch on the fork (e.g. john-smith:jccli/fix-typo-in-docs) to Sage-Bionetworks:jccli/master.
  5. Wait for maintainers to review code and approve the pull request.

Maintainers should use the following process for reviewing and approving outside pull requests:

  1. Examine proposed changes on GitHub. Pay special attention to hidden environment variables (as of write time, JC_API_KEY) and make sure nothing in the changes could expose them or use them for unintended purposes. If in doubt, DO NOT proceed to the next step.
  2. Incorporate the changes into a new branch in our repo, e.g. create a branch Sage-Bionetworks:jccli/fix-typo-in-docs and manually pull in the changes from john-smith:jccli/fix-typo-in-docs. Make a new tracking remote branch (i.e. git push --set-upstream origin fix-typo-in-docs, or whatever the name of your remote is, instead of origin) and push to it in order to trigger a Travis CI build. Make sure that the integration-test job ran and passed successfully.
  3. Approve/merge the pull request and delete the feature branch made for testing purposes (Sage-Bionetworks:jccli/fix-types-in-docs, in the example).

Versioning

We try to follow semantic versioning as much as possble. We use bump2version to help automate versioning of this project.

To manually bump the version:

bumpversion patch --config-file setup.cfg

Releasing

We have setup our CI to automate a release of this app. To kick off the process just create a tag (i.e v1.0.0) and push to the repo. It is important to have the v in the tag and the tag must be the same number as the current version. Our CI will do the work of publishing the app to pypi and then bumping to the next version for development.

Resources

Below are some handy resource links.

  • Project Documentation
  • Click is a Python package for creating beautiful command line interfaces in a composable way with as little code as necessary.
  • Sphinx is a tool that makes it easy to create intelligent and beautiful documentation, written by Geog Brandl and licnsed under the BSD license.
  • pytest helps you write better programs.
  • GNU Make is a tool which controls the generation of executables and other non-source files of a program from the program's source files.

Authors

  • zaro0508 - Initial work - github

See also the list of contributors who participated in this project.

Download files

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

Source Distribution

jccli-0.0.14.tar.gz (15.7 kB view details)

Uploaded Source

File details

Details for the file jccli-0.0.14.tar.gz.

File metadata

  • Download URL: jccli-0.0.14.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.1

File hashes

Hashes for jccli-0.0.14.tar.gz
Algorithm Hash digest
SHA256 d142c4ec685499ca905153ede3721b922fafa8f22fbd4c7eae7c9797c44290c1
MD5 d87bfd34cf483de0dad031fdb9c71c8a
BLAKE2b-256 aaf996a08c966f97346bc71f76683b9774b7349dec9bcd6d885bc7a6872941df

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page