Package: hofund
Hofund - Proto RecommendorPython based tool which recommends the common proto messages/fields that can be used as replacements for clevertap fields.RequirementsIf you want to install using pip, you would need -python 3.9pip3.9InstallationHofund can be installed by either usingpiporbrew.brewis the recommended package manager.Using brewIf you don't havebrewinstalled in your laptop, follow the instructionshereAfter installingbrewyou would need to add your ssh keys to Gitlab(ignore if already done). If you don't have ssh keys you can generate one by following the instructionshere. To add your keys keys to Gitlab you can follow the instructionshereOnce the setup is done, run the following command to install the tool.brew update
brew tap gojek/de git@source.golabs.io:asgard/lib/homebrew-tap
brew install hofundUsing pipTo install latest version of hofundpip install hofundQuickstartThe 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 asheetthat contains the common format for proto mapping. In this sheet we have a column namedContext/Meaningwhich has to be populated by the user manually and then the sheet should be downloaded as acsv. The context should contain keywords seperated by spacesthat helps in identifying the given property. Users can find the download option underFilemenu.Runhofund --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. Here,csv_fileis the location of the downloaded file in your laptop andcontext_column_namewill beContext/Meaning.sAfter the successful execution, the tool adds two columns at the end of the csv file. ColumnRecommended Protosare the recommended proto names andRecommended Fieldsare the recommended proto fields based on the given context.WorkingThe 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. By default the delimeter is a space.
For example if the context isApp versionthen tool searches for all proto definitions that contains eitherapporversionin the name or comments.UsageTo 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 Pexport HOFUND_STENCIL_TOKEN="<token>"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 asheetthat contains the common format for proto mapping. In this sheet we have a column namedContext/Meaningwhich has to be populated by the user manually and then the sheet should be downloaded as acsv. The context should contain keywords seperated by spacesthat helps in identifying the given property. Users can find the download option underFilemenu.Runhofund --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. Here,csv_fileis the location of the downloaded file in your laptop andcontext_column_namewill beContext/Meaning.sAfter the successful execution, the tool adds two columns at the end of the csv file. ColumnRecommended Protosare the recommended proto names andRecommended Fieldsare the recommended proto fields based on the given context.WorkingThe 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. By default the delimeter is a space.
For example if the context isApp versionthen tool searches for all proto definitions that contains eitherapporversionin the name or comments.UsageTo check the usagehofund --helpParams--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'sRecommended Protos.--out-field-col- column name that contains the field names of the recommended proto definitions, by defaultRecommended Fields.