Skip to main content

allows user to search protos using stencil

Project description

Hofund - Proto Recommendor

Python based tool which recommends the common proto messages/fields that can be used as replacements for clevertap fields.

Requirements

If you want to install using pip, you would need -

  • python 3.9
  • pip3.9

Installation

Using pip

To install latest version of hofund

pip install hofund

Using brew

brew update
brew tap gojek/de git@source.golabs.io:asgard/lib/homebrew-tap
brew install hofund

Usage

To begin using the tool first user needs to export stencil token, this is used to contect with Stencil service. For token contact @Ramey/@Chakravarthy V P

export HOFUND_STENCIL_TOKEN="<token>" 

To check the usage

hofund --help

Quickstart

The input to the tool is a csv which should contain a column that has the context for properties that needs mapping. The column name is given as input while runing the tool.

Example - We have a sheet that contains the common format for proto mapping. In this sheet the column Context/Meaning should be populated and then the sheet should be exported as a csv.

Run hofund --f <csv_file> --ctx-col <context_column_name> , you can also give parameter --ctx-col-num <context_col_num> as column number of the context column.

After the successful execution, the outputs are added as two columns in the same csv, column Recommended Messages are the recommended proto names and Recommended Fields are the recommended proto fields based on the given context.

Working

The tool works on the context specified by the user. It searches all the proto definitions and the comments by each keyword in the context column. Ensure that it is concise, preferabbly in one or two words seperated by a delimeter. For example if the context is App version then tool searches for all proto definitions that contains either app or version in the name or comments.

Params

  • --ctx-keys-del - context delimeter, by default it's space.
  • --out-msg-col - column name that contains the name of the recommended proto definitions, by default it's Recommended Messages.
  • --out-field-col - column name that contains the field names of the recommended proto definitions, by default Recommended Fields.

Project details


Download files

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

Source Distribution

hofund-0.0.7.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

hofund-0.0.7-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page