Skip to content

acceleratedscience/openad-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAD Tools

A common library of modules for OpenAD plugin development.

Latest version: v0.0.3


Usage

To use this library in your OpenAD plugins, please refer to our Demo Plugin.

  1. Add the library to your Poetry development dependencies in pyproject.toml, making sure to specify the latest version.

    [tool.poetry.dependencies]
    openad_tools = { git = "ssh://git@github.com/acceleratedscience/openad-tools", branch = "main", tag = "v0.0.3" }
    
  2. In your code, import the tools as you need them.

    from openad_tools.output import output_table
    

Available Modules

Output Modules

Modules related to the output of text or data in the terminal and Jupyter Notebook.

  1. output.py
    A simple way to output styled text and data to the termninal and Jupyter Notebook.

  2. style_parser.py
    Converts XML styling tags like <bold> or <error> to ansi characters for terminal output, and HTML for Jupyter Notebook output. Mostly consumed by output.py.

  3. spinner.py
    A spinner (based on Halo) to provide instant user feedback during longer processes like API calls.

  4. pretty_data.py
    Methods to display lists and key-value lists in organized columns in the terminal.

  5. output_msg.py
    A library of templated output messages.

  6. ascii_type.py
    Display massive type in the CLI, using an ascii art alphabet.


Utility Modules

A variety of practical tools.

  1. grammar_def.py
    Pyparsing grammar definitions, used as ready-made building blocks to build new commands.

  2. pyparsing.py
    Functions to process some of the clauses provided in grammar_def.py.

  3. helpers.py
    A collection of helper functions for various purposes.

  4. jupyter.py
    Methods for working with dataframes in Jupyter Notebook.

  5. locale.py
    Support for language localisation.

  6. edit_json.py
    A library for quickly editing JSON files directly from the CLI.

About

A collection of functional building blocks for OpenAD development

Resources

License

Stars

0 stars

Watchers

2 watching

Forks

Packages

 
 
 

Contributors