-
Notifications
You must be signed in to change notification settings - Fork 10
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
Br 1 2 #42
Closed
Closed
Br 1 2 #42
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Introduced GnucashCommodity(Impl) (first, very simple form, still work to be done for the quotes etc.) - According changes in GnucashFile(Impl) - First, very simple test case class for commodities Overall: - Opened branch for V. 1.2. - ==> POM files: Reflect new version + some cosmetic changes
- Improved interface for commodities - Adapted test cases and example program Overall: - Little bit of code cleaning (exception classes)
- Changed XSD file (some commodity elements were obsolete) - Introduced GCshPrice(Impl) - ==> Wrote according methods in GnucashFile(Impl) (analogs to tax tables / bill terms) - Wrote test cases for that
… of GnuCash's logic of identification of currencies/securities/commodities. - With this class, simplified test cases for GnucashCommodityImpl
- Change in CmdtyCurrID and CmdtyCurrNameSpace (formerly CurrencyNameSpace): introduced enum for exchange (semi-formal abbrev.), thus improving type safety. - GnuCashCommodity(Impl): Methods now use CmdtyCurrID - Adapted test cases accordingly - Test data: Changed "EUREX" to "EURONEXT" (the two should not be confused: the former is a derivatives exchange).
…type safety. (Cf. previous check-in)
- Added GnucashWritableCommodity(Impl) to generate new commodities (no test case yet) - Somme overall minor code cleaning
- GnucashAccountImpl - GnucashCustomerImpl - GnucashVendorImpl (had been forgotten)
- The variants now are not all handled in CmdtyCurrID itself, but rather in its (grand)children: CommodityID, CurrencyID, CommodityID_Exchange, CommodityID_MIC (and possibly more in future releases). - CmdtyCurrID itself now is held very basic and does not perform any non-trivial checks. - Adapted interface/class GnucashCommodity(Impl) accordingly (there had been a declaration error anyway). - Adapted test cases / data accordingly
… being to get rid of code that handles currency/commodity name-spaces and codes separately). - Now uses CmdtyCurrID in GnucashAccount(Impl) (and only it). That led to a cascade of exceptions possibly being thrown all over the place. It looks intimidating, but essentially, all changes are harmless. (TODO: the same for GnucashTransaction(Impl)) - Re-iterated GCshPrice(Impl): o Now accounts for the fact that GnuCash prices are not always securities' quotes but can also be currencies' exchange rates. o Adapted test cases / test data accordingly.
…(cf. last check-in). - Now uses CmdtyCurrID in GnucashTransaction(Impl) (and only it). That led to a cascade of exceptions blabla (cf. last check-in), which essentially is harmless.
…(cf. previous check-ins). - Now uses CmdtyCurrID in Gnucash(Writable)Transaction(Impl) (and only it).
…(cf. previous check-ins). - Now uses CmdtyCurrID in Gnucash(Writable)Account(Impl) (and only it). That should be it now.
for search methods Gnucash(Writable)File(Impl).getXYZByName() Allowed for several results, made it more consistent/symmetric, and adapted example programs accordingly.
- All commodity/currency-ID types are renamed: CmdtyCurrID -> GCshCmdtCurrID etc. - All these types are now in new package org.gnucash.basetypes (other classes in this package likely to come in future releases). - Introduced new class GCshCmdtyID_SedIdType (this one is important for truly international portfolios, cf. README file)
…shCdmtyID_SecIdType.
ISIN-based name space.
thus improving overall type safety / robustness.
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello Deniss,
got some new stuff for you.
As you can see, this is not as giant a pull-request like the last one, but not a small one either.
It just made sense to do all these changes on one go...
What have I changed? Short version: Commodities and prices.
Please refer to the README for more details.
Greetings,
James