Giter VIP home page Giter VIP logo

xoxo's People

Contributors

dgm9704 avatar ma3yta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

xoxo's Issues

Contexts are considered different when entity is different

This results in every context in compared instances being "different", which is true from a purely technical point of view. However it would better if the entity is compared only once per comparison (plus of course checked to be consistent across the instance) and contexts compared only by scenarios. The above holds also for period.
This would result in a situation where two otherwise functionally identical reports with differing entity (or period) would not report each and every context (and fact!) as different. Instead, the report would simply state that the entity (or period) is different and leave it at that.

Failed equality comparison doesn't provide any useful info about differences

There should be some way to tell where the differences(s) are, like reading a property after comparison, or giving an optional out parameter, logging the differences to a stream, throwing an exception with details or something. At the moment it's just a true/false which doesn't help much with any substantial instance.

No way to choose basic comparisons

In some cases it's know beforehand that instances are going to differ eg by entity or period, but should be otherwise identical. These cases are now reported as different. Since the basic comparisons are already separated in logic, there should/could be switches for them also.

Exception thrown when comparing facts and unitRef is missing

System.NullReferenceException: Object reference not set to an instance of an object.
at Diwen.Xbrl.Fact.Equals(Fact other)
at System.Collections.Generic.GenericEqualityComparer1.Equals(T x, T y) at System.Collections.Generic.LinkedList1.Find(T value)
at Diwen.Xbrl.ListExtensions.ContentCompareReport[T](IList1 left, IList1 right)
at Diwen.Xbrl.InstanceComparer.FactComparison(Instance a, Instance b)
at Diwen.Xbrl.InstanceComparer.Report(Instance a, Instance b, ComparisonTypes comparisonTypes)
at XbrlCompare.Program.CompareAndReport(String inputReport, String outputReport, String comparisonReport, ComparisonTypes comparisonTypes)
at XbrlCompare.Program.Main(String[] args)

Reading instance throws if no facts

example instance:

<?xml version='1.0' encoding='utf-8'?>
<?taxonomy-version 2.0.3?>
<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xlink="http://www.w3.org/1999/xlink">
  <link:schemaRef xlink:type="simple" xlink:href="http://www.eba.europa.eu/eu/fr/xbrl/crr/fws/corep/its-2013-02/2014-07-31/mod/corep_con.xsd"/>
</xbrli:xbrl>

link to xsd:
https://www.xbrl.org/2003/xbrl-instance-2003-12-31.xsd

excerpt:

<element name="xbrl">
<annotation>
<documentation>XBRL instance root element.</documentation>
</annotation>
<complexType>
<sequence>
<element ref="link:schemaRef" minOccurs="1" maxOccurs="unbounded"/>
<element ref="link:linkbaseRef" minOccurs="0" maxOccurs="unbounded"/>
<element ref="link:roleRef" minOccurs="0" maxOccurs="unbounded"/>
<element ref="link:arcroleRef" minOccurs="0" maxOccurs="unbounded"/>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="xbrli:item"/>
<element ref="xbrli:tuple"/>
<element ref="xbrli:context"/>
<element ref="xbrli:unit"/>
<element ref="link:footnoteLink"/>
</choice>
</sequence>
<attribute name="id" type="ID" use="optional"/>
<anyAttribute namespace="http://www.w3.org/XML/1998/namespace" processContents="lax"/>
</complexType>
</element>

Fact.ToString() throws when fact has null properties

Assert.Fail failed. System.NullReferenceException: Object reference not set to an instance of an object.
at Diwen.Xbrl.Fact.ToString()
at Diwen.Xbrl.InstanceComparer.FactComparison(Instance a, Instance b)
at Diwen.Xbrl.InstanceComparer.Report(Instance a, Instance b, ComparisonTypes comparisonTypes)

-> In Fact.ToString() check for Metric, Unit and Context being null

Facts are compared by unitRef and not measure of unit

ie. these should be equal cases and are not atm.
a)

  <xbrli:unit id="uEUR">
    <xbrli:measure>iso4217:EUR</xbrli:measure>
  </xbrli:unit>
<eba_met:mi290 unitRef="uEUR" decimals="-3" [...]

b)

  <unit id="u-01">
    <measure>iso4217:EUR</measure>
  </unit>
<eba_met:mi290 unitRef="u-01" decimals="-3" [...]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.