container: lib_taxes: optimize record printing, add checks and logging, some refactoring #179

Merged
AaronFiore merged 0 commits from refs/pull/179/head into master 2025-02-01 03:26:04 +00:00
AaronFiore commented 2025-01-31 09:10:19 +00:00 (Migrated from gitea.com)

Description

  • When applicable, as the stream progresses, exit each successive gawk
    iteration when no applicable records are present (no taxable events
    found for the given tag in the given year).

    Previously, when no records were found, a reports file was produced
    with either a single header-only row or junk data that resulted from
    the assumption there would be real data.

    A preexisting hack prevented the junk data from being written after
    production but this commit will resolve that hack by preventing the
    printing of junk data while also preventing the production of a
    header-only file.

  • Print warnings when no taxable events are found for the given year.

  • Add checks:

    • Only verify patched files if the patched files are not empty.
    • Empty variable checks.
  • Remove unused arg expansion, appease the linter.

Agreement

### Description - When applicable, as the stream progresses, exit each successive gawk iteration when no applicable records are present (no taxable events found for the given tag in the given year). Previously, when no records were found, a reports file was produced with either a single header-only row or junk data that resulted from the assumption there would be real data. A preexisting hack prevented the junk data from being written after production but this commit will resolve that hack by preventing the printing of junk data while also preventing the production of a header-only file. - Print warnings when no taxable events are found for the given year. - Add checks: * Only verify patched files if the patched files are not empty. * Empty variable checks. - Remove unused arg expansion, appease the linter. ### Agreement - [x] I have read and understood the [Development](https://gitea.com/EvergreenCrypto/docker-finance#development) and [License](https://gitea.com/EvergreenCrypto/docker-finance#license-and-disclaimer) documentation
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Reference: EvergreenCrypto/docker-finance#179