hledger-sankey icon indicating copy to clipboard operation
hledger-sankey copied to clipboard

Draft: parametrise configuration

Open almereyda opened this issue 1 month ago • 4 comments

This draft is opened to start a conversation about how to stabilise the interface of sankey.py even further.

The goal is to learn how to replicate the original colourful design and to bring a few customisation options.

These changes are currently present:

  • Translates account names to be compatible with GnuCash > Beancount exports. This is part of another pipeline run from another private repository. We could consider providing it for presenting an example use case.
  • Introduces a function shorten() that displays account names in the form of account-name or first-account:last-account when given account-name or first-account:second-account(:third-account,:…):last-account.

These changes will be implemented, before undrafted and offered for inclusion.

  • [ ] Parametrises changeables
    • [ ] from a configuration file (syntax?)
    • [ ] as command line arguments
    • [ ] as environmental variables
    • [ ] as variables read from .env
  • [ ] Introduces an argument to choose output file(s) and output type(s)
  • [ ] Optionally renders the Plotly Graph Objects Figure into an HTML file (toggle the previous mapper to use fig.write_html(path_to_file) instead of fig.show()
  • [ ] Renders the bars in different colours by using some kind of rainbow wheel colour table
  • [ ] Exports the script as module to import in other Python projects
    • [ ] Builds a wheel to install the module as package
    • [ ] Publishes the package on PyPi
    • [ ] Publishes the package on PyPi with CI
  • [ ] Gives documentation and examples
    • [ ] of how to use this on the command line
    • [ ] of how to use this in scripts
    • [ ] of how to use this in CI
    • [ ] of how to use this in Jupyter using a FigureWidget

All these self-chosen targets are subject to debate with the hledger-sankey community and maintainers.

Would there be any objections in following this path gently and slowly within the foreseeable future and then including it here?

Which other developments are currently on the table for hledger-sankey?

almereyda avatar May 17 '24 10:05 almereyda