Comments (1)
If it helps, I've been using the code below to check for fact equality:
def fact_compare(first:AbstractFact, second:AbstractFact):
if type(first) != type(second):
return False
if first.value != second.value:
return False
if first.xml_id != second.xml_id:
return False
if first.footnote != second.footnote:
return False
if isinstance(first, NumericFact):
first:NumericFact = first
second:NumericFact = second
if first.decimals != second.decimals:
return False
if first.unit != second.unit:
return False
else:
first:TextFact = first
second:TextFact = second
if not context_compare(first.context, second.context):
return False
if not concept_compare(first.concept, second.concept):
return False
return True
from py-xbrl.
Related Issues (20)
- Need path or reference to source file of a Linkbase HOT 2
- Standardised Financial Data HOT 5
- Solution to frequently missing taxonomy specifications in UK submissions HOT 21
- Any way to get textual labels? HOT 9
- Missing fact from ixbrl HOT 8
- Date parsing fails
- "Explicit Member"s missing HOT 3
- Add support for Datetime in context duration. HOT 3
- KeyError: 'Unit_sqft' HOT 2
- Add support for the ixt-sec transformations. HOT 1
- unresolved schemas HOT 12
- Not well-formed (invalid token) error for ixblr. HOT 11
- parse_ixbrl should add encoding argument HOT 2
- Be nicer to submissions that do not follow the XBRL standard 100% HOT 6
- New 2022 taxonomies HOT 4
- Bug: instance.json('my-file.json') HOT 1
- Unclear +/- sign of some facts HOT 17
- Space in url creates issues when requesting a taxonomy
- Potential arg bug in transformations __init__ HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py-xbrl.