Skip to content

yandex/evgen

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Code generation for event logging

EvGen: Event Generator. Useful tools for making contracts between analysts and developers.

Supported languages

  • swift
  • java
  • kotlin
  • type_script
  • java_script
  • с_sharp

Prerequisites

Installation

poetry install

You can now use it from the project package

Scripts to run are defined in pyproject.toml

poetry run run_evgen # and additional arguments

If you want to install it globally, you have to build a project

poetry build --format wheel
pip install ./dist/evgen-{PACKAGE_VERSION}-py3-none-any.whl

Run generation

  1. Create a folder with:
    • events.yaml -- File with event specifications
    • evgen.yaml -- Evgen config file
  2. run_evgen.py --events_path events.yaml --evgen_config_path evgen.yaml Examples of evgen.yaml can be found in tutorial/

Structure of evgen.yaml

  $SubconfigName1:
    platform: 'Android'
    output_dir: 'android'
    language: 'java'
    class_name: 'EvgenAppAnalytics'

  ...

doc:
  Markdown:
    extension: 'md'
    output_dir: 'md_doc'
  Txt:
    extension: 'txt'
    output_dir: 'txt_doc'

Check generated file consistency

We suggest checking the consistency of the yaml and generated files. To see if generated files were changed manually: check_evgen_result.py --events_yaml_path events.yaml --evgen_config_path evgen.yaml

About

Code generation for event logging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published