Skip to content

Checking for rules file after preprocessing? #124

@a-t-0

Description

@a-t-0

Thank you for sharing this work with the world!
Is your feature request related to a problem? Please describe.
While using a small bunch of python code to perform my preprocessing, I auto-generate the rules file from that preprocessing logic. However, in the first run, if I delete the old .rules file, hledger-flow, rightfully indicates the .rules file is missing (because it is not created yet).

Version and Runtime Information

Please mention the version number of hledger-flow you are using:

hledger-flow --version
hledger-flow 0.15.0 linux x86_64 ghc 9.0 2b025fee477538a493cb7b5eaf163fd959aaec42

Is this the latest version?

yes.

If your request includes commands you ran and the output, please also include
the runtime options with --show-options e.g:

clear && hledger-flow import

Can you give examples of what you would like by running hledger-flow on these files?

Describe the solution you'd like
0 .I would like hledger to first run the preprocessing and then, when it needs to apply the rules, check if the rules exist.

  1. Or, if you deliberately prefer fail-fast/early etc. Perhaps an additional argument like --create-rules that triggers the create_rules script to be ran.
  2. Or, an override argument like --preprocess-first that ensures the preprocessing script to be ran before checking if the rules exist.

Describe alternatives you've considered
0. Running the hledger-flow command twice. However, I think it is an important characteristic of hledger-flow that running the same thing yields the same output.

  1. Running a separate create_rules script/command. However, why do more manual work than necessary.

Nogmaals dank voor de effort die je geleverd hebt om hledger-flow te maken!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions