Skip to content

Commit

Permalink
Merge pull request #60 from artshumrc/31-is_approximate-is_uncertain
Browse files Browse the repository at this point in the history
Properly set qualification properties
  • Loading branch information
aweakley authored Jun 11, 2024
2 parents d779dea + e99813c commit fe96fbd
Show file tree
Hide file tree
Showing 5 changed files with 133 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:

- name: Publish benchmark results
uses: benchmark-action/github-action-benchmark@v1
if: github.event_name != 'pull_request'
if: github.event_name == 'pull_request' && github.repository == 'ixc/python-edtf'
with:
tool: 'pytest'
auto-push: true
Expand All @@ -112,6 +112,7 @@ jobs:
summary-always: true

- name: Comment on benchmark results without publishing
if: github.event_name != 'pull_request' || github.repository != 'ixc/python-edtf'
uses: benchmark-action/github-action-benchmark@v1
with:
tool: 'pytest'
Expand Down
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,51 @@ One can interpret uncertain or approximate dates as 'plus or minus a [level of p

If a date is both uncertain __and__ approximate, the padding is applied twice, i.e. it gets 100% * 2 padding, or 'plus or minus two [levels of precision]'.

### Qualification properties
EDTF objects support properties that provide an overview of how the object is qualified:
- `.is_uncertain (?)`
- `.is_approximate (~)`
- `.is_uncertain_and_approximate (%)`
These properties represent whether the any part of the date object is uncertain, approximate, or uncertain and approximate. For ranges, the properties are true if any part of the range (lower or upper section) is qualified as such. A date is not necessarily uncertain and approximate if it is separately both uncertain and approximate - it must have the "%" qualifier to be considered uncertain and aproximate.
```python
>>> parse_edtf("2006-06-11")
Date: '2006-06-11'
>>> parse_edtf("2006-06-11").is_uncertain
False
>>> parse_edtf("2006-06-11").is_approximate
False

>>> parse_edtf("1984?")
UncertainOrApproximate: '1984?'
>>> parse_edtf("1984?").is_approximate
False
>>> parse_edtf("1984?").is_uncertain
True
>>> parse_edtf("1984?").is_uncertain_and_approximate
False

>>> parse_edtf("1984%").is_uncertain
False
>>> parse_edtf("1984%").is_uncertain_and_approximate
True

>>> parse_edtf("1984~/2004-06")
Level1Interval: '1984~/2004-06'
>>> parse_edtf("1984~/2004-06").is_approximate
True
>>> parse_edtf("1984~/2004-06").is_uncertain
False

>>> parse_edtf("2004?-~06-~04")
PartialUncertainOrApproximate: '2004?-~06-~04'
>>> parse_edtf("2004?-~06-~04").is_approximate
True
>>> parse_edtf("2004?-~06-~04").is_uncertain
True
>>> parse_edtf("2004?-~06-~04").is_uncertain_and_approximate
False
```

### Seasons

Seasons are interpreted as Northern Hemisphere by default. To change this, override the month mapping in `appsettings.py`.
Expand Down
25 changes: 9 additions & 16 deletions edtf/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,12 @@ def __init__(
**kwargs,
):
kwargs["max_length"] = 2000
(
self.natural_text_field,
self.direct_input_field,
self.lower_strict_field,
self.upper_strict_field,
self.lower_fuzzy_field,
self.upper_fuzzy_field,
) = (
natural_text_field,
direct_input_field,
lower_strict_field,
upper_strict_field,
lower_fuzzy_field,
upper_fuzzy_field,
)
self.natural_text_field = natural_text_field
self.direct_input_field = direct_input_field
self.lower_strict_field = lower_strict_field
self.upper_strict_field = upper_strict_field
self.lower_fuzzy_field = lower_fuzzy_field
self.upper_fuzzy_field = upper_fuzzy_field
super().__init__(verbose_name, name, **kwargs)

description = (
Expand All @@ -74,6 +65,8 @@ def deconstruct(self):
name, path, args, kwargs = super().deconstruct()
if self.natural_text_field:
kwargs["natural_text_field"] = self.natural_text_field
if self.direct_input_field:
kwargs["direct_input_field"] = self.direct_input_field

for attr in DATE_ATTRS:
field = f"{attr}_field"
Expand Down Expand Up @@ -152,7 +145,7 @@ def update_values(self, instance, *args, **kwargs):
):
edtf = parse_edtf(
edtf_string, fail_silently=True
) # potetial ParseException if invalid; should this be raised?
) # potential ParseException if invalid; should this be raised?
else:
edtf = existing_value
else:
Expand Down
45 changes: 44 additions & 1 deletion edtf/parser/parser_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def apply_delta(op, time_struct, delta):

class EDTFObject:
"""
Object to attact to a parser to become instantiated when the parser
Object to attach to a parser to become instantiated when the parser
completes.
"""

Expand Down Expand Up @@ -470,6 +470,11 @@ class UncertainOrApproximate(EDTFObject):
def __init__(self, date, ua):
self.date = date
self.ua = ua
self.is_uncertain = ua.is_uncertain if ua else False
self.is_approximate = ua.is_approximate if ua else False
self.is_uncertain_and_approximate = (
ua.is_uncertain_and_approximate if ua else False
)

def __str__(self):
if self.ua:
Expand Down Expand Up @@ -558,6 +563,11 @@ def __init__(
**kwargs,
)
self.ua = ua
self.is_uncertain = ua.is_uncertain if ua else False
self.is_approximate = ua.is_approximate if ua else False
self.is_uncertain_and_approximate = (
ua.is_uncertain_and_approximate if ua else False
)
self.negative = self.year.startswith("-")

def __str__(self):
Expand Down Expand Up @@ -709,6 +719,12 @@ def __init__(self, lower=None, upper=None):
self.upper = UnspecifiedIntervalSection(
False, UncertainOrApproximate(**lower)
)
self.is_approximate = self.lower.is_approximate or self.upper.is_approximate
self.is_uncertain = self.lower.is_uncertain or self.upper.is_uncertain
self.is_uncertain_and_approximate = (
self.lower.is_uncertain_and_approximate
or self.upper.is_uncertain_and_approximate
)

def _get_fuzzy_padding(self, lean):
if lean == EARLIEST:
Expand Down Expand Up @@ -840,6 +856,27 @@ def __init__(

self.all_ua = all_ua

uas = [
year_ua,
month_ua,
day_ua,
year_month_ua,
month_day_ua,
season_ua,
all_ua,
]
self.is_uncertain = any(
item.is_uncertain for item in uas if hasattr(item, "is_uncertain")
)
self.is_approximate = any(
item.is_approximate for item in uas if hasattr(item, "is_approximate")
)
self.is_uncertain_and_approximate = any(
item.is_uncertain_and_approximate
for item in uas
if hasattr(item, "is_uncertain_and_approximate")
)

def __str__(self):
if self.season_ua:
return f"{self.season}{self.season_ua}"
Expand Down Expand Up @@ -1046,6 +1083,12 @@ def __init__(self, lower, upper):
self.upper = upper[0]
else:
self.upper = upper
self.is_approximate = self.lower.is_approximate or self.upper.is_approximate
self.is_uncertain = self.lower.is_uncertain or self.upper.is_uncertain
self.is_uncertain_and_approximate = (
self.lower.is_uncertain_and_approximate
or self.upper.is_uncertain_and_approximate
)


class Level2Season(Season):
Expand Down
33 changes: 33 additions & 0 deletions edtf/parser/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,25 @@
"2001-29",
)

APPROXIMATE_UNCERTAIN_EXAMPLES = (
# first part of tuple is the input EDTF string, second part is a tuple of booleans:
# uncertain ?, approximate ~, both uncertain and approximate %
("2004", (False, False, False)),
("2006-06-11", (False, False, False)),
("-0999", (False, False, False)),
("1984?", (True, False, False)),
("2004-06-11?", (True, False, False)),
("1984~", (False, True, False)),
("1984%", (False, False, True)),
("1984~/2004-06", (False, True, False)),
("2004-%06", (False, False, True)),
("2004?-~06-~04", (True, True, False)),
("2004?-06-04", (True, False, False)),
("2011-~06-~04", (False, True, False)),
("2004-06-~01/2004-06-~20", (False, True, False)),
("156X~", (False, True, False)),
)

BAD_EXAMPLES = (
# parentheses are not used for group qualification in the 2018 spec
None,
Expand Down Expand Up @@ -379,3 +398,17 @@ def test_comparisons():
def test_benchmark_parser(benchmark, test_input):
"""Benchmark parsing of selected EDTF strings."""
benchmark(parse, test_input)


@pytest.mark.parametrize("test_input,expected_tuple", APPROXIMATE_UNCERTAIN_EXAMPLES)
def test_approximate_uncertain(test_input, expected_tuple):
"""Test parsing of EDTF strings and check .is_uncertain, .is_approximate,
and .is_uncertain_and_approximate properties. The expected_tuple should have three
values, the first should be a boolean indicating if the date is uncertain,
the second should be a boolean indicating if the date is approximate, and the
third should be a boolean indicating if the date is both uncertain and approximate."""
result = parse(test_input)
assert isinstance(result, EDTFObject), "Result should be an instance of EDTFObject"
assert result.is_uncertain == expected_tuple[0]
assert result.is_approximate == expected_tuple[1]
assert result.is_uncertain_and_approximate == expected_tuple[2]

10 comments on commit fe96fbd

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/edtf
   __init__.py40100% 
   appsettings.py28485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py1042476%69, 83, 88, 90, 93–94, 96–97, 99, 104, 108–111, 134–135, 152, 154, 156, 166–167, 171–172, 180
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1281191%148–151, 350, 355–360
   parser_classes.py63335044%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 483, 490, 506, 515–517, 519–521, 524–525, 527, 530–533, 535, 537–539, 541, 545, 558, 565–568, 571, 574–577, 580–583, 585–589, 592–593, 596, 600, 606–607, 610, 613–614, 617, 621–622, 625–626, 629, 635, 640–641, 647, 649, 652–654, 660, 665–666, 669, 675, 677, 681–695, 700–702, 706, 708, 711–713, 717, 719, 722–724, 730–733, 738–739, 744–745, 747, 750, 753–755, 757, 760, 763–766, 768–774, 781–784, 786–792, 801–802, 805, 808, 811–813, 815, 823, 842–844, 846–849, 851–852, 854–855, 857, 859, 868, 871, 874, 881–882, 884–885, 887, 889, 891–892, 894, 896–901, 903, 905, 907–908, 910, 913–915, 918–920, 923–925, 933, 935–936, 939–940, 943–944, 947–948, 950–951, 955, 959–960, 963, 968–969, 973–974, 976–984, 986, 996–997, 999, 1001–1002, 1004, 1007, 1012, 1017, 1023–1024, 1027, 1030, 1033, 1035–1037, 1039, 1044–1045, 1047, 1056–1057, 1060, 1063, 1066–1067, 1069, 1078–1079, 1081–1083, 1085–1088, 1100–1102, 1107, 1110–1111, 1113, 1118
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 262, 284, 286–289, 291–293, 295–299, 302–303, 305–306, 309–311, 314–315, 318–321, 324, 327–331, 334, 337, 340, 343–348, 351, 354, 357, 362–363, 365–366, 369–370, 372–374, 377, 379–384, 386–393, 396–398, 400, 403–404, 410–414
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py1041040%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–57, 59, 62, 64–69, 71–75, 77–78, 80, 82–83, 85, 87–88, 90, 92–94, 96–97, 99, 101–104, 106, 108–111, 113, 122–124, 127, 130–131, 134–135, 138–139, 141–143, 146, 150, 152, 154, 156, 159–172, 178, 180–181, 183–184, 189–190
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py128298%357, 359
   parser_classes.py6339884%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 545, 581, 589, 593, 640–641, 647, 665–666, 669, 675, 682, 684, 688, 695, 760, 766, 770, 784, 788, 882, 900–901, 903, 908, 914, 919, 924, 960, 963, 969, 974, 976–984, 999, 1004, 1081, 1085, 1118
   tests.py89198%400
TOTAL2794102763% 

Tests Skipped Failures Errors Time
272 0 💤 0 ❌ 0 🔥 2.940s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/edtf
   __init__.py40100% 
   appsettings.py28485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py1042476%69, 83, 88, 90, 93–94, 96–97, 99, 104, 108–111, 134–135, 152, 154, 156, 166–167, 171–172, 180
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1281191%148–151, 350, 355–360
   parser_classes.py63335044%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 483, 490, 506, 515–517, 519–521, 524–525, 527, 530–533, 535, 537–539, 541, 545, 558, 565–568, 571, 574–577, 580–583, 585–589, 592–593, 596, 600, 606–607, 610, 613–614, 617, 621–622, 625–626, 629, 635, 640–641, 647, 649, 652–654, 660, 665–666, 669, 675, 677, 681–695, 700–702, 706, 708, 711–713, 717, 719, 722–724, 730–733, 738–739, 744–745, 747, 750, 753–755, 757, 760, 763–766, 768–774, 781–784, 786–792, 801–802, 805, 808, 811–813, 815, 823, 842–844, 846–849, 851–852, 854–855, 857, 859, 868, 871, 874, 881–882, 884–885, 887, 889, 891–892, 894, 896–901, 903, 905, 907–908, 910, 913–915, 918–920, 923–925, 933, 935–936, 939–940, 943–944, 947–948, 950–951, 955, 959–960, 963, 968–969, 973–974, 976–984, 986, 996–997, 999, 1001–1002, 1004, 1007, 1012, 1017, 1023–1024, 1027, 1030, 1033, 1035–1037, 1039, 1044–1045, 1047, 1056–1057, 1060, 1063, 1066–1067, 1069, 1078–1079, 1081–1083, 1085–1088, 1100–1102, 1107, 1110–1111, 1113, 1118
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 262, 284, 286–289, 291–293, 295–299, 302–303, 305–306, 309–311, 314–315, 318–321, 324, 327–331, 334, 337, 340, 343–348, 351, 354, 357, 362–363, 365–366, 369–370, 372–374, 377, 379–384, 386–393, 396–398, 400, 403–404, 410–414
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py1041040%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–57, 59, 62, 64–69, 71–75, 77–78, 80, 82–83, 85, 87–88, 90, 92–94, 96–97, 99, 101–104, 106, 108–111, 113, 122–124, 127, 130–131, 134–135, 138–139, 141–143, 146, 150, 152, 154, 156, 159–172, 178, 180–181, 183–184, 189–190
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py128298%357, 359
   parser_classes.py6339884%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 545, 581, 589, 593, 640–641, 647, 665–666, 669, 675, 682, 684, 688, 695, 760, 766, 770, 784, 788, 882, 900–901, 903, 908, 914, 919, 924, 960, 963, 969, 974, 976–984, 999, 1004, 1081, 1085, 1118
   tests.py89198%400
TOTAL2794102763% 

Tests Skipped Failures Errors Time
272 0 💤 0 ❌ 0 🔥 3.022s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/edtf
   __init__.py40100% 
   appsettings.py28485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py1042476%69, 83, 88, 90, 93–94, 96–97, 99, 104, 108–111, 134–135, 152, 154, 156, 166–167, 171–172, 180
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1281191%148–151, 350, 355–360
   parser_classes.py63335044%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 483, 490, 506, 515–517, 519–521, 524–525, 527, 530–533, 535, 537–539, 541, 545, 558, 565–568, 571, 574–577, 580–583, 585–589, 592–593, 596, 600, 606–607, 610, 613–614, 617, 621–622, 625–626, 629, 635, 640–641, 647, 649, 652–654, 660, 665–666, 669, 675, 677, 681–695, 700–702, 706, 708, 711–713, 717, 719, 722–724, 730–733, 738–739, 744–745, 747, 750, 753–755, 757, 760, 763–766, 768–774, 781–784, 786–792, 801–802, 805, 808, 811–813, 815, 823, 842–844, 846–849, 851–852, 854–855, 857, 859, 868, 871, 874, 881–882, 884–885, 887, 889, 891–892, 894, 896–901, 903, 905, 907–908, 910, 913–915, 918–920, 923–925, 933, 935–936, 939–940, 943–944, 947–948, 950–951, 955, 959–960, 963, 968–969, 973–974, 976–984, 986, 996–997, 999, 1001–1002, 1004, 1007, 1012, 1017, 1023–1024, 1027, 1030, 1033, 1035–1037, 1039, 1044–1045, 1047, 1056–1057, 1060, 1063, 1066–1067, 1069, 1078–1079, 1081–1083, 1085–1088, 1100–1102, 1107, 1110–1111, 1113, 1118
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 262, 284, 286–289, 291–293, 295–299, 302–303, 305–306, 309–311, 314–315, 318–321, 324, 327–331, 334, 337, 340, 343–348, 351, 354, 357, 362–363, 365–366, 369–370, 372–374, 377, 379–384, 386–393, 396–398, 400, 403–404, 410–414
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py1041040%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–57, 59, 62, 64–69, 71–75, 77–78, 80, 82–83, 85, 87–88, 90, 92–94, 96–97, 99, 101–104, 106, 108–111, 113, 122–124, 127, 130–131, 134–135, 138–139, 141–143, 146, 150, 152, 154, 156, 159–172, 178, 180–181, 183–184, 189–190
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py128298%357, 359
   parser_classes.py6339884%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 545, 581, 589, 593, 640–641, 647, 665–666, 669, 675, 682, 684, 688, 695, 760, 766, 770, 784, 788, 882, 900–901, 903, 908, 914, 919, 924, 960, 963, 969, 974, 976–984, 999, 1004, 1081, 1085, 1118
   tests.py89198%400
TOTAL2794102763% 

Tests Skipped Failures Errors Time
272 0 💤 0 ❌ 0 🔥 4.377s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/edtf
   __init__.py40100% 
   appsettings.py28485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py1042476%69, 83, 88, 90, 93–94, 96–97, 99, 104, 108–111, 134–135, 152, 154, 156, 166–167, 171–172, 180
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1281191%148–151, 350, 355–360
   parser_classes.py63335044%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 483, 490, 506, 515–517, 519–521, 524–525, 527, 530–533, 535, 537–539, 541, 545, 558, 565–568, 571, 574–577, 580–583, 585–589, 592–593, 596, 600, 606–607, 610, 613–614, 617, 621–622, 625–626, 629, 635, 640–641, 647, 649, 652–654, 660, 665–666, 669, 675, 677, 681–695, 700–702, 706, 708, 711–713, 717, 719, 722–724, 730–733, 738–739, 744–745, 747, 750, 753–755, 757, 760, 763–766, 768–774, 781–784, 786–792, 801–802, 805, 808, 811–813, 815, 823, 842–844, 846–849, 851–852, 854–855, 857, 859, 868, 871, 874, 881–882, 884–885, 887, 889, 891–892, 894, 896–901, 903, 905, 907–908, 910, 913–915, 918–920, 923–925, 933, 935–936, 939–940, 943–944, 947–948, 950–951, 955, 959–960, 963, 968–969, 973–974, 976–984, 986, 996–997, 999, 1001–1002, 1004, 1007, 1012, 1017, 1023–1024, 1027, 1030, 1033, 1035–1037, 1039, 1044–1045, 1047, 1056–1057, 1060, 1063, 1066–1067, 1069, 1078–1079, 1081–1083, 1085–1088, 1100–1102, 1107, 1110–1111, 1113, 1118
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 262, 284, 286–289, 291–293, 295–299, 302–303, 305–306, 309–311, 314–315, 318–321, 324, 327–331, 334, 337, 340, 343–348, 351, 354, 357, 362–363, 365–366, 369–370, 372–374, 377, 379–384, 386–393, 396–398, 400, 403–404, 410–414
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py1041040%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–57, 59, 62, 64–69, 71–75, 77–78, 80, 82–83, 85, 87–88, 90, 92–94, 96–97, 99, 101–104, 106, 108–111, 113, 122–124, 127, 130–131, 134–135, 138–139, 141–143, 146, 150, 152, 154, 156, 159–172, 178, 180–181, 183–184, 189–190
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py128298%357, 359
   parser_classes.py6339884%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 545, 581, 589, 593, 640–641, 647, 665–666, 669, 675, 682, 684, 688, 695, 760, 766, 770, 784, 788, 882, 900–901, 903, 908, 914, 919, 924, 960, 963, 969, 974, 976–984, 999, 1004, 1081, 1085, 1118
   tests.py89198%400
TOTAL2794102763% 

Tests Skipped Failures Errors Time
272 0 💤 0 ❌ 0 🔥 2.766s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

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

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/edtf
   __init__.py40100% 
   appsettings.py28485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py1042476%69, 83, 88, 90, 93–94, 96–97, 99, 104, 108–111, 134–135, 152, 154, 156, 166–167, 171–172, 180
   jdutil.py986632%37, 55, 91–92, 105, 152, 154–155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 251–252, 254–255, 257–258, 260, 262, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py71710%3–4, 6, 9–13, 16–21, 24–25, 28–29, 32–37, 40–44, 52–53, 56–62, 65–71, 74–79, 82–85, 88–91, 94–97, 100–107
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1487152%34, 44–45, 47–50, 55–56, 59–62, 64, 68–71, 73–74, 76–78, 86–88, 90–94, 104, 106, 119, 126, 157–159, 161–166, 169–171, 173–178, 202–205, 209, 224, 226–227, 229, 246, 248, 256, 258, 260, 262, 267, 270, 276
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.9.19/x64/lib/python3.9/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1281191%148–151, 350, 355–360
   parser_classes.py63335044%69, 71, 78–81, 83–84, 86–87, 110–112, 116, 119, 122, 181, 183, 190, 192, 198–202, 207–213, 220–224, 229–235, 246, 257, 286, 290, 302–304, 309, 317–319, 322, 337–338, 342, 371–375, 378, 383–384, 387, 390, 393, 396–400, 403–407, 427–429, 453, 457, 462, 464, 483, 490, 506, 515–517, 519–521, 524–525, 527, 530–533, 535, 537–539, 541, 545, 558, 565–568, 571, 574–577, 580–583, 585–589, 592–593, 596, 600, 606–607, 610, 613–614, 617, 621–622, 625–626, 629, 635, 640–641, 647, 649, 652–654, 660, 665–666, 669, 675, 677, 681–695, 700–702, 706, 708, 711–713, 717, 719, 722–724, 730–733, 738–739, 744–745, 747, 750, 753–755, 757, 760, 763–766, 768–774, 781–784, 786–792, 801–802, 805, 808, 811–813, 815, 823, 842–844, 846–849, 851–852, 854–855, 857, 859, 868, 871, 874, 881–882, 884–885, 887, 889, 891–892, 894, 896–901, 903, 905, 907–908, 910, 913–915, 918–920, 923–925, 933, 935–936, 939–940, 943–944, 947–948, 950–951, 955, 959–960, 963, 968–969, 973–974, 976–984, 986, 996–997, 999, 1001–1002, 1004, 1007, 1012, 1017, 1023–1024, 1027, 1030, 1033, 1035–1037, 1039, 1044–1045, 1047, 1056–1057, 1060, 1063, 1066–1067, 1069, 1078–1079, 1081–1083, 1085–1088, 1100–1102, 1107, 1110–1111, 1113, 1118
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 262, 284, 286–289, 291–293, 295–299, 302–303, 305–306, 309–311, 314–315, 318–321, 324, 327–331, 334, 337, 340, 343–348, 351, 354, 357, 362–363, 365–366, 369–370, 372–374, 377, 379–384, 386–393, 396–398, 400, 403–404, 410–414
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py1041040%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–57, 59, 62, 64–69, 71–75, 77–78, 80, 82–83, 85, 87–88, 90, 92–94, 96–97, 99, 101–104, 106, 108–111, 113, 122–124, 127, 130–131, 134–135, 138–139, 141–143, 146, 150, 152, 154, 156, 159–172, 178, 180–181, 183–184, 189–190
   jdutil.py984455%37, 55, 91–92, 287, 291, 314, 316–317, 319, 321, 346, 348, 350, 370–372, 374, 376, 378, 381–383, 385, 387, 389, 392–393, 395, 397, 399–400, 402, 405–407, 410–413, 415, 417, 424, 431
   tests.py710100% 
edtf/natlang
   __init__.py20100% 
   en.py1481192%56, 59, 119, 165–166, 177–178, 204–205, 209, 276
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py128298%357, 359
   parser_classes.py6339884%110–112, 119, 122, 183, 189–193, 200–202, 209–213, 222–224, 229–235, 246, 337–338, 371–375, 378, 393, 396–400, 403–407, 427–429, 545, 581, 589, 593, 640–641, 647, 665–666, 669, 675, 682, 684, 688, 695, 760, 766, 770, 784, 788, 882, 900–901, 903, 908, 914, 919, 924, 960, 963, 969, 974, 976–984, 999, 1004, 1081, 1085, 1118
   tests.py89198%400
TOTAL2794102763% 

Tests Skipped Failures Errors Time
272 0 💤 0 ❌ 0 🔥 2.720s ⏱️

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: fe96fbd Previous: d779dea Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 114269.51378327646 iter/sec (stddev: 8.246011987463667e-7) 111005.63683471343 iter/sec (stddev: 0.0000017682682176122463) 0.97
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 11260.631416293476 iter/sec (stddev: 0.000004416981347103093) 11527.049523833446 iter/sec (stddev: 0.00000696274694724977) 1.02
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 14125.938571824938 iter/sec (stddev: 0.000004281404641596464) 14254.600310800304 iter/sec (stddev: 0.000004171374347488453) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 9399.149956836078 iter/sec (stddev: 0.000004437830127826506) 9492.852176537901 iter/sec (stddev: 0.0000049421127908965) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 16824.010825636844 iter/sec (stddev: 0.0000029507469850812695) 16757.389733104177 iter/sec (stddev: 0.000005789960308121746) 1.00
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 11870.009944363144 iter/sec (stddev: 0.000004300162756418916) 11366.497349357842 iter/sec (stddev: 0.00001685585653437466) 0.96
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 7538.683100772477 iter/sec (stddev: 0.0000047290982420973736) 7565.309539663209 iter/sec (stddev: 0.000006333742116734396) 1.00
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 10311.647043811756 iter/sec (stddev: 0.000003918178860357336) 10281.974119491722 iter/sec (stddev: 0.000005685894741382306) 1.00
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 69494.88836445277 iter/sec (stddev: 8.80924844430308e-7) 68293.37375977173 iter/sec (stddev: 0.0000015277564740450068) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 58177.1430800641 iter/sec (stddev: 0.000002170165266080395) 56457.11584605515 iter/sec (stddev: 0.0000013775247465895603) 0.97
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 32646.511846958427 iter/sec (stddev: 0.000001909905339624809) 32791.422863402906 iter/sec (stddev: 0.000002322618862403658) 1.00
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 152.35706935352107 iter/sec (stddev: 0.0005198183242759153) 143.76257483714818 iter/sec (stddev: 0.0005744237587077905) 0.94
edtf/parser/tests.py::test_benchmark_parser[2008-12] 158.44958962665254 iter/sec (stddev: 0.0019182160437399714) 150.3612533892027 iter/sec (stddev: 0.002118574842319749) 0.95
edtf/parser/tests.py::test_benchmark_parser[2008] 194.00152291189477 iter/sec (stddev: 0.0018112267633633905) 183.96503515596967 iter/sec (stddev: 0.002042248208139641) 0.95
edtf/parser/tests.py::test_benchmark_parser[-0999] 196.5216767762988 iter/sec (stddev: 0.0017838979228276869) 184.52193671007785 iter/sec (stddev: 0.0015797212485958547) 0.94
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 133.865114959128 iter/sec (stddev: 0.0018395916201830698) 124.0054830892155 iter/sec (stddev: 0.002651854613621762) 0.93
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 108.21990454634619 iter/sec (stddev: 0.0017911269604934626) 101.09448387669151 iter/sec (stddev: 0.0017434150030809575) 0.93
edtf/parser/tests.py::test_benchmark_parser[/2006] 258.24463653998146 iter/sec (stddev: 0.00014679053117158975) 230.8840765355795 iter/sec (stddev: 0.0011766118290818851) 0.89
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 207.4126949390334 iter/sec (stddev: 0.0012461533796340645) 195.02695994500073 iter/sec (stddev: 0.0004080168133067918) 0.94
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 21.76462089209071 iter/sec (stddev: 0.0013330920320896002) 19.217922899334646 iter/sec (stddev: 0.0038690581918563597) 0.88
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 422.8681710287067 iter/sec (stddev: 0.0008648161753762849) 407.6574222826331 iter/sec (stddev: 0.00009371461743442357) 0.96
edtf/parser/tests.py::test_benchmark_parser[2001-29] 115.48738188072137 iter/sec (stddev: 0.0018665165112689488) 108.34927744937332 iter/sec (stddev: 0.0018375314022531799) 0.94

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: fe96fbd Previous: d779dea Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 69332.54071438026 iter/sec (stddev: 9.744156557963923e-7) 111005.63683471343 iter/sec (stddev: 0.0000017682682176122463) 1.60
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8332.618921699564 iter/sec (stddev: 0.000005659606506635299) 11527.049523833446 iter/sec (stddev: 0.00000696274694724977) 1.38
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 9969.70530095253 iter/sec (stddev: 0.000005421248164937998) 14254.600310800304 iter/sec (stddev: 0.000004171374347488453) 1.43
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 6504.312488330374 iter/sec (stddev: 0.00002892614420687421) 9492.852176537901 iter/sec (stddev: 0.0000049421127908965) 1.46
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 11620.454734625755 iter/sec (stddev: 0.000005837741960844797) 16757.389733104177 iter/sec (stddev: 0.000005789960308121746) 1.44
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8444.340476835623 iter/sec (stddev: 0.000007576503424139933) 11366.497349357842 iter/sec (stddev: 0.00001685585653437466) 1.35
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5687.1854960991395 iter/sec (stddev: 0.000008367548944103804) 7565.309539663209 iter/sec (stddev: 0.000006333742116734396) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7317.785989371506 iter/sec (stddev: 0.000011718049045997168) 10281.974119491722 iter/sec (stddev: 0.000005685894741382306) 1.41
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 50330.24443360278 iter/sec (stddev: 0.0000010923682365344059) 68293.37375977173 iter/sec (stddev: 0.0000015277564740450068) 1.36
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 44496.77056469877 iter/sec (stddev: 0.0000017963276567043365) 56457.11584605515 iter/sec (stddev: 0.0000013775247465895603) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 21868.267612172105 iter/sec (stddev: 0.000005375525259216134) 32791.422863402906 iter/sec (stddev: 0.000002322618862403658) 1.50
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 123.26628523195085 iter/sec (stddev: 0.0006217247063308044) 143.76257483714818 iter/sec (stddev: 0.0005744237587077905) 1.17
edtf/parser/tests.py::test_benchmark_parser[2008-12] 130.39542438717763 iter/sec (stddev: 0.0019870430838501135) 150.3612533892027 iter/sec (stddev: 0.002118574842319749) 1.15
edtf/parser/tests.py::test_benchmark_parser[2008] 162.40134787592098 iter/sec (stddev: 0.001742483359077629) 183.96503515596967 iter/sec (stddev: 0.002042248208139641) 1.13
edtf/parser/tests.py::test_benchmark_parser[-0999] 162.440636423916 iter/sec (stddev: 0.0015966291035522072) 184.52193671007785 iter/sec (stddev: 0.0015797212485958547) 1.14
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 108.40333052357825 iter/sec (stddev: 0.002216278081910242) 124.0054830892155 iter/sec (stddev: 0.002651854613621762) 1.14
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 89.63104074767251 iter/sec (stddev: 0.0019203388825664446) 101.09448387669151 iter/sec (stddev: 0.0017434150030809575) 1.13
edtf/parser/tests.py::test_benchmark_parser[/2006] 210.68879424761232 iter/sec (stddev: 0.0001822433447036016) 230.8840765355795 iter/sec (stddev: 0.0011766118290818851) 1.10
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 169.28204113645998 iter/sec (stddev: 0.001271537070194122) 195.02695994500073 iter/sec (stddev: 0.0004080168133067918) 1.15
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 18.351927164653418 iter/sec (stddev: 0.00061180842365379) 19.217922899334646 iter/sec (stddev: 0.0038690581918563597) 1.05
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 336.534047610813 iter/sec (stddev: 0.00011153726772584923) 407.6574222826331 iter/sec (stddev: 0.00009371461743442357) 1.21
edtf/parser/tests.py::test_benchmark_parser[2001-29] 94.49867211676006 iter/sec (stddev: 0.002051493110458071) 108.34927744937332 iter/sec (stddev: 0.0018375314022531799) 1.15

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: fe96fbd Previous: d779dea Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 88855.61656688323 iter/sec (stddev: 8.414862620588288e-7) 111005.63683471343 iter/sec (stddev: 0.0000017682682176122463) 1.25
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 9067.038430777973 iter/sec (stddev: 0.0000069716344713179445) 11527.049523833446 iter/sec (stddev: 0.00000696274694724977) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 11251.45469684003 iter/sec (stddev: 0.000011895810110395933) 14254.600310800304 iter/sec (stddev: 0.000004171374347488453) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7639.740948436617 iter/sec (stddev: 0.000009198657507446905) 9492.852176537901 iter/sec (stddev: 0.0000049421127908965) 1.24
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 13486.787174496785 iter/sec (stddev: 0.000004766961313391001) 16757.389733104177 iter/sec (stddev: 0.000005789960308121746) 1.24
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 9651.160072759856 iter/sec (stddev: 0.000005410858809918197) 11366.497349357842 iter/sec (stddev: 0.00001685585653437466) 1.18
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 6192.38784258671 iter/sec (stddev: 0.000005887040468839769) 7565.309539663209 iter/sec (stddev: 0.000006333742116734396) 1.22
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 8278.940685827298 iter/sec (stddev: 0.0000067223893966360195) 10281.974119491722 iter/sec (stddev: 0.000005685894741382306) 1.24
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 51997.19308008482 iter/sec (stddev: 0.0000013176285520472095) 68293.37375977173 iter/sec (stddev: 0.0000015277564740450068) 1.31
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 46435.49150059613 iter/sec (stddev: 0.000001120168783062601) 56457.11584605515 iter/sec (stddev: 0.0000013775247465895603) 1.22
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 25943.242154234646 iter/sec (stddev: 0.000002749033942317899) 32791.422863402906 iter/sec (stddev: 0.000002322618862403658) 1.26
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 169.68390527034975 iter/sec (stddev: 0.00034577024137090305) 143.76257483714818 iter/sec (stddev: 0.0005744237587077905) 0.85
edtf/parser/tests.py::test_benchmark_parser[2008-12] 172.44505048416775 iter/sec (stddev: 0.0019927173502067652) 150.3612533892027 iter/sec (stddev: 0.002118574842319749) 0.87
edtf/parser/tests.py::test_benchmark_parser[2008] 212.40783429951085 iter/sec (stddev: 0.0012356840815419283) 183.96503515596967 iter/sec (stddev: 0.002042248208139641) 0.87
edtf/parser/tests.py::test_benchmark_parser[-0999] 205.50619799453494 iter/sec (stddev: 0.0016753441651683658) 184.52193671007785 iter/sec (stddev: 0.0015797212485958547) 0.90
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 148.2788064238898 iter/sec (stddev: 0.001670803758517489) 124.0054830892155 iter/sec (stddev: 0.002651854613621762) 0.84
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 125.34252282983856 iter/sec (stddev: 0.0016437369989100873) 101.09448387669151 iter/sec (stddev: 0.0017434150030809575) 0.81
edtf/parser/tests.py::test_benchmark_parser[/2006] 327.37395687424646 iter/sec (stddev: 0.000989275535309965) 230.8840765355795 iter/sec (stddev: 0.0011766118290818851) 0.71
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 229.92044519448407 iter/sec (stddev: 0.0005696556479835321) 195.02695994500073 iter/sec (stddev: 0.0004080168133067918) 0.85
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 33.25529251891988 iter/sec (stddev: 0.0027130361747203955) 19.217922899334646 iter/sec (stddev: 0.0038690581918563597) 0.58
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 468.0190527842179 iter/sec (stddev: 0.00006738498403076778) 407.6574222826331 iter/sec (stddev: 0.00009371461743442357) 0.87
edtf/parser/tests.py::test_benchmark_parser[2001-29] 124.04346579538988 iter/sec (stddev: 0.002315549837526852) 108.34927744937332 iter/sec (stddev: 0.0018375314022531799) 0.87

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: fe96fbd Previous: d779dea Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 80856.28109042694 iter/sec (stddev: 0.0000015402944077573517) 111005.63683471343 iter/sec (stddev: 0.0000017682682176122463) 1.37
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8670.737681207816 iter/sec (stddev: 0.000009297147652400839) 11527.049523833446 iter/sec (stddev: 0.00000696274694724977) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 10779.98837940427 iter/sec (stddev: 0.0000049769332394859705) 14254.600310800304 iter/sec (stddev: 0.000004171374347488453) 1.32
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7034.30618665168 iter/sec (stddev: 0.0000066179526416175095) 9492.852176537901 iter/sec (stddev: 0.0000049421127908965) 1.35
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 12899.315848589486 iter/sec (stddev: 0.000006305902974176511) 16757.389733104177 iter/sec (stddev: 0.000005789960308121746) 1.30
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 9023.569982411476 iter/sec (stddev: 0.000013872677670277765) 11366.497349357842 iter/sec (stddev: 0.00001685585653437466) 1.26
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5338.805528642938 iter/sec (stddev: 0.00007852153817298242) 7565.309539663209 iter/sec (stddev: 0.000006333742116734396) 1.42
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7769.278986267422 iter/sec (stddev: 0.000005867889578630099) 10281.974119491722 iter/sec (stddev: 0.000005685894741382306) 1.32
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 49038.85224226223 iter/sec (stddev: 0.0000017327725246077572) 68293.37375977173 iter/sec (stddev: 0.0000015277564740450068) 1.39
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 42547.575254411095 iter/sec (stddev: 0.0000022011578345345184) 56457.11584605515 iter/sec (stddev: 0.0000013775247465895603) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 24481.870628084125 iter/sec (stddev: 0.0000026321945007906103) 32791.422863402906 iter/sec (stddev: 0.000002322618862403658) 1.34
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 155.68697325019647 iter/sec (stddev: 0.00048823109417417225) 143.76257483714818 iter/sec (stddev: 0.0005744237587077905) 0.92
edtf/parser/tests.py::test_benchmark_parser[2008-12] 163.0525873543244 iter/sec (stddev: 0.0017842322067065021) 150.3612533892027 iter/sec (stddev: 0.002118574842319749) 0.92
edtf/parser/tests.py::test_benchmark_parser[2008] 194.98959059339748 iter/sec (stddev: 0.0015932755674563806) 183.96503515596967 iter/sec (stddev: 0.002042248208139641) 0.94
edtf/parser/tests.py::test_benchmark_parser[-0999] 190.9587873718184 iter/sec (stddev: 0.001731317403615081) 184.52193671007785 iter/sec (stddev: 0.0015797212485958547) 0.97
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 138.7554900927261 iter/sec (stddev: 0.0014191971104236503) 124.0054830892155 iter/sec (stddev: 0.002651854613621762) 0.89
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 120.72276347036784 iter/sec (stddev: 0.0001905254586967523) 101.09448387669151 iter/sec (stddev: 0.0017434150030809575) 0.84
edtf/parser/tests.py::test_benchmark_parser[/2006] 304.389831339761 iter/sec (stddev: 0.0009014447296699653) 230.8840765355795 iter/sec (stddev: 0.0011766118290818851) 0.76
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 213.40709870314183 iter/sec (stddev: 0.001199829349946196) 195.02695994500073 iter/sec (stddev: 0.0004080168133067918) 0.91
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 31.367919545221422 iter/sec (stddev: 0.00035045076954682343) 19.217922899334646 iter/sec (stddev: 0.0038690581918563597) 0.61
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 436.3403704684484 iter/sec (stddev: 0.00006942131729585877) 407.6574222826331 iter/sec (stddev: 0.00009371461743442357) 0.93
edtf/parser/tests.py::test_benchmark_parser[2001-29] 115.30268904488065 iter/sec (stddev: 0.002392924971588977) 108.34927744937332 iter/sec (stddev: 0.0018375314022531799) 0.94

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: fe96fbd Previous: d779dea Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 80229.14077527201 iter/sec (stddev: 7.366292015190674e-7) 111005.63683471343 iter/sec (stddev: 0.0000017682682176122463) 1.38
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8574.43266910305 iter/sec (stddev: 0.000004640894332313885) 11527.049523833446 iter/sec (stddev: 0.00000696274694724977) 1.34
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 10733.52651732914 iter/sec (stddev: 0.0000045551179287595485) 14254.600310800304 iter/sec (stddev: 0.000004171374347488453) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 6753.994602893573 iter/sec (stddev: 0.000027276977713168464) 9492.852176537901 iter/sec (stddev: 0.0000049421127908965) 1.41
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 12801.903600603247 iter/sec (stddev: 0.0000039492985029616716) 16757.389733104177 iter/sec (stddev: 0.000005789960308121746) 1.31
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8900.15751635558 iter/sec (stddev: 0.0000060374870522731125) 11366.497349357842 iter/sec (stddev: 0.00001685585653437466) 1.28
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5674.687725898851 iter/sec (stddev: 0.000006294063243081827) 7565.309539663209 iter/sec (stddev: 0.000006333742116734396) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7692.895426446438 iter/sec (stddev: 0.000005102877613596146) 10281.974119491722 iter/sec (stddev: 0.000005685894741382306) 1.34
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 50717.697743615936 iter/sec (stddev: 0.0000012791929726073655) 68293.37375977173 iter/sec (stddev: 0.0000015277564740450068) 1.35
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 43616.48589514034 iter/sec (stddev: 0.0000011944759543285026) 56457.11584605515 iter/sec (stddev: 0.0000013775247465895603) 1.29
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 24861.127223182142 iter/sec (stddev: 0.0000025963903726474966) 32791.422863402906 iter/sec (stddev: 0.000002322618862403658) 1.32
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 162.83697367013986 iter/sec (stddev: 0.0003989293311044315) 143.76257483714818 iter/sec (stddev: 0.0005744237587077905) 0.88
edtf/parser/tests.py::test_benchmark_parser[2008-12] 167.1124054886552 iter/sec (stddev: 0.0015869699158292969) 150.3612533892027 iter/sec (stddev: 0.002118574842319749) 0.90
edtf/parser/tests.py::test_benchmark_parser[2008] 203.4183553343825 iter/sec (stddev: 0.0011912729823639156) 183.96503515596967 iter/sec (stddev: 0.002042248208139641) 0.90
edtf/parser/tests.py::test_benchmark_parser[-0999] 203.83278927027686 iter/sec (stddev: 0.0009344044494195833) 184.52193671007785 iter/sec (stddev: 0.0015797212485958547) 0.91
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 142.61368044231062 iter/sec (stddev: 0.0016002884994136396) 124.0054830892155 iter/sec (stddev: 0.002651854613621762) 0.87
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 121.88256048947272 iter/sec (stddev: 0.0012649168646300737) 101.09448387669151 iter/sec (stddev: 0.0017434150030809575) 0.83
edtf/parser/tests.py::test_benchmark_parser[/2006] 328.71763974978586 iter/sec (stddev: 0.00014516272790722042) 230.8840765355795 iter/sec (stddev: 0.0011766118290818851) 0.70
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 224.15234875560168 iter/sec (stddev: 0.0008417113420262031) 195.02695994500073 iter/sec (stddev: 0.0004080168133067918) 0.87
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 32.23625184981204 iter/sec (stddev: 0.0021022456077433357) 19.217922899334646 iter/sec (stddev: 0.0038690581918563597) 0.60
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 448.9416145585501 iter/sec (stddev: 0.00006617824013544789) 407.6574222826331 iter/sec (stddev: 0.00009371461743442357) 0.91
edtf/parser/tests.py::test_benchmark_parser[2001-29] 120.1463811604932 iter/sec (stddev: 0.0017981392512216362) 108.34927744937332 iter/sec (stddev: 0.0018375314022531799) 0.90

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.