summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updated lib/utfcppAlexis Hildebrandt2023-02-0129-157/+2769
| | | | | | | * Squashed 'lib/utfcpp/' content from commit 79835a5fa git-subtree-dir: lib/utfcpp git-subtree-split: 79835a5fa57271f07a90ed36123e30ae9741178e * Change include path to utfcpp
* Update flake.lockAlexis Hildebrandt2023-02-011-3/+3
|
* Fix deprecation warningsAlexis Hildebrandt2023-02-011-14/+18
| | | | Code clean-up
* Remove obsolete from __future__ importsAlexis Hildebrandt2023-02-0117-30/+0
|
* Remove support for Python 2.xAlexis Hildebrandt2023-02-018-356/+15
|
* Remove Python 2 references from .travis.ymlAlexis Hildebrandt2023-02-011-2/+0
|
* Minor cosmetic changesAlexis Hildebrandt2023-02-012-4/+4
|
* Sort 786A3DD0.test chronologically by dateAlexis Hildebrandt2023-02-011-1/+1
|
* Attempt to fix Linux CI failureAlexis Hildebrandt2023-02-011-1/+1
|
* Rerun failed tests with outputAlexis Hildebrandt2023-02-011-1/+1
| | | | for debugging
* Update checkout action to Node.js 16Alexis Hildebrandt2023-02-011-1/+1
| | | | | | | | | | | as suggested by action warning For more information see: https://github.com/ledger/ledger/actions and https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
* If the amount-width has not been set, use the old default of 20John Wiegley2023-01-272-3/+10
|
* Use amount_width for balance reportVladimir Parfinenko2023-01-271-3/+3
|
* Fix python/c++ conversion for boost::optional<T>David Sklar2023-01-272-4/+14
| | | | | | | | | | | | | | Setters for types wrapped in boost::optional, such as item_t::note were broken, e.g. setting a note on a transaction resulted in garbled data that would cause Python to throw utf-8 errors when retrieving the note. (But setters that accessed strings directly, e.g. "payee" on a transaction worked fine.) This change alters the from-python conversion for optional-wrapped types based on the example at https://stackoverflow.com/questions/36485840/wrap-boostoptional-using-boostpython and a test case to verify the behavior.
* Fix IDENT format comment to match recent change 35713fe79Donald Lam2023-01-271-1/+1
|
* Disallow numbers in function namesJohn Wiegley2023-01-252-1/+3
|
* Rename quoted_rfc4180 to quoted_rfc, to avoid parser quirkDonald Lam2023-01-256-18/+27
| | | | | | | Ledger's expression parser considers quoted_rfc4180 to be an amount (quantity 4180 of commodity "quoted_rfc"). Fixes #2007.
* typo and column alignmentspaette2023-01-234-4/+4
|
* Initial fix for #2147WY2023-01-202-1/+29
|
* Python: Transaction.remove_post should call xact_base_t::remove_postDavid Sklar2023-01-102-7/+22
|
* Python: test cleanupsDavid Sklar2023-01-094-8/+9
| | | | | | | | 1. Remove references to modules (exceptions, StringIO) no longer needed for Pythn3 2. Use assertEqual instead of assertEquals 3. Clear journal files with a close_journal_files() function that uses the then-current underlying python_session pointer. Calling session.close_journal_files() sometimes leads to segfaults because python_session has changed after it was injected into the python module (as "session") on module startup.
* fix brew link error on mac CIAndy Clayton2023-01-091-0/+9
| | | | | | | | | | | | | | The github mac runner images added python 3.11 but, unlike 3.10, not via brew. This causes brew install to fail with link conflict errors now that boost-python3 switched over to 3.11. Workaround this, and future python brew link errors, by overwriting all links for python packages. https://github.com/Homebrew/homebrew-core/commit/8c79089ae410bcd38065dfa3748bbcdb64b228d2 https://github.com/orgs/Homebrew/discussions/3895 https://github.com/actions/setup-python/issues/577 https://github.com/actions/runner-images/issues/6459 https://github.com/actions/runner-images/issues/6507 https://github.com/actions/runner-images/issues/2322
* typosspaette2023-01-076-10/+10
|
* Add compatability for Python 3.10 and later to acprepAlexis Hildebrandt2022-12-291-1/+4
| | | | Fixes #2154
* docs: add info on on expr directiveMartin Michlmayr2022-12-271-1/+1
| | | | Fixes #2149
* Update Debian releasesMartin Michlmayr2022-12-261-3/+3
|
* Add python support for error_contextAdam Wendt2022-11-131-0/+7
| | | | | | Added ledger.session.error_context() to py_session.cc to get the error context message when exceptions are thrown.
* Fix balancing commodity with smaller unit.Maria2022-10-113-1/+27
|
* xml: Include posting-specific payee in outputGwyneth Morgan2022-10-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In `ledger xml` export, include the `<posting>`-specific payee (from the `Payee:` tag) as `<payee>`. This data is already included under `<metadata>` as `<value key="Payee">`, but that is more specific to Ledger's implementation; if in the future there is another way to set the payee (or perhaps an option to have the Payee tag in one's own language), that field wouldn't be a reliable method of getting this info. Example: 2022-01-01 Transaction-level payee a 10 b ; Payee: Posting-level payee Relevant XML output: <transaction> <date>2022-01-01</date> <payee>Transaction-level payee</payee> <postings> <posting> <account ref="0000558defd6f260"> <name>a</name> </account> <post-amount> <amount> <quantity>10</quantity> </amount> </post-amount> <total> <amount> <quantity>10</quantity> </amount> </total> </posting> <posting> <payee>Posting-level payee</payee> <account ref="0000558defd6f960"> <name>b</name> </account> <post-amount> <amount> <quantity>-10</quantity> </amount> </post-amount> <note> Payee: Posting-level payee</note> <metadata> <value key="Payee"> <string>Posting-level payee</string> </value> </metadata> <total> <amount> <quantity>0</quantity> </amount> </total> </posting> </postings> </transaction>
* Handle return value of PyUnicode_READYAlexis Hildebrandt2022-10-021-1/+2
| | | | | | to ensure access macros are only called on "legacy" unicode string objects that are "ready". See https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_READY
* Fix handling of UCS-2 encoded stringsAlexis Hildebrandt2022-10-022-13/+13
| | | | | | Add test to python/demo.py Fixes #2132
* Fix handling of UCS-1 encoded stringsAlexis Hildebrandt2022-10-022-12/+16
| | | | Add test to python/demo.py
* Properly handle PyUnicode_1BYTE_DATAAlexis Hildebrandt2022-07-201-3/+1
|
* Fix use of deprecated Python legacy Unicode APIAlexis Hildebrandt2022-07-201-18/+52
| | | | | | | | replacing it with APIs introduced in Python 3.3 to ensure ledger's Python bindings continue to function when the legacy Unicode API is removed in Python 3.12. For details see https://docs.python.org/3.10/c-api/unicode.html
* Fix typos found by codespellAlexis Hildebrandt2022-07-1916-30/+30
|
* Fix SIGABRT when python subcommand raises an exceptionAaron L. Zeng2022-07-131-2/+3
| | | | | | | | | | | | | Before, `ledger python -- -c 'raise RuntimeError'` would terminate messily via SIGABRT, printing the following: terminate called after throwing an instance of 'int' [1] 2151711 abort (core dumped) ledger python -c 'raise RuntimeError' This change makes the python subcommand throw a standard C++ exception rather than just a plain int, which is never caught and triggers the SIGABRT. Now, the process prints the uncaught Python exception as usual and then exits with exit code 1.
* Fix typoMartin Michlmayr2022-07-081-1/+1
|
* Add usePython option to flake.nixAlexis Hildebrandt2022-07-081-3/+15
| | | | to toggle building ledger's Python bindings.
* Add useGgpme option to flake.nixAlexis Hildebrandt2022-07-081-2/+8
| | | | | to toggle building ledger with support for encrypted journal files using gpgme.
* Update copyright statement for 2022Alexis Hildebrandt2022-07-02128-129/+129
|
* Improve update copyright year scriptAlexis Hildebrandt2022-07-021-5/+9
|
* Replace os.path.abspath with os.path.realpathAlexis Hildebrandt2022-07-015-10/+10
| | | | | | to fix failing tests on Darwin, where /tmp is a symlink to /private/tmp and the tests fail as ledger reports filenames with the symlink resolved to /private/tmp, but the tests expect files with /tmp.
* Document --exchange can accept multiple commoditiesGwyneth Morgan2022-06-292-13/+62
| | | | | | | | | | | | | | | | | | | | | The --exchange option can accept multiple comma-separated commodities, but this is only mentioned in one place where --exchange is documented, and notably not in the Texinfo manual. Examples made with the following ledger file: ``` P 2022-06-28 USD 54.81 PHP P 2022-06-28 EUR 58.01 PHP 2022-06-28 * Opening Balances Equity:Opening Balances Assets:USD Bank 100 USD Assets:EUR Bank 100 EUR Assets:PHP Bank 100 PHP ``` [ci skip]
* acprep: add support for arch linuxBalaji Sivaraman2022-06-261-1/+19
|
* Bump required CMake versionOleg Bulatov2022-05-061-1/+1
| | | | | | | | CMake 3.21.4 reports that compatibility with CMake < 2.8.12 will be removed from a future version of CMake. CMake 3.0 has new defaults for MACOSX_RPATH. It seems ledger works fine with them. See CMake Policy CMP0042 for the details.
* Fix unrounding for equityOleg Bulatov2022-05-064-3/+36
|
* Remove git from brew installOleg Bulatov2022-05-051-1/+1
| | | | git is now provided by GitHub Actions by default
* Fix test formattingJohn Wiegley2022-05-031-3/+3
|
* Add test/regress/2109.testJohn Wiegley2022-05-031-0/+23
|
* When calculating balance assignments, strip away lot annotationsJohn Wiegley2022-05-031-12/+15
|