Skip to content
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

Xbrl context #1

Merged
merged 4 commits into from
Jun 8, 2021
Merged

Xbrl context #1

merged 4 commits into from
Jun 8, 2021

Conversation

mmoghaddam385
Copy link
Contributor

For our purposes, XBRL consists of contexts, facts, and units. This is part one: the contexts

@mmoghaddam385 mmoghaddam385 requested review from calebcase, jbonzo, a team and hypotrochoid and removed request for a team June 7, 2021 20:41
* Change focus to regular XBRL

* add review gh action workflow

* add important steps to workflow

* dont use golang docker image
Copy link
Contributor

@calebcase calebcase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be any value in having a (* Context) Validate() that checked higher level semantics?


// Identifier specifies a scheme for identifying business entities and an identifier that follows the scheme.
// https://www.xbrl.org/Specification/XBRL-2.1/REC-2003-12-31/XBRL-2.1-REC-2003-12-31+corrected-errata-2013-02-20.html#_4.7.3.1
// For Example:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3 including examples of the data that might be parsed

Instant *string `xml:"instant"`

// Forever is non-nil if Period.Type() returns Forever.
// Note ideally this would be a bool, but the XML Unmarshaller doesn't support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make a custom unmarshal for it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's really necessary. Type() returning Forever is already a clean way to determine if the period represents 'forever', so you wouldn't really have to interact with this property directly as a user.

I might come back to this later once I'm more experienced with custom unmarshallers though

@mmoghaddam385
Copy link
Contributor Author

Would there be any value in having a (* Context) Validate() that checked higher level semantics?

This might be valuable if/when we come back and add support for Context Scenarios, but for now it wouldn't really do much

@mmoghaddam385 mmoghaddam385 merged commit 9b5d128 into master Jun 8, 2021
@mmoghaddam385 mmoghaddam385 deleted the xbrl-context branch June 8, 2021 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants