Skip to content

Commit

Permalink
Merge pull request #59 from artshumrc/30_improve_exceptions
Browse files Browse the repository at this point in the history
Improve exceptions
  • Loading branch information
aweakley authored Jun 10, 2024
2 parents 8c571b0 + daf0d04 commit d779dea
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 15 deletions.
2 changes: 2 additions & 0 deletions edtf/appsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,5 @@
MULTIPLIER_IF_APPROXIMATE = EDTF.get("MULTIPLIER_IF_APPROXIMATE", 1.0)
MULTIPLIER_IF_BOTH = EDTF.get("MULTIPLIER_IF_BOTH", 2.0)
DELTA_IF_UNKNOWN = EDTF.get("DELTA_IF_UNKNOWN", relativedelta(years=10))

DEBUG_PYPARSING = False
12 changes: 8 additions & 4 deletions edtf/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
from django.db import models
from django.db.models import signals
from django.db.models.query_utils import DeferredAttribute
from pyparsing import ParseException

from edtf import EDTFObject, parse_edtf
from edtf.convert import struct_time_to_date, struct_time_to_jd
from edtf.natlang import text_to_edtf
from edtf.parser.edtf_exceptions import EDTFParseException

DATE_ATTRS = (
"lower_strict",
Expand Down Expand Up @@ -132,10 +134,12 @@ def update_values(self, instance, *args, **kwargs):
if direct_input and (
existing_value is None or str(existing_value) != direct_input
):
edtf = parse_edtf(
direct_input, fail_silently=True
) # ParseException if invalid; should this be raised?
# TODO pyparsing.ParseExceptions are very noisy and dumps the whole grammar (see https://github.com/ixc/python-edtf/issues/46)
try:
edtf = parse_edtf(
direct_input, fail_silently=True
) # ParseException if invalid; should this be raised?
except ParseException as err:
raise EDTFParseException(direct_input, err) from None

# set the natural_text (display) field to the direct_input if it is not provided
if natural_text == "":
Expand Down
26 changes: 25 additions & 1 deletion edtf/parser/edtf_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,28 @@


class EDTFParseException(ParseException):
pass
"""Raised when an input cannot be parsed as an EDTF string.
Attributes:
input_string - the input string that could not be parsed
err -- the original ParseException that caused this one
"""

def __init__(self, input_string, err=None):
if input_string is None:
input_string = ""
self.input_string = input_string
if err is None:
err = ParseException(input_string, 0, "Invalid input or format.")
self.err = err
super().__init__(str(err), err.loc if err.loc else 0, self.input_string)

def __str__(self):
if not self.input_string:
return "You must supply some input text"
near_text = (
self.input_string[max(self.err.loc - 10, 0) : self.err.loc + 10]
if hasattr(self.err, "loc")
else ""
)
return f"Error at position {self.err.loc}: Invalid input or format near '{near_text}'. Please provide a valid EDTF string."
15 changes: 10 additions & 5 deletions edtf/parser/grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# https://github.com/pyparsing/pyparsing/wiki/Performance-Tips

import pyparsing
from edtf.appsettings import DEBUG_PYPARSING

pyparsing.ParserElement.enablePackrat()

Expand Down Expand Up @@ -342,14 +343,18 @@ def f(toks):
)


def parse_edtf(str, parseAll=True, fail_silently=False):
def parse_edtf(input_string, parseAll=True, fail_silently=False, debug=None):
if debug is None:
debug = DEBUG_PYPARSING
if not input_string:
raise EDTFParseException(input_string)
try:
if not str:
raise ParseException("You must supply some input text")
p = edtfParser.parseString(str.strip(), parseAll)
p = edtfParser.parseString(input_string.strip(), parseAll)
if p:
return p[0]
except ParseException as err:
if fail_silently:
return None
raise EDTFParseException(err) from err
if debug:
raise
raise EDTFParseException(input_string, err) from None
8 changes: 8 additions & 0 deletions edtf/parser/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,14 @@ def test_non_parsing(bad_input):
parse(bad_input)


@pytest.mark.parametrize("bad_input", [None, ""])
def test_empty_input(bad_input):
"""Test that empty input raises a specific exception."""
with pytest.raises(EDTFParseException) as exc_info:
parse(bad_input)
assert "You must supply some input text" in str(exc_info.value)


def test_comparisons():
"""Test comparisons between parsed EDTF objects and standard dates."""
d1 = parse("1979-08~")
Expand Down
44 changes: 43 additions & 1 deletion edtf_django_tests/edtf_integration/admin.py
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# Register your models here.
from django.contrib import admin

from .models import TestEvent


class TestEventAdmin(admin.ModelAdmin):
list_display = (
"date_display",
"date_edtf_direct",
"date_earliest",
"date_latest",
"date_sort_ascending",
"date_sort_descending",
"date_edtf",
)
search_fields = ("date_display", "date_edtf_direct")
list_filter = ("date_earliest", "date_latest")
readonly_fields = (
"date_earliest",
"date_latest",
"date_sort_ascending",
"date_sort_descending",
"date_edtf",
)

fieldsets = (
(None, {"fields": ("date_display", "date_edtf_direct", "date_edtf")}),
(
"Computed Dates",
{
"classes": ("collapse",),
"fields": (
"date_earliest",
"date_latest",
"date_sort_ascending",
"date_sort_descending",
),
},
),
)


admin.site.register(TestEvent, TestEventAdmin)
4 changes: 0 additions & 4 deletions edtf_django_tests/edtf_integration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,5 @@ def __str__(self) -> str:
return (
f"Test Event: {self.date_display=}, "
f"{self.date_edtf_direct=}, "
f"{self.date_earliest=}, "
f"{self.date_latest=}, "
f"{self.date_sort_ascending=}, "
f"{self.date_sort_descending=}, "
f"{self.date_edtf=}"
)

10 comments on commit d779dea

@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.py972376%90, 95, 97, 100–101, 103–104, 106, 111, 115–118, 141–142, 159, 161, 163, 173–174, 178–179, 187
   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.py61733745%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, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 553, 560–561, 564–567, 570–573, 575–579, 582–583, 586, 590, 596–597, 600, 603–604, 607, 611–612, 615–616, 619, 625, 630–631, 637, 639, 642–644, 650, 655–656, 659, 665, 667, 671–685, 690–692, 696, 698, 701–703, 707, 709, 714–717, 722–723, 728–729, 731, 734, 737–739, 741, 744, 747–750, 752–758, 765–768, 770–776, 785–786, 789, 792, 795–797, 799, 807, 826–828, 830–833, 835–836, 838–839, 841, 844–845, 847–848, 850, 852, 854–855, 857, 859–864, 866, 868, 870–871, 873, 876–878, 881–883, 886–888, 896, 898–899, 902–903, 906–907, 910–911, 913–914, 918, 922–923, 926, 931–932, 936–937, 939–947, 949, 959–960, 962, 964–965, 967, 970, 975, 980, 986–987, 990, 993, 996, 998–1000, 1002, 1007–1008, 1010, 1019–1020, 1023, 1026, 1029–1030, 1032, 1041–1042, 1044–1046, 1048, 1057–1059, 1064, 1067–1068, 1070, 1075
   tests.py81810%3–4, 6, 8–10, 26, 229, 243, 265, 267–270, 272–274, 276–280, 283–284, 286–287, 290–292, 295–296, 299–302, 305, 308–312, 315, 318, 321, 324–329, 332, 335, 338, 343–344, 346–347, 350–351, 353–355, 358, 360–365, 367–374, 377–379, 381
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py97970%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–51, 66, 68, 71, 73–76, 78–82, 84–85, 87, 89–90, 92, 94–95, 97, 99–101, 103–104, 106, 108–111, 113, 115–118, 120, 129–131, 134, 137–138, 141–142, 145–146, 148–150, 153, 157, 159, 161, 163, 166–179, 185, 187–188, 190–191, 196–197
   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.py6179884%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, 540, 571, 579, 583, 630–631, 637, 655–656, 659, 665, 672, 674, 678, 685, 744, 750, 754, 768, 772, 845, 863–864, 866, 871, 877, 882, 887, 923, 926, 932, 937, 939–947, 962, 967, 1044, 1048, 1075
   tests.py81198%381
TOTAL273299863% 

Tests Skipped Failures Errors Time
258 0 💤 0 ❌ 0 🔥 2.684s ⏱️

@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.py972376%90, 95, 97, 100–101, 103–104, 106, 111, 115–118, 141–142, 159, 161, 163, 173–174, 178–179, 187
   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.py61733745%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, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 553, 560–561, 564–567, 570–573, 575–579, 582–583, 586, 590, 596–597, 600, 603–604, 607, 611–612, 615–616, 619, 625, 630–631, 637, 639, 642–644, 650, 655–656, 659, 665, 667, 671–685, 690–692, 696, 698, 701–703, 707, 709, 714–717, 722–723, 728–729, 731, 734, 737–739, 741, 744, 747–750, 752–758, 765–768, 770–776, 785–786, 789, 792, 795–797, 799, 807, 826–828, 830–833, 835–836, 838–839, 841, 844–845, 847–848, 850, 852, 854–855, 857, 859–864, 866, 868, 870–871, 873, 876–878, 881–883, 886–888, 896, 898–899, 902–903, 906–907, 910–911, 913–914, 918, 922–923, 926, 931–932, 936–937, 939–947, 949, 959–960, 962, 964–965, 967, 970, 975, 980, 986–987, 990, 993, 996, 998–1000, 1002, 1007–1008, 1010, 1019–1020, 1023, 1026, 1029–1030, 1032, 1041–1042, 1044–1046, 1048, 1057–1059, 1064, 1067–1068, 1070, 1075
   tests.py81810%3–4, 6, 8–10, 26, 229, 243, 265, 267–270, 272–274, 276–280, 283–284, 286–287, 290–292, 295–296, 299–302, 305, 308–312, 315, 318, 321, 324–329, 332, 335, 338, 343–344, 346–347, 350–351, 353–355, 358, 360–365, 367–374, 377–379, 381
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py97970%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–51, 66, 68, 71, 73–76, 78–82, 84–85, 87, 89–90, 92, 94–95, 97, 99–101, 103–104, 106, 108–111, 113, 115–118, 120, 129–131, 134, 137–138, 141–142, 145–146, 148–150, 153, 157, 159, 161, 163, 166–179, 185, 187–188, 190–191, 196–197
   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.py6179884%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, 540, 571, 579, 583, 630–631, 637, 655–656, 659, 665, 672, 674, 678, 685, 744, 750, 754, 768, 772, 845, 863–864, 866, 871, 877, 882, 887, 923, 926, 932, 937, 939–947, 962, 967, 1044, 1048, 1075
   tests.py81198%381
TOTAL273299863% 

Tests Skipped Failures Errors Time
258 0 💤 0 ❌ 0 🔥 3.983s ⏱️

@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.py972376%90, 95, 97, 100–101, 103–104, 106, 111, 115–118, 141–142, 159, 161, 163, 173–174, 178–179, 187
   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.py61733745%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, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 553, 560–561, 564–567, 570–573, 575–579, 582–583, 586, 590, 596–597, 600, 603–604, 607, 611–612, 615–616, 619, 625, 630–631, 637, 639, 642–644, 650, 655–656, 659, 665, 667, 671–685, 690–692, 696, 698, 701–703, 707, 709, 714–717, 722–723, 728–729, 731, 734, 737–739, 741, 744, 747–750, 752–758, 765–768, 770–776, 785–786, 789, 792, 795–797, 799, 807, 826–828, 830–833, 835–836, 838–839, 841, 844–845, 847–848, 850, 852, 854–855, 857, 859–864, 866, 868, 870–871, 873, 876–878, 881–883, 886–888, 896, 898–899, 902–903, 906–907, 910–911, 913–914, 918, 922–923, 926, 931–932, 936–937, 939–947, 949, 959–960, 962, 964–965, 967, 970, 975, 980, 986–987, 990, 993, 996, 998–1000, 1002, 1007–1008, 1010, 1019–1020, 1023, 1026, 1029–1030, 1032, 1041–1042, 1044–1046, 1048, 1057–1059, 1064, 1067–1068, 1070, 1075
   tests.py81810%3–4, 6, 8–10, 26, 229, 243, 265, 267–270, 272–274, 276–280, 283–284, 286–287, 290–292, 295–296, 299–302, 305, 308–312, 315, 318, 321, 324–329, 332, 335, 338, 343–344, 346–347, 350–351, 353–355, 358, 360–365, 367–374, 377–379, 381
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py97970%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–51, 66, 68, 71, 73–76, 78–82, 84–85, 87, 89–90, 92, 94–95, 97, 99–101, 103–104, 106, 108–111, 113, 115–118, 120, 129–131, 134, 137–138, 141–142, 145–146, 148–150, 153, 157, 159, 161, 163, 166–179, 185, 187–188, 190–191, 196–197
   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.py6179884%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, 540, 571, 579, 583, 630–631, 637, 655–656, 659, 665, 672, 674, 678, 685, 744, 750, 754, 768, 772, 845, 863–864, 866, 871, 877, 882, 887, 923, 926, 932, 937, 939–947, 962, 967, 1044, 1048, 1075
   tests.py81198%381
TOTAL273299863% 

Tests Skipped Failures Errors Time
258 0 💤 0 ❌ 0 🔥 2.596s ⏱️

@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.py972376%90, 95, 97, 100–101, 103–104, 106, 111, 115–118, 141–142, 159, 161, 163, 173–174, 178–179, 187
   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.py61733745%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, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 553, 560–561, 564–567, 570–573, 575–579, 582–583, 586, 590, 596–597, 600, 603–604, 607, 611–612, 615–616, 619, 625, 630–631, 637, 639, 642–644, 650, 655–656, 659, 665, 667, 671–685, 690–692, 696, 698, 701–703, 707, 709, 714–717, 722–723, 728–729, 731, 734, 737–739, 741, 744, 747–750, 752–758, 765–768, 770–776, 785–786, 789, 792, 795–797, 799, 807, 826–828, 830–833, 835–836, 838–839, 841, 844–845, 847–848, 850, 852, 854–855, 857, 859–864, 866, 868, 870–871, 873, 876–878, 881–883, 886–888, 896, 898–899, 902–903, 906–907, 910–911, 913–914, 918, 922–923, 926, 931–932, 936–937, 939–947, 949, 959–960, 962, 964–965, 967, 970, 975, 980, 986–987, 990, 993, 996, 998–1000, 1002, 1007–1008, 1010, 1019–1020, 1023, 1026, 1029–1030, 1032, 1041–1042, 1044–1046, 1048, 1057–1059, 1064, 1067–1068, 1070, 1075
   tests.py81810%3–4, 6, 8–10, 26, 229, 243, 265, 267–270, 272–274, 276–280, 283–284, 286–287, 290–292, 295–296, 299–302, 305, 308–312, 315, 318, 321, 324–329, 332, 335, 338, 343–344, 346–347, 350–351, 353–355, 358, 360–365, 367–374, 377–379, 381
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py97970%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–51, 66, 68, 71, 73–76, 78–82, 84–85, 87, 89–90, 92, 94–95, 97, 99–101, 103–104, 106, 108–111, 113, 115–118, 120, 129–131, 134, 137–138, 141–142, 145–146, 148–150, 153, 157, 159, 161, 163, 166–179, 185, 187–188, 190–191, 196–197
   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.py6179884%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, 540, 571, 579, 583, 630–631, 637, 655–656, 659, 665, 672, 674, 678, 685, 744, 750, 754, 768, 772, 845, 863–864, 866, 871, 877, 882, 887, 923, 926, 932, 937, 939–947, 962, 967, 1044, 1048, 1075
   tests.py81198%381
TOTAL273299863% 

Tests Skipped Failures Errors Time
258 0 💤 0 ❌ 0 🔥 2.710s ⏱️

@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.py972376%90, 95, 97, 100–101, 103–104, 106, 111, 115–118, 141–142, 159, 161, 163, 173–174, 178–179, 187
   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.py61733745%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, 478, 485, 501, 510–512, 514–516, 519–520, 522, 525–528, 530, 532–534, 536, 540, 553, 560–561, 564–567, 570–573, 575–579, 582–583, 586, 590, 596–597, 600, 603–604, 607, 611–612, 615–616, 619, 625, 630–631, 637, 639, 642–644, 650, 655–656, 659, 665, 667, 671–685, 690–692, 696, 698, 701–703, 707, 709, 714–717, 722–723, 728–729, 731, 734, 737–739, 741, 744, 747–750, 752–758, 765–768, 770–776, 785–786, 789, 792, 795–797, 799, 807, 826–828, 830–833, 835–836, 838–839, 841, 844–845, 847–848, 850, 852, 854–855, 857, 859–864, 866, 868, 870–871, 873, 876–878, 881–883, 886–888, 896, 898–899, 902–903, 906–907, 910–911, 913–914, 918, 922–923, 926, 931–932, 936–937, 939–947, 949, 959–960, 962, 964–965, 967, 970, 975, 980, 986–987, 990, 993, 996, 998–1000, 1002, 1007–1008, 1010, 1019–1020, 1023, 1026, 1029–1030, 1032, 1041–1042, 1044–1046, 1048, 1057–1059, 1064, 1067–1068, 1070, 1075
   tests.py81810%3–4, 6, 8–10, 26, 229, 243, 265, 267–270, 272–274, 276–280, 283–284, 286–287, 290–292, 295–296, 299–302, 305, 308–312, 315, 318, 321, 324–329, 332, 335, 338, 343–344, 346–347, 350–351, 353–355, 358, 360–365, 367–374, 377–379, 381
edtf
   __init__.py40100% 
   appsettings.py28292%12–13
   convert.py631182%11–19, 21, 73
   fields.py97970%1, 3–7, 9–12, 14, 22, 28, 30, 32–34, 37–38, 50–51, 66, 68, 71, 73–76, 78–82, 84–85, 87, 89–90, 92, 94–95, 97, 99–101, 103–104, 106, 108–111, 113, 115–118, 120, 129–131, 134, 137–138, 141–142, 145–146, 148–150, 153, 157, 159, 161, 163, 166–179, 185, 187–188, 190–191, 196–197
   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.py6179884%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, 540, 571, 579, 583, 630–631, 637, 655–656, 659, 665, 672, 674, 678, 685, 744, 750, 754, 768, 772, 845, 863–864, 866, 871, 877, 882, 887, 923, 926, 932, 937, 939–947, 962, 967, 1044, 1048, 1075
   tests.py81198%381
TOTAL273299863% 

Tests Skipped Failures Errors Time
258 0 💤 0 ❌ 0 🔥 2.579s ⏱️

@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: d779dea Previous: 8c571b0 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 111005.63683471343 iter/sec (stddev: 0.0000017682682176122463) 86935.54190741367 iter/sec (stddev: 8.801351312055946e-7) 0.78
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 11527.049523833446 iter/sec (stddev: 0.00000696274694724977) 8871.250916535719 iter/sec (stddev: 0.000006170533054955764) 0.77
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 14254.600310800304 iter/sec (stddev: 0.000004171374347488453) 11292.512453597992 iter/sec (stddev: 0.000006285789742846082) 0.79
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 9492.852176537901 iter/sec (stddev: 0.0000049421127908965) 7549.978591732842 iter/sec (stddev: 0.000005876983775780713) 0.80
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 16757.389733104177 iter/sec (stddev: 0.000005789960308121746) 12936.725208274147 iter/sec (stddev: 0.000012666981444328682) 0.77
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 11366.497349357842 iter/sec (stddev: 0.00001685585653437466) 9424.857320878093 iter/sec (stddev: 0.0000058642857514609236) 0.83
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 7565.309539663209 iter/sec (stddev: 0.000006333742116734396) 6077.713959723717 iter/sec (stddev: 0.000006937932015900124) 0.80
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 10281.974119491722 iter/sec (stddev: 0.000005685894741382306) 8213.645609693585 iter/sec (stddev: 0.0000064998136694677345) 0.80
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 68293.37375977173 iter/sec (stddev: 0.0000015277564740450068) 51452.332000218776 iter/sec (stddev: 0.0000014305935571446778) 0.75
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 56457.11584605515 iter/sec (stddev: 0.0000013775247465895603) 45922.4966193415 iter/sec (stddev: 0.0000015788419936961112) 0.81
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 32791.422863402906 iter/sec (stddev: 0.000002322618862403658) 24937.94683976795 iter/sec (stddev: 0.0000030011544247201534) 0.76
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 143.76257483714818 iter/sec (stddev: 0.0005744237587077905) 165.36847658209376 iter/sec (stddev: 0.00038541761067305324) 1.15
edtf/parser/tests.py::test_benchmark_parser[2008-12] 150.3612533892027 iter/sec (stddev: 0.002118574842319749) 169.41717431307598 iter/sec (stddev: 0.002010022722081676) 1.13
edtf/parser/tests.py::test_benchmark_parser[2008] 183.96503515596967 iter/sec (stddev: 0.002042248208139641) 210.6033384312808 iter/sec (stddev: 0.0012366861130870522) 1.14
edtf/parser/tests.py::test_benchmark_parser[-0999] 184.52193671007785 iter/sec (stddev: 0.0015797212485958547) 202.47874479380712 iter/sec (stddev: 0.0018942275022620898) 1.10
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 124.0054830892155 iter/sec (stddev: 0.002651854613621762) 147.00507524179153 iter/sec (stddev: 0.0018282458353072648) 1.19
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 101.09448387669151 iter/sec (stddev: 0.0017434150030809575) 125.91576445493938 iter/sec (stddev: 0.0017271233420462812) 1.25
edtf/parser/tests.py::test_benchmark_parser[/2006] 230.8840765355795 iter/sec (stddev: 0.0011766118290818851) 337.34774453386945 iter/sec (stddev: 0.00013720999161622756) 1.46
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 195.02695994500073 iter/sec (stddev: 0.0004080168133067918) 226.95544995852498 iter/sec (stddev: 0.0011509342010363613) 1.16
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 19.217922899334646 iter/sec (stddev: 0.0038690581918563597) 32.429203557428934 iter/sec (stddev: 0.003395677909733358) 1.69
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 407.6574222826331 iter/sec (stddev: 0.00009371461743442357) 457.37605744003304 iter/sec (stddev: 0.00007655377782067135) 1.12
edtf/parser/tests.py::test_benchmark_parser[2001-29] 108.34927744937332 iter/sec (stddev: 0.0018375314022531799) 122.30268409990637 iter/sec (stddev: 0.002483795001362941) 1.13

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: d779dea Previous: 8c571b0 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 68565.70186519259 iter/sec (stddev: 8.684546637475877e-7) 86935.54190741367 iter/sec (stddev: 8.801351312055946e-7) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8251.641887390035 iter/sec (stddev: 0.000006147149319770127) 8871.250916535719 iter/sec (stddev: 0.000006170533054955764) 1.08
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 9893.095505289712 iter/sec (stddev: 0.000007540126092277109) 11292.512453597992 iter/sec (stddev: 0.000006285789742846082) 1.14
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 6683.548631438719 iter/sec (stddev: 0.00001910523673765663) 7549.978591732842 iter/sec (stddev: 0.000005876983775780713) 1.13
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 11749.935405959652 iter/sec (stddev: 0.000004897789718904393) 12936.725208274147 iter/sec (stddev: 0.000012666981444328682) 1.10
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8531.993371124214 iter/sec (stddev: 0.0000066463839587187185) 9424.857320878093 iter/sec (stddev: 0.0000058642857514609236) 1.10
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5691.669833937218 iter/sec (stddev: 0.000006984496120375181) 6077.713959723717 iter/sec (stddev: 0.000006937932015900124) 1.07
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7252.879987386495 iter/sec (stddev: 0.00001657618125870849) 8213.645609693585 iter/sec (stddev: 0.0000064998136694677345) 1.13
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 50653.86389440689 iter/sec (stddev: 0.0000011152606591618344) 51452.332000218776 iter/sec (stddev: 0.0000014305935571446778) 1.02
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 44763.72795136897 iter/sec (stddev: 0.0000013043977803572041) 45922.4966193415 iter/sec (stddev: 0.0000015788419936961112) 1.03
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 22703.702107256147 iter/sec (stddev: 0.0000028659089261372303) 24937.94683976795 iter/sec (stddev: 0.0000030011544247201534) 1.10
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 125.31480009177066 iter/sec (stddev: 0.000583768564734624) 165.36847658209376 iter/sec (stddev: 0.00038541761067305324) 1.32
edtf/parser/tests.py::test_benchmark_parser[2008-12] 132.14243996328395 iter/sec (stddev: 0.0016059737083343073) 169.41717431307598 iter/sec (stddev: 0.002010022722081676) 1.28
edtf/parser/tests.py::test_benchmark_parser[2008] 159.2495633459142 iter/sec (stddev: 0.002014305525718852) 210.6033384312808 iter/sec (stddev: 0.0012366861130870522) 1.32
edtf/parser/tests.py::test_benchmark_parser[-0999] 163.34214355772326 iter/sec (stddev: 0.0016528368454771514) 202.47874479380712 iter/sec (stddev: 0.0018942275022620898) 1.24
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 111.04722654651461 iter/sec (stddev: 0.0019616365981145393) 147.00507524179153 iter/sec (stddev: 0.0018282458353072648) 1.32
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 89.57090155140065 iter/sec (stddev: 0.0019311473948054158) 125.91576445493938 iter/sec (stddev: 0.0017271233420462812) 1.41
edtf/parser/tests.py::test_benchmark_parser[/2006] 204.11067176192637 iter/sec (stddev: 0.0010662401236431378) 337.34774453386945 iter/sec (stddev: 0.00013720999161622756) 1.65
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 171.93176127283851 iter/sec (stddev: 0.00023012912768933047) 226.95544995852498 iter/sec (stddev: 0.0011509342010363613) 1.32
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 17.83109549784465 iter/sec (stddev: 0.004266520247171723) 32.429203557428934 iter/sec (stddev: 0.003395677909733358) 1.82
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 341.27847183684713 iter/sec (stddev: 0.00010151926671948867) 457.37605744003304 iter/sec (stddev: 0.00007655377782067135) 1.34
edtf/parser/tests.py::test_benchmark_parser[2001-29] 94.6344677750013 iter/sec (stddev: 0.0020684961804681577) 122.30268409990637 iter/sec (stddev: 0.002483795001362941) 1.29

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: d779dea Previous: 8c571b0 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 80010.82057818951 iter/sec (stddev: 0.000001852545251907599) 86935.54190741367 iter/sec (stddev: 8.801351312055946e-7) 1.09
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8084.8068481477785 iter/sec (stddev: 0.000030349699900587895) 8871.250916535719 iter/sec (stddev: 0.000006170533054955764) 1.10
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 10709.034003263638 iter/sec (stddev: 0.000006845186086995401) 11292.512453597992 iter/sec (stddev: 0.000006285789742846082) 1.05
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7088.951914508556 iter/sec (stddev: 0.0000055900965671259004) 7549.978591732842 iter/sec (stddev: 0.000005876983775780713) 1.07
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 11985.163264525669 iter/sec (stddev: 0.000019120783515650353) 12936.725208274147 iter/sec (stddev: 0.000012666981444328682) 1.08
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8747.241558395557 iter/sec (stddev: 0.000014586828969524309) 9424.857320878093 iter/sec (stddev: 0.0000058642857514609236) 1.08
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5581.634439332814 iter/sec (stddev: 0.000017471578781529484) 6077.713959723717 iter/sec (stddev: 0.000006937932015900124) 1.09
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7580.051738664867 iter/sec (stddev: 0.000009542788131120004) 8213.645609693585 iter/sec (stddev: 0.0000064998136694677345) 1.08
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 51137.34550580195 iter/sec (stddev: 0.0000019749523810492436) 51452.332000218776 iter/sec (stddev: 0.0000014305935571446778) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 43507.15940502727 iter/sec (stddev: 0.0000033239747561749536) 45922.4966193415 iter/sec (stddev: 0.0000015788419936961112) 1.06
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 24651.13509176513 iter/sec (stddev: 0.0000031575008238663923) 24937.94683976795 iter/sec (stddev: 0.0000030011544247201534) 1.01
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 162.12207607046724 iter/sec (stddev: 0.000412908550996007) 165.36847658209376 iter/sec (stddev: 0.00038541761067305324) 1.02
edtf/parser/tests.py::test_benchmark_parser[2008-12] 168.93918927928488 iter/sec (stddev: 0.0016491563422614311) 169.41717431307598 iter/sec (stddev: 0.002010022722081676) 1.00
edtf/parser/tests.py::test_benchmark_parser[2008] 203.0759593372801 iter/sec (stddev: 0.0015908104154013566) 210.6033384312808 iter/sec (stddev: 0.0012366861130870522) 1.04
edtf/parser/tests.py::test_benchmark_parser[-0999] 200.59535247021878 iter/sec (stddev: 0.0015551915941360215) 202.47874479380712 iter/sec (stddev: 0.0018942275022620898) 1.01
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 144.03995766930578 iter/sec (stddev: 0.0016567787722809866) 147.00507524179153 iter/sec (stddev: 0.0018282458353072648) 1.02
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 124.80842345376387 iter/sec (stddev: 0.00017042468152964519) 125.91576445493938 iter/sec (stddev: 0.0017271233420462812) 1.01
edtf/parser/tests.py::test_benchmark_parser[/2006] 325.04132629597086 iter/sec (stddev: 0.0008847208643065698) 337.34774453386945 iter/sec (stddev: 0.00013720999161622756) 1.04
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 223.23079218713698 iter/sec (stddev: 0.0011438808260475265) 226.95544995852498 iter/sec (stddev: 0.0011509342010363613) 1.02
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 32.773017088519445 iter/sec (stddev: 0.000672994046300672) 32.429203557428934 iter/sec (stddev: 0.003395677909733358) 0.99
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 442.81560288292786 iter/sec (stddev: 0.00006599285547089867) 457.37605744003304 iter/sec (stddev: 0.00007655377782067135) 1.03
edtf/parser/tests.py::test_benchmark_parser[2001-29] 119.93274768246496 iter/sec (stddev: 0.0023126477564336585) 122.30268409990637 iter/sec (stddev: 0.002483795001362941) 1.02

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: d779dea Previous: 8c571b0 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 86556.75449393514 iter/sec (stddev: 0.0000019784953189788867) 86935.54190741367 iter/sec (stddev: 8.801351312055946e-7) 1.00
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8670.096986621742 iter/sec (stddev: 0.00001761219031452322) 8871.250916535719 iter/sec (stddev: 0.000006170533054955764) 1.02
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 11266.624552402978 iter/sec (stddev: 0.00000831898441910508) 11292.512453597992 iter/sec (stddev: 0.000006285789742846082) 1.00
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7503.175442389738 iter/sec (stddev: 0.000007677405071129311) 7549.978591732842 iter/sec (stddev: 0.000005876983775780713) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 12996.145773778564 iter/sec (stddev: 0.000005253516920446241) 12936.725208274147 iter/sec (stddev: 0.000012666981444328682) 1.00
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 9353.06503408347 iter/sec (stddev: 0.000005846476547500055) 9424.857320878093 iter/sec (stddev: 0.0000058642857514609236) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 6012.844173366893 iter/sec (stddev: 0.000007470707801391458) 6077.713959723717 iter/sec (stddev: 0.000006937932015900124) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 8099.935487454162 iter/sec (stddev: 0.0000063936461357170806) 8213.645609693585 iter/sec (stddev: 0.0000064998136694677345) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 52982.61293827539 iter/sec (stddev: 0.0000014073694334867505) 51452.332000218776 iter/sec (stddev: 0.0000014305935571446778) 0.97
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 46289.4941363723 iter/sec (stddev: 0.0000016567722790671474) 45922.4966193415 iter/sec (stddev: 0.0000015788419936961112) 0.99
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 25238.40642759065 iter/sec (stddev: 0.000003589463738838075) 24937.94683976795 iter/sec (stddev: 0.0000030011544247201534) 0.99
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 159.65659847042832 iter/sec (stddev: 0.0004835673468739362) 165.36847658209376 iter/sec (stddev: 0.00038541761067305324) 1.04
edtf/parser/tests.py::test_benchmark_parser[2008-12] 157.98601433201807 iter/sec (stddev: 0.0028104129697043897) 169.41717431307598 iter/sec (stddev: 0.002010022722081676) 1.07
edtf/parser/tests.py::test_benchmark_parser[2008] 200.45762238933855 iter/sec (stddev: 0.0016761999023262454) 210.6033384312808 iter/sec (stddev: 0.0012366861130870522) 1.05
edtf/parser/tests.py::test_benchmark_parser[-0999] 191.6049279901953 iter/sec (stddev: 0.0023977207499726707) 202.47874479380712 iter/sec (stddev: 0.0018942275022620898) 1.06
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 137.084600300301 iter/sec (stddev: 0.0029256446325601716) 147.00507524179153 iter/sec (stddev: 0.0018282458353072648) 1.07
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 118.8121062374945 iter/sec (stddev: 0.00225926067242271) 125.91576445493938 iter/sec (stddev: 0.0017271233420462812) 1.06
edtf/parser/tests.py::test_benchmark_parser[/2006] 326.30357424829464 iter/sec (stddev: 0.00014782593818195) 337.34774453386945 iter/sec (stddev: 0.00013720999161622756) 1.03
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 214.80153087774667 iter/sec (stddev: 0.0016951267623196156) 226.95544995852498 iter/sec (stddev: 0.0011509342010363613) 1.06
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 31.14927207568051 iter/sec (stddev: 0.004585274256172595) 32.429203557428934 iter/sec (stddev: 0.003395677909733358) 1.04
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 448.97394846317405 iter/sec (stddev: 0.00011295371945595824) 457.37605744003304 iter/sec (stddev: 0.00007655377782067135) 1.02
edtf/parser/tests.py::test_benchmark_parser[2001-29] 114.15481178211515 iter/sec (stddev: 0.00266252918856045) 122.30268409990637 iter/sec (stddev: 0.002483795001362941) 1.07

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: d779dea Previous: 8c571b0 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 81414.82700989813 iter/sec (stddev: 8.103109607304797e-7) 86935.54190741367 iter/sec (stddev: 8.801351312055946e-7) 1.07
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8554.458432034517 iter/sec (stddev: 0.000005499672218626371) 8871.250916535719 iter/sec (stddev: 0.000006170533054955764) 1.04
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 10338.807117492768 iter/sec (stddev: 0.000022415883723524668) 11292.512453597992 iter/sec (stddev: 0.000006285789742846082) 1.09
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7032.795202965987 iter/sec (stddev: 0.000006230951100412437) 7549.978591732842 iter/sec (stddev: 0.000005876983775780713) 1.07
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 12289.396641312786 iter/sec (stddev: 0.000020491057286703536) 12936.725208274147 iter/sec (stddev: 0.000012666981444328682) 1.05
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8500.439216176936 iter/sec (stddev: 0.00003119773177772948) 9424.857320878093 iter/sec (stddev: 0.0000058642857514609236) 1.11
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5570.911177617347 iter/sec (stddev: 0.00000731883646189396) 6077.713959723717 iter/sec (stddev: 0.000006937932015900124) 1.09
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7329.709567617568 iter/sec (stddev: 0.000027945273256771032) 8213.645609693585 iter/sec (stddev: 0.0000064998136694677345) 1.12
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 48818.552947007745 iter/sec (stddev: 0.0000012119443427279483) 51452.332000218776 iter/sec (stddev: 0.0000014305935571446778) 1.05
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 42646.61017902271 iter/sec (stddev: 0.00000117240851596917) 45922.4966193415 iter/sec (stddev: 0.0000015788419936961112) 1.08
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 23873.597133254403 iter/sec (stddev: 0.000007205466375283395) 24937.94683976795 iter/sec (stddev: 0.0000030011544247201534) 1.04
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 158.08928055986613 iter/sec (stddev: 0.0005150374919036013) 165.36847658209376 iter/sec (stddev: 0.00038541761067305324) 1.05
edtf/parser/tests.py::test_benchmark_parser[2008-12] 163.2689719866068 iter/sec (stddev: 0.0018574084470516557) 169.41717431307598 iter/sec (stddev: 0.002010022722081676) 1.04
edtf/parser/tests.py::test_benchmark_parser[2008] 196.12854990835632 iter/sec (stddev: 0.0017572996359509884) 210.6033384312808 iter/sec (stddev: 0.0012366861130870522) 1.07
edtf/parser/tests.py::test_benchmark_parser[-0999] 194.55409494439965 iter/sec (stddev: 0.0013875683883445757) 202.47874479380712 iter/sec (stddev: 0.0018942275022620898) 1.04
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 141.30566467408556 iter/sec (stddev: 0.0015323208921021218) 147.00507524179153 iter/sec (stddev: 0.0018282458353072648) 1.04
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 120.80407345423382 iter/sec (stddev: 0.0016256619369747578) 125.91576445493938 iter/sec (stddev: 0.0017271233420462812) 1.04
edtf/parser/tests.py::test_benchmark_parser[/2006] 313.34489802390414 iter/sec (stddev: 0.0009622773006893344) 337.34774453386945 iter/sec (stddev: 0.00013720999161622756) 1.08
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 217.49964361885702 iter/sec (stddev: 0.0009633707465953877) 226.95544995852498 iter/sec (stddev: 0.0011509342010363613) 1.04
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 31.33642617929424 iter/sec (stddev: 0.0016357799189671111) 32.429203557428934 iter/sec (stddev: 0.003395677909733358) 1.03
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 430.8339383813955 iter/sec (stddev: 0.00006404420882109838) 457.37605744003304 iter/sec (stddev: 0.00007655377782067135) 1.06
edtf/parser/tests.py::test_benchmark_parser[2001-29] 117.84013327049315 iter/sec (stddev: 0.0018799161584027641) 122.30268409990637 iter/sec (stddev: 0.002483795001362941) 1.04

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

Please sign in to comment.