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(emprinten): Finnish bank barcode and other stuff #511

Merged
merged 8 commits into from
Jun 19, 2024

Conversation

jlaunonen
Copy link
Contributor

Implemented by gluing reportlab Code128 generator to provide SVG image data URL to template. The compiler will then try to load its content (using _do_lookup), which we unpack and give back as data.

  • Typing fixes per pyright.
  • Style fixes per ruff.
  • Fixes for date/datetime formatting and lookup table name (if used) provided to template.
  • Added View on site link to admin on Projects that are usable via the generator UI.

Split the file extension away. Without that, the name in template would
be something like `table_csv`.
- Allow use of template-defined macros.
- Allow use of predefined set of Python builtin functions.
- Fix return type of `date`. Confusingly, date and timedelta filters are
parsing functions and datetime filter is a formatting function.
@jlaunonen jlaunonen force-pushed the emprinten/bank-barcode-and-other branch from 660cc85 to 3841e16 Compare June 18, 2024 13:36
Only v4 supported for now. See "Pankkiviivakoodi-opas" document from
Finanssiala for reference.
The SvgCode128 that uses reportlab as the backend can be used to render
other Code-128 barcodes too, but might need some customization.
Only for Projects that are accessible via generator UI.
The link is displayed even if the user is not allowed in that view.
The project uses 0.4.9, per requirements.txt. Use that version in hook
too to avoid getting result in CI than what is produced in local.

- Move deprecated top-level linter settings to .lint subsection.
- Rename PGH002 to G010 as that preferred.
@jlaunonen jlaunonen force-pushed the emprinten/bank-barcode-and-other branch from 3841e16 to 43b013f Compare June 18, 2024 13:38
@japsu japsu merged commit 50b75f3 into con2:main Jun 19, 2024
5 checks passed
@jlaunonen jlaunonen deleted the emprinten/bank-barcode-and-other branch June 19, 2024 07:33
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.

None yet

2 participants