-
Notifications
You must be signed in to change notification settings - Fork 19
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
Issue 78 - decimals/precision #111
Merged
jonoxia
merged 60 commits into
SunSpecOrangeButton:master
from
kwhanalytics:issue_78_decimals
Feb 7, 2019
Merged
Issue 78 - decimals/precision #111
jonoxia
merged 60 commits into
SunSpecOrangeButton:master
from
kwhanalytics:issue_78_decimals
Feb 7, 2019
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
…rom _def.xml. Created a first data model class named Entrypoint representing an instance of a document corresponding to a particular entry point. Constructor uses arcrole relationships to deduce what tables belong in the document. Added unit test for this class.
…k up which table a given concept belongs to, and to distinguish abstract concepts (lineItems, Abstracts, Domains, etc) from actually-writeable concepts.
… EntryPoint which identifies whether or not sufficient context is provided to write a fact for a named concept. Checks for appropriate time duration/instant so far. Next step is to check the required table axes are present as well.
…cks that the required table axes are present in the given context.
…ow store and retrieve facts.
…o the new locations required by the directory restructure
…Equal to assertCountEqual.
… instance as an argument to constructor, instead of creating its own
…axonomy() in taxonomy.py that you can call instead of instantiating.
…ither a 'context' keyword arg providing a Context object, or else separate instant/duration/entity/axes keyword args which are together used to create a Context object.
…cts keyed first by table name, then by context ID, then by concept. Hypercube class handles de-duping contexts so that two contexts with the same data fields will be combined into one.
…ds to export an EntryPoint instance to XML or JSON string or file
…s. A table now knows which axes use domains and which do not, and for domain axes it can reject a context that tries to provide an out-of-domain value for that axis.
…Button#53 - Now checking that the units provided in EntryPoint.set() exist in the taxonomy and match the expected data type of the concept you are trying to set. It will reject an attempt to .set() a concept without a matching unit, for example if you try to set a monetary data type without providing a currency unit. In XML export, a unit tag is written out for facts tags to reference.
…strings to all methods.
…datatype the concept expects, for basic typed concepcts. Reject attempt to set an invalid datatype.
…ontext() and values given there are used to replace any values not given by the context in .set().
…pparently some entry points have those.
…t in test_taxonomy_semantic.py
…n replacing the dictionary.
…In datatype validation, allow unicode strings, support more date formats, support (by stripping them out) dollar signs and commas in money types.
…facts are a dictionary (with UUIDs for keys) rather than a list, aspect keys are not xbrl: prefixed, and period is either a single date or two dates joined by a / character.
… decimals argument, and it is written out to XML or JSON
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
==========================================
+ Coverage 88.63% 89.29% +0.65%
==========================================
Files 23 25 +2
Lines 2296 2409 +113
==========================================
+ Hits 2035 2151 +116
+ Misses 261 258 -3
Continue to review full report at Codecov.
|
cwhanse
reviewed
Jan 26, 2019
cwhanse
reviewed
Jan 26, 2019
cwhanse
reviewed
Jan 26, 2019
joelebwf
approved these changes
Feb 6, 2019
…ctor, removed 'units=pure' edge case.
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.
OBInstance.set() now accepts either a "decimals" or "precision" argument (but not both), and it is stored in the Fact and written out to XML or JSON. This solves issue #78 .