Skip to content

llnl/clippy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLIPPy - Command Line Interface Plus Python

╭────────────────────────────────────╮
│ It looks like you want to use HPC. │ 
│ Would you like help with that?     │
╰────────────────────────────────────╯
 ╲
  ╲
   ╭──╮  
   ⊙ ⊙│╭
   ││ ││
   │╰─╯│
   ╰───╯

Overview

Clippy (CLI + PYthon) is a Python language interface to HPC resources. Precompiled binaries that execute on HPC systems are exposed as methods to a dynamically-created Clippy Python object, where they present a familiar interface to researchers, data scientists, and others. Clippy allows these users to interact with HPC resources in an easy, straightforward environment – at the REPL, for example, or within a notebook – without the need to learn complex HPC behavior and arcane job submission commands.

Installation of Python Code

There are three ways to use the Python code:

  1. Install from PyPI:
$ pip install llnl-clippy
  1. Install from the cloned repository:
$ cd py/src && pip install .
  1. Via PYTHONPATH (see below)

Building C++ Examples

$ cd cpp && mkdir build && cd build
$ cmake ..
$ make

Running Current C++ Examples (after building)

From the repository root (using PYTHONPATH):

$ PYTHONPATH=py/src:$PYTHONPATH CLIPPY_BACKEND_PATH=$(pwd)/cpp/build/examples ipython

In [1]: from clippy import ExampleBag

In [2]: b = ExampleBag()

In [3]: b.insert(5).insert(6).insert(7)    # can chain methods
Out[3]: <clippy.backends.fs.ExampleBag at 0x107d50830>

In [4]: b.insert(5).insert(8)
Out[4]: <clippy.backends.fs.ExampleBag at 0x107d50830>

In [5]: b.size()
Out[5]: 5

In [6]: b.remove_if(b.value > 6)  # removes 2 elements
Out[6]: <clippy.backends.fs.ExampleBag at 0x107d50830>

In [7]: b.size()
Out[7]: 3

Authors

  • Seth Bromberger (seth at llnl dot gov)
  • Roger Pearce (rpearce at llnl dot gov)

License

CLIPPy is distributed under the MIT license.

See LICENSE-MIT, NOTICE, and COPYRIGHT for details.

SPDX-License-Identifier: MIT

Release

LLNL-CODE-818157

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •