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

Properly set qualification properties #60

Merged
merged 10 commits into from
Jun 11, 2024

Conversation

ColeDCrawford
Copy link
Contributor

Tackle #31 by setting qualification properties on

  • UncertainOrApproximate
  • Unspecified
  • Level1Interval
  • PartialUncertainOrApproximate
  • Level2Interval

This PR also adds tests to check that each EDTF object is parsed and that .is_approximate, .is_uncertain, and .is_uncertain_and_approximate are set to what we expect them to be. It also adds some documentation about these properties.

Branched off of PR #59

ColeDCrawford and others added 7 commits May 28, 2024 15:10
If not in debug mode, use a simpler EDTFParseException rather than returning the full pyparsing error
Includes handling for empty or null input strings and null errs passed to the constructor

Co-Authored-By: aweakley <224316+aweakley@users.noreply.github.com>
Make the string representation of TestEvent simpler
Properly set qualification properties on
- UncertainOrApproximate
- Unspecified
- Level1Interval
- PartialUncertainOrApproximate
- Level2Interval

Adds tests to check that each EDTF object is parsed and that .is_approximate, .is_uncertain, and .is_uncertain_and_approximate are set to what we expect them to be
Copy link
Member

@aweakley aweakley left a comment

Choose a reason for hiding this comment

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

I've just made a couple of comments @ColeDCrawford

all_ua,
]
self.is_uncertain = any(
item.is_uncertain for item in uas if hasattr(item, "is_approximate")
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be is_uncertain

README.md Outdated
False

>>> parse_edtf("2004?-~06-~04")
PartialUncertainOrApproximate: '2004?-~06-~04'>>> L2_PartialUncertainOrApproximate.is_approximate
Copy link
Member

Choose a reason for hiding this comment

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

I think there's a typo here.

@aweakley
Copy link
Member

Thank you, this looks great.

@aweakley aweakley merged commit fe96fbd into ixc:v5 Jun 11, 2024
0 of 5 checks passed
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