Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] add ledger compiler support for huobi provider #95

Merged

Conversation

ramsayleung
Copy link
Contributor

@ramsayleung ramsayleung commented May 21, 2023

Description

目前 double-entry-generator 只支持 beancount 后端,增加对 ledger 后端的支持. 针对不同的 provider, 后端需要有对应的输出模板,已有的输出模板包括:

  • 普通消费账单的模板: 已支持
  • 火币模板1
  • 火币模板2
  • 火币卖出模板
  • 海通买入模板

本次PR 增加 火币模板1, 火币模板2, 火币卖出模板的支持

Modification

概括:

  1. compiler/ledger package 增加huobi的支持
  2. test 目录增加 huobi-ledger 相关test script
  3. example 目录增加 huobi-ledger 相关的生成文件.
  4. Makefile 增加新的 test target

Motivation and Context

#92

Dependencies

None

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

新增一个 end-to-end 测试脚本, 测试 huobi-ledger 后端生成功能:

  • huobi-test-ledger.sh: pass

对生成的 ledger 文件进行语法与格式校验:

  • ledger -f test/output/test-huobi-output.ledger bal: pass

make test: all tests pass

@ramsayleung ramsayleung requested review from gaocegege, Triple-Z and a team as code owners May 21, 2023 06:25
Copy link
Member

@Triple-Z Triple-Z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Triple-Z Triple-Z merged commit e822d26 into deb-sig:master May 21, 2023
@ramsayleung ramsayleung deleted the ramsay/add_ledger_support_against_huobi1 branch May 21, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants