Skip to content

Commit

Permalink
Merge pull request #70 from rettinghaus/typehints
Browse files Browse the repository at this point in the history
style: adding type hints
  • Loading branch information
aweakley authored Aug 1, 2024
2 parents 78cb30a + 2e69104 commit bffacc8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
13 changes: 6 additions & 7 deletions edtf/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ def dt_to_struct_time(dt):
return struct_time(
[dt.year, dt.month, dt.day] + TIME_EMPTY_TIME + TIME_EMPTY_EXTRAS
)
else:
raise NotImplementedError(f"Cannot convert {type(dt)} to `struct_time`")
raise NotImplementedError(f"Cannot convert {type(dt)} to `struct_time`")


def struct_time_to_date(st):
def struct_time_to_date(st: struct_time) -> date:
"""
Return a `datetime.date` representing the provided `struct_time.
Expand All @@ -52,7 +51,7 @@ def struct_time_to_date(st):
return date(*st[:3])


def struct_time_to_datetime(st):
def struct_time_to_datetime(st: struct_time) -> datetime:
"""
Return a `datetime.datetime` representing the provided `struct_time.
Expand All @@ -61,7 +60,7 @@ def struct_time_to_datetime(st):
return datetime(*st[:6])


def trim_struct_time(st, strip_time=False):
def trim_struct_time(st: struct_time, strip_time: bool = False) -> struct_time:
"""
Return a `struct_time` based on the one provided but with the extra fields
`tm_wday`, `tm_yday`, and `tm_isdst` reset to default values.
Expand All @@ -75,7 +74,7 @@ def trim_struct_time(st, strip_time=False):
return struct_time(list(st[:6]) + TIME_EMPTY_EXTRAS)


def struct_time_to_jd(st):
def struct_time_to_jd(st: struct_time) -> float:
"""
Return a float number representing the Julian Date for the given
`struct_time`.
Expand All @@ -91,7 +90,7 @@ def struct_time_to_jd(st):
return jdutil.date_to_jd(year, month, day)


def jd_to_struct_time(jd):
def jd_to_struct_time(jd: float) -> struct_time:
"""
Return a `struct_time` converted from a Julian Date float number.
Expand Down
16 changes: 8 additions & 8 deletions edtf/jdutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# time deltas if one date is from before 10-15-1582.


def mjd_to_jd(mjd):
def mjd_to_jd(mjd: float) -> float:
"""
Convert Modified Julian Day to Julian Day.
Expand All @@ -37,7 +37,7 @@ def mjd_to_jd(mjd):
return mjd + 2400000.5


def jd_to_mjd(jd):
def jd_to_mjd(jd: float) -> float:
"""
Convert Julian Day to Modified Julian Day
Expand All @@ -55,7 +55,7 @@ def jd_to_mjd(jd):
return jd - 2400000.5


def date_to_jd(year, month, day):
def date_to_jd(year: int, month: int, day: float) -> float:
"""
Convert a date to Julian Day.
Expand Down Expand Up @@ -117,7 +117,7 @@ def date_to_jd(year, month, day):
return jd


def jd_to_date(jd):
def jd_to_date(jd: float) -> tuple:
"""
Convert Julian Day to date.
Expand Down Expand Up @@ -175,7 +175,7 @@ def jd_to_date(jd):
return year, month, day


def hmsm_to_days(hour=0, min=0, sec=0, micro=0):
def hmsm_to_days(hour: int = 0, min: int = 0, sec: int = 0, micro: int = 0) -> float:
"""
Convert hours, minutes, seconds, and microseconds to fractional days.
Expand Down Expand Up @@ -262,7 +262,7 @@ def days_to_hmsm(days):
return int(hour), int(min), int(sec), int(micro)


def datetime_to_jd(date):
def datetime_to_jd(date: dt.datetime) -> float:
"""
Convert a `datetime.datetime` object to Julian Day.
Expand Down Expand Up @@ -291,7 +291,7 @@ def datetime_to_jd(date):
return date_to_jd(date.year, date.month, days)


def jd_to_datetime(jd):
def jd_to_datetime(jd: float) -> dt.datetime:
"""
Convert a Julian Day to an `jdutil.datetime` object.
Expand Down Expand Up @@ -321,7 +321,7 @@ def jd_to_datetime(jd):
return datetime(year, month, day, hour, min, sec, micro)


def timedelta_to_days(td):
def timedelta_to_days(td: dt.timedelta) -> float:
"""
Convert a `datetime.timedelta` object to a total number of days.
Expand Down

10 comments on commit bffacc8

@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, 51, 60, 71–72, 74, 103, 106–108, 112, 116, 135–155
   fields.py1192281%70, 84, 89, 91, 94–95, 97–98, 100, 105, 109–112, 135–136, 157, 167–168, 172–173, 181
   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.py1477151%33, 43–44, 46–49, 54–55, 58–61, 63, 67–70, 72–73, 75–77, 85–87, 89–93, 103, 105, 118, 125, 156–158, 160–165, 168–170, 172–177, 201–204, 208, 223, 225–226, 228, 245, 247, 255, 257, 259, 261, 266, 269, 275
   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, 72
   fields.py1191190%1, 3–8, 10–13, 15, 23, 29, 31, 33–35, 38–39, 51–58, 60, 63, 65–70, 72–76, 78–79, 81, 83–84, 86, 88–89, 91, 93–95, 97–98, 100, 102–105, 107, 109–112, 114, 123–125, 128, 131–132, 135–136, 139–140, 142–144, 147, 151, 153, 155, 157, 160–173, 179, 181–182, 184–185, 190–191, 193–194, 196, 204, 206, 208–209, 212–213, 223–226, 234
   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.py1471192%55, 58, 118, 164–165, 176–177, 203–204, 208, 275
   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
TOTAL2822104063% 

Tests Skipped Failures Errors Time
279 0 💤 0 ❌ 0 🔥 4.252s ⏱️

@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, 51, 60, 71–72, 74, 103, 106–108, 112, 116, 135–155
   fields.py1192281%70, 84, 89, 91, 94–95, 97–98, 100, 105, 109–112, 135–136, 157, 167–168, 172–173, 181
   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.py1477151%33, 43–44, 46–49, 54–55, 58–61, 63, 67–70, 72–73, 75–77, 85–87, 89–93, 103, 105, 118, 125, 156–158, 160–165, 168–170, 172–177, 201–204, 208, 223, 225–226, 228, 245, 247, 255, 257, 259, 261, 266, 269, 275
   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, 72
   fields.py1191190%1, 3–8, 10–13, 15, 23, 29, 31, 33–35, 38–39, 51–58, 60, 63, 65–70, 72–76, 78–79, 81, 83–84, 86, 88–89, 91, 93–95, 97–98, 100, 102–105, 107, 109–112, 114, 123–125, 128, 131–132, 135–136, 139–140, 142–144, 147, 151, 153, 155, 157, 160–173, 179, 181–182, 184–185, 190–191, 193–194, 196, 204, 206, 208–209, 212–213, 223–226, 234
   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.py1471192%55, 58, 118, 164–165, 176–177, 203–204, 208, 275
   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
TOTAL2822104063% 

Tests Skipped Failures Errors Time
279 0 💤 0 ❌ 0 🔥 4.418s ⏱️

@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, 51, 60, 71–72, 74, 103, 106–108, 112, 116, 135–155
   fields.py1192281%70, 84, 89, 91, 94–95, 97–98, 100, 105, 109–112, 135–136, 157, 167–168, 172–173, 181
   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.py1477151%33, 43–44, 46–49, 54–55, 58–61, 63, 67–70, 72–73, 75–77, 85–87, 89–93, 103, 105, 118, 125, 156–158, 160–165, 168–170, 172–177, 201–204, 208, 223, 225–226, 228, 245, 247, 255, 257, 259, 261, 266, 269, 275
   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, 72
   fields.py1191190%1, 3–8, 10–13, 15, 23, 29, 31, 33–35, 38–39, 51–58, 60, 63, 65–70, 72–76, 78–79, 81, 83–84, 86, 88–89, 91, 93–95, 97–98, 100, 102–105, 107, 109–112, 114, 123–125, 128, 131–132, 135–136, 139–140, 142–144, 147, 151, 153, 155, 157, 160–173, 179, 181–182, 184–185, 190–191, 193–194, 196, 204, 206, 208–209, 212–213, 223–226, 234
   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.py1471192%55, 58, 118, 164–165, 176–177, 203–204, 208, 275
   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
TOTAL2822104063% 

Tests Skipped Failures Errors Time
279 0 💤 0 ❌ 0 🔥 4.349s ⏱️

@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, 51, 60, 71–72, 74, 103, 106–108, 112, 116, 135–155
   fields.py1192281%70, 84, 89, 91, 94–95, 97–98, 100, 105, 109–112, 135–136, 157, 167–168, 172–173, 181
   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.py1477151%33, 43–44, 46–49, 54–55, 58–61, 63, 67–70, 72–73, 75–77, 85–87, 89–93, 103, 105, 118, 125, 156–158, 160–165, 168–170, 172–177, 201–204, 208, 223, 225–226, 228, 245, 247, 255, 257, 259, 261, 266, 269, 275
   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, 72
   fields.py1191190%1, 3–8, 10–13, 15, 23, 29, 31, 33–35, 38–39, 51–58, 60, 63, 65–70, 72–76, 78–79, 81, 83–84, 86, 88–89, 91, 93–95, 97–98, 100, 102–105, 107, 109–112, 114, 123–125, 128, 131–132, 135–136, 139–140, 142–144, 147, 151, 153, 155, 157, 160–173, 179, 181–182, 184–185, 190–191, 193–194, 196, 204, 206, 208–209, 212–213, 223–226, 234
   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.py1471192%55, 58, 118, 164–165, 176–177, 203–204, 208, 275
   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
TOTAL2822104063% 

Tests Skipped Failures Errors Time
279 0 💤 0 ❌ 0 🔥 4.511s ⏱️

@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.4/x64/lib/python3.12/site-packages/edtf
   __init__.py40100% 
   appsettings.py28485%10–13
   convert.py634430%11–19, 21, 38–39, 51, 60, 71–72, 74, 103, 106–108, 112, 116, 135–155
   fields.py1192281%70, 84, 89, 91, 94–95, 97–98, 100, 105, 109–112, 135–136, 157, 167–168, 172–173, 181
   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.4/x64/lib/python3.12/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1477151%33, 43–44, 46–49, 54–55, 58–61, 63, 67–70, 72–73, 75–77, 85–87, 89–93, 103, 105, 118, 125, 156–158, 160–165, 168–170, 172–177, 201–204, 208, 223, 225–226, 228, 245, 247, 255, 257, 259, 261, 266, 269, 275
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.12.4/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, 72
   fields.py1191190%1, 3–8, 10–13, 15, 23, 29, 31, 33–35, 38–39, 51–58, 60, 63, 65–70, 72–76, 78–79, 81, 83–84, 86, 88–89, 91, 93–95, 97–98, 100, 102–105, 107, 109–112, 114, 123–125, 128, 131–132, 135–136, 139–140, 142–144, 147, 151, 153, 155, 157, 160–173, 179, 181–182, 184–185, 190–191, 193–194, 196, 204, 206, 208–209, 212–213, 223–226, 234
   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.py1471192%55, 58, 118, 164–165, 176–177, 203–204, 208, 275
   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
TOTAL2822104063% 

Tests Skipped Failures Errors Time
279 0 💤 0 ❌ 0 🔥 6.300s ⏱️

@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: bffacc8 Previous: 78cb30a Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 111682.12175917045 iter/sec (stddev: 9.057116326640303e-7) 109846.80354955567 iter/sec (stddev: 8.206540524736801e-7) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 11503.71251384228 iter/sec (stddev: 0.000006014012344930149) 11215.373919042284 iter/sec (stddev: 0.00000515901327106859) 0.97
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 14440.61766920773 iter/sec (stddev: 0.0000036679102628414987) 14025.931564901528 iter/sec (stddev: 0.0000035098341772761557) 0.97
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 9408.267438706618 iter/sec (stddev: 0.000005134016078287714) 9258.809527687992 iter/sec (stddev: 0.00000550033673698122) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 16827.62084574598 iter/sec (stddev: 0.000003989068832806832) 16409.935478730255 iter/sec (stddev: 0.000005628122445509735) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 11959.484105742426 iter/sec (stddev: 0.000004262131095059676) 11667.844568224153 iter/sec (stddev: 0.000005141478019971343) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 7439.79426562041 iter/sec (stddev: 0.000013402718234123356) 7513.51959019579 iter/sec (stddev: 0.000005477870077954219) 1.01
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 9901.202674249811 iter/sec (stddev: 0.000019154737090772868) 10096.194388013751 iter/sec (stddev: 0.0000042769076281035445) 1.02
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 67606.91517119727 iter/sec (stddev: 8.70239671377604e-7) 67261.99364228178 iter/sec (stddev: 9.808144629100102e-7) 0.99
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 57389.85897954866 iter/sec (stddev: 0.0000013017944270776032) 55896.132989444115 iter/sec (stddev: 0.0000013245592813887068) 0.97
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 33466.06682953639 iter/sec (stddev: 0.0000022432950047939535) 32710.93612108117 iter/sec (stddev: 0.0000023990034158526687) 0.98
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 146.92321271656738 iter/sec (stddev: 0.0005229524729006402) 149.40025559325642 iter/sec (stddev: 0.0005134188852132528) 1.02
edtf/parser/tests.py::test_benchmark_parser[2008-12] 148.37340939952455 iter/sec (stddev: 0.0025118014257478356) 156.98267450410603 iter/sec (stddev: 0.0015430958397436322) 1.06
edtf/parser/tests.py::test_benchmark_parser[2008] 183.80446255352612 iter/sec (stddev: 0.0019153134106475573) 194.88693936642966 iter/sec (stddev: 0.0008768366467715359) 1.06
edtf/parser/tests.py::test_benchmark_parser[-0999] 187.4188288284464 iter/sec (stddev: 0.0013785458629807091) 185.02847826741558 iter/sec (stddev: 0.0016656240738249215) 0.99
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 126.06302590981518 iter/sec (stddev: 0.002329066738687838) 131.67868640565433 iter/sec (stddev: 0.0014395318573974978) 1.04
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 102.23337253596785 iter/sec (stddev: 0.0018111358402774134) 105.4766137343775 iter/sec (stddev: 0.0014888060550896276) 1.03
edtf/parser/tests.py::test_benchmark_parser[/2006] 240.8760291973511 iter/sec (stddev: 0.0014592708584089582) 252.08171898283803 iter/sec (stddev: 0.00014020223681479192) 1.05
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 196.9291270143997 iter/sec (stddev: 0.0013167308166292942) 203.02059865210285 iter/sec (stddev: 0.0008169494541385903) 1.03
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 20.63067603316325 iter/sec (stddev: 0.0009296167155225307) 21.176201027653853 iter/sec (stddev: 0.00036117838632402673) 1.03
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 410.9276098778221 iter/sec (stddev: 0.00009452288917580554) 416.100867175752 iter/sec (stddev: 0.00008869274477271469) 1.01
edtf/parser/tests.py::test_benchmark_parser[2001-29] 104.14568769082464 iter/sec (stddev: 0.003575397579018875) 111.31338842373786 iter/sec (stddev: 0.0017484773370695734) 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: bffacc8 Previous: 78cb30a Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 78840.56465770319 iter/sec (stddev: 0.0000011893995433698338) 109846.80354955567 iter/sec (stddev: 8.206540524736801e-7) 1.39
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8302.539757511884 iter/sec (stddev: 0.000005802127846259553) 11215.373919042284 iter/sec (stddev: 0.00000515901327106859) 1.35
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 10489.11041018224 iter/sec (stddev: 0.000005645536787604434) 14025.931564901528 iter/sec (stddev: 0.0000035098341772761557) 1.34
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 6772.40394235097 iter/sec (stddev: 0.000006546088359304309) 9258.809527687992 iter/sec (stddev: 0.00000550033673698122) 1.37
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 12179.227322704117 iter/sec (stddev: 0.000012622357471950182) 16409.935478730255 iter/sec (stddev: 0.000005628122445509735) 1.35
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8740.926338610532 iter/sec (stddev: 0.000006375256262652341) 11667.844568224153 iter/sec (stddev: 0.000005141478019971343) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5473.305190716322 iter/sec (stddev: 0.000007591297039487506) 7513.51959019579 iter/sec (stddev: 0.000005477870077954219) 1.37
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7326.342085164084 iter/sec (stddev: 0.00001954495225895456) 10096.194388013751 iter/sec (stddev: 0.0000042769076281035445) 1.38
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 47431.81518144318 iter/sec (stddev: 0.000004876932048924389) 67261.99364228178 iter/sec (stddev: 9.808144629100102e-7) 1.42
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 42796.02139450873 iter/sec (stddev: 0.0000018407261242924967) 55896.132989444115 iter/sec (stddev: 0.0000013245592813887068) 1.31
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 24160.199918573016 iter/sec (stddev: 0.000003057604395422911) 32710.93612108117 iter/sec (stddev: 0.0000023990034158526687) 1.35
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 155.35414244856685 iter/sec (stddev: 0.0005020646801405607) 149.40025559325642 iter/sec (stddev: 0.0005134188852132528) 0.96
edtf/parser/tests.py::test_benchmark_parser[2008-12] 158.73761009457658 iter/sec (stddev: 0.0018518160248383834) 156.98267450410603 iter/sec (stddev: 0.0015430958397436322) 0.99
edtf/parser/tests.py::test_benchmark_parser[2008] 192.4421290276124 iter/sec (stddev: 0.0015796058766263808) 194.88693936642966 iter/sec (stddev: 0.0008768366467715359) 1.01
edtf/parser/tests.py::test_benchmark_parser[-0999] 193.63763581510509 iter/sec (stddev: 0.0011827191052304015) 185.02847826741558 iter/sec (stddev: 0.0016656240738249215) 0.96
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 134.8094358549305 iter/sec (stddev: 0.002139677818401607) 131.67868640565433 iter/sec (stddev: 0.0014395318573974978) 0.98
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 117.6830429836338 iter/sec (stddev: 0.00019208107350786874) 105.4766137343775 iter/sec (stddev: 0.0014888060550896276) 0.90
edtf/parser/tests.py::test_benchmark_parser[/2006] 304.79136636985595 iter/sec (stddev: 0.0008883034701034234) 252.08171898283803 iter/sec (stddev: 0.00014020223681479192) 0.83
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 208.0527756691521 iter/sec (stddev: 0.001228206561898428) 203.02059865210285 iter/sec (stddev: 0.0008169494541385903) 0.98
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 30.552706091368886 iter/sec (stddev: 0.0010912457683209908) 21.176201027653853 iter/sec (stddev: 0.00036117838632402673) 0.69
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 425.5294254394339 iter/sec (stddev: 0.00007039373910961948) 416.100867175752 iter/sec (stddev: 0.00008869274477271469) 0.98
edtf/parser/tests.py::test_benchmark_parser[2001-29] 113.5269398262953 iter/sec (stddev: 0.0021264848603377872) 111.31338842373786 iter/sec (stddev: 0.0017484773370695734) 0.98

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: bffacc8 Previous: 78cb30a Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 82531.62011612776 iter/sec (stddev: 0.0000012691375380472814) 109846.80354955567 iter/sec (stddev: 8.206540524736801e-7) 1.33
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8634.955571943234 iter/sec (stddev: 0.000005032753025789656) 11215.373919042284 iter/sec (stddev: 0.00000515901327106859) 1.30
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 10725.583698498025 iter/sec (stddev: 0.000004861338289182545) 14025.931564901528 iter/sec (stddev: 0.0000035098341772761557) 1.31
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7107.147962093512 iter/sec (stddev: 0.000006650302822561611) 9258.809527687992 iter/sec (stddev: 0.00000550033673698122) 1.30
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 12665.682059586534 iter/sec (stddev: 0.000003954757021734294) 16409.935478730255 iter/sec (stddev: 0.000005628122445509735) 1.30
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8865.262599000846 iter/sec (stddev: 0.000005691220969400397) 11667.844568224153 iter/sec (stddev: 0.000005141478019971343) 1.32
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5601.100051931323 iter/sec (stddev: 0.00002475076626135668) 7513.51959019579 iter/sec (stddev: 0.000005477870077954219) 1.34
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7688.3568838473775 iter/sec (stddev: 0.000007824804229454728) 10096.194388013751 iter/sec (stddev: 0.0000042769076281035445) 1.31
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 48711.21706378168 iter/sec (stddev: 0.000001813717233679238) 67261.99364228178 iter/sec (stddev: 9.808144629100102e-7) 1.38
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 43288.012937865504 iter/sec (stddev: 0.000001769594831039237) 55896.132989444115 iter/sec (stddev: 0.0000013245592813887068) 1.29
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 24504.13198196793 iter/sec (stddev: 0.0000034131567350874397) 32710.93612108117 iter/sec (stddev: 0.0000023990034158526687) 1.33
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 161.79809982043832 iter/sec (stddev: 0.00035760705456080636) 149.40025559325642 iter/sec (stddev: 0.0005134188852132528) 0.92
edtf/parser/tests.py::test_benchmark_parser[2008-12] 166.86649020959848 iter/sec (stddev: 0.0016760251142956158) 156.98267450410603 iter/sec (stddev: 0.0015430958397436322) 0.94
edtf/parser/tests.py::test_benchmark_parser[2008] 205.54185019631427 iter/sec (stddev: 0.001028594108848552) 194.88693936642966 iter/sec (stddev: 0.0008768366467715359) 0.95
edtf/parser/tests.py::test_benchmark_parser[-0999] 194.30753240830592 iter/sec (stddev: 0.0015306390914628144) 185.02847826741558 iter/sec (stddev: 0.0016656240738249215) 0.95
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 142.78309146638296 iter/sec (stddev: 0.0015508633661402704) 131.67868640565433 iter/sec (stddev: 0.0014395318573974978) 0.92
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 121.83839728009 iter/sec (stddev: 0.0013526844126395788) 105.4766137343775 iter/sec (stddev: 0.0014888060550896276) 0.87
edtf/parser/tests.py::test_benchmark_parser[/2006] 324.3803831948748 iter/sec (stddev: 0.00012186295378258646) 252.08171898283803 iter/sec (stddev: 0.00014020223681479192) 0.78
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 220.98770353076105 iter/sec (stddev: 0.0009176647534320817) 203.02059865210285 iter/sec (stddev: 0.0008169494541385903) 0.92
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 31.946125690892355 iter/sec (stddev: 0.002689615913180801) 21.176201027653853 iter/sec (stddev: 0.00036117838632402673) 0.66
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 437.2374781031822 iter/sec (stddev: 0.00015461995739208035) 416.100867175752 iter/sec (stddev: 0.00008869274477271469) 0.95
edtf/parser/tests.py::test_benchmark_parser[2001-29] 119.42501524680236 iter/sec (stddev: 0.0019912538817182888) 111.31338842373786 iter/sec (stddev: 0.0017484773370695734) 0.93

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: bffacc8 Previous: 78cb30a Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 86750.14918326601 iter/sec (stddev: 9.563389974146846e-7) 109846.80354955567 iter/sec (stddev: 8.206540524736801e-7) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 9025.055548053788 iter/sec (stddev: 0.000005626746850429086) 11215.373919042284 iter/sec (stddev: 0.00000515901327106859) 1.24
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 11027.948509578286 iter/sec (stddev: 0.00001706196734606554) 14025.931564901528 iter/sec (stddev: 0.0000035098341772761557) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 7448.865661364777 iter/sec (stddev: 0.000014938910555338335) 9258.809527687992 iter/sec (stddev: 0.00000550033673698122) 1.24
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 13458.483846339264 iter/sec (stddev: 0.000005637635231113822) 16409.935478730255 iter/sec (stddev: 0.000005628122445509735) 1.22
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 9692.004307724048 iter/sec (stddev: 0.00000562394897560208) 11667.844568224153 iter/sec (stddev: 0.000005141478019971343) 1.20
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 6166.433305715009 iter/sec (stddev: 0.000008091549157999174) 7513.51959019579 iter/sec (stddev: 0.000005477870077954219) 1.22
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 8326.08198272075 iter/sec (stddev: 0.00000528636660682356) 10096.194388013751 iter/sec (stddev: 0.0000042769076281035445) 1.21
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 51033.44948895388 iter/sec (stddev: 0.0000013761053572480901) 67261.99364228178 iter/sec (stddev: 9.808144629100102e-7) 1.32
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 45709.68862581963 iter/sec (stddev: 0.0000012915258287503985) 55896.132989444115 iter/sec (stddev: 0.0000013245592813887068) 1.22
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 25390.98057560127 iter/sec (stddev: 0.000002779281360275327) 32710.93612108117 iter/sec (stddev: 0.0000023990034158526687) 1.29
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 166.94009864923956 iter/sec (stddev: 0.0004596673351387679) 149.40025559325642 iter/sec (stddev: 0.0005134188852132528) 0.89
edtf/parser/tests.py::test_benchmark_parser[2008-12] 174.7032649163781 iter/sec (stddev: 0.001371000766280931) 156.98267450410603 iter/sec (stddev: 0.0015430958397436322) 0.90
edtf/parser/tests.py::test_benchmark_parser[2008] 202.46232093323002 iter/sec (stddev: 0.0013216228252469267) 194.88693936642966 iter/sec (stddev: 0.0008768366467715359) 0.96
edtf/parser/tests.py::test_benchmark_parser[-0999] 207.9082559551709 iter/sec (stddev: 0.0013550277575133756) 185.02847826741558 iter/sec (stddev: 0.0016656240738249215) 0.89
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 149.26622483079004 iter/sec (stddev: 0.0011434944874821242) 131.67868640565433 iter/sec (stddev: 0.0014395318573974978) 0.88
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 126.35596007139421 iter/sec (stddev: 0.0010733913517873858) 105.4766137343775 iter/sec (stddev: 0.0014888060550896276) 0.83
edtf/parser/tests.py::test_benchmark_parser[/2006] 339.89074373034805 iter/sec (stddev: 0.00013218322658757535) 252.08171898283803 iter/sec (stddev: 0.00014020223681479192) 0.74
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 231.1027901494844 iter/sec (stddev: 0.0007991326750368405) 203.02059865210285 iter/sec (stddev: 0.0008169494541385903) 0.88
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 32.84743256675574 iter/sec (stddev: 0.0027815922892354327) 21.176201027653853 iter/sec (stddev: 0.00036117838632402673) 0.64
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 463.9706023438702 iter/sec (stddev: 0.00007545522569491506) 416.100867175752 iter/sec (stddev: 0.00008869274477271469) 0.90
edtf/parser/tests.py::test_benchmark_parser[2001-29] 124.93889459292242 iter/sec (stddev: 0.001856301026377564) 111.31338842373786 iter/sec (stddev: 0.0017484773370695734) 0.89

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: bffacc8 Previous: 78cb30a Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 70262.87363612333 iter/sec (stddev: 8.870055640590313e-7) 109846.80354955567 iter/sec (stddev: 8.206540524736801e-7) 1.56
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 8073.668978474475 iter/sec (stddev: 0.00000612384858197941) 11215.373919042284 iter/sec (stddev: 0.00000515901327106859) 1.39
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 9810.161193770602 iter/sec (stddev: 0.0000047846537763820815) 14025.931564901528 iter/sec (stddev: 0.0000035098341772761557) 1.43
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 6608.5789541587765 iter/sec (stddev: 0.000008271831177974457) 9258.809527687992 iter/sec (stddev: 0.00000550033673698122) 1.40
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 11469.416779467547 iter/sec (stddev: 0.000005104994621496266) 16409.935478730255 iter/sec (stddev: 0.000005628122445509735) 1.43
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 8271.715649219499 iter/sec (stddev: 0.000005832446921747634) 11667.844568224153 iter/sec (stddev: 0.000005141478019971343) 1.41
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 5613.323177047898 iter/sec (stddev: 0.000006662037218521167) 7513.51959019579 iter/sec (stddev: 0.000005477870077954219) 1.34
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 7123.215036398045 iter/sec (stddev: 0.000005889260725837276) 10096.194388013751 iter/sec (stddev: 0.0000042769076281035445) 1.42
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 50068.941288755064 iter/sec (stddev: 0.0000014976427252761469) 67261.99364228178 iter/sec (stddev: 9.808144629100102e-7) 1.34
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 44078.13526875865 iter/sec (stddev: 0.000001548931109012848) 55896.132989444115 iter/sec (stddev: 0.0000013245592813887068) 1.27
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 22004.73023018931 iter/sec (stddev: 0.0000036309313175957367) 32710.93612108117 iter/sec (stddev: 0.0000023990034158526687) 1.49
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 125.95514032108845 iter/sec (stddev: 0.0006195525894421807) 149.40025559325642 iter/sec (stddev: 0.0005134188852132528) 1.19
edtf/parser/tests.py::test_benchmark_parser[2008-12] 133.84239139681418 iter/sec (stddev: 0.0016660664961770351) 156.98267450410603 iter/sec (stddev: 0.0015430958397436322) 1.17
edtf/parser/tests.py::test_benchmark_parser[2008] 165.73216262481276 iter/sec (stddev: 0.001458756311145823) 194.88693936642966 iter/sec (stddev: 0.0008768366467715359) 1.18
edtf/parser/tests.py::test_benchmark_parser[-0999] 164.65154465353345 iter/sec (stddev: 0.0018385453536860089) 185.02847826741558 iter/sec (stddev: 0.0016656240738249215) 1.12
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 112.73675919110451 iter/sec (stddev: 0.00179390906931628) 131.67868640565433 iter/sec (stddev: 0.0014395318573974978) 1.17
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 88.75733884807943 iter/sec (stddev: 0.00168904973037322) 105.4766137343775 iter/sec (stddev: 0.0014888060550896276) 1.19
edtf/parser/tests.py::test_benchmark_parser[/2006] 216.04821189661163 iter/sec (stddev: 0.00013695103758847867) 252.08171898283803 iter/sec (stddev: 0.00014020223681479192) 1.17
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 172.01153764197426 iter/sec (stddev: 0.0011358919648331205) 203.02059865210285 iter/sec (stddev: 0.0008169494541385903) 1.18
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 18.794512583570096 iter/sec (stddev: 0.0006595735707364108) 21.176201027653853 iter/sec (stddev: 0.00036117838632402673) 1.13
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 339.9922646038696 iter/sec (stddev: 0.00008095588392957596) 416.100867175752 iter/sec (stddev: 0.00008869274477271469) 1.22
edtf/parser/tests.py::test_benchmark_parser[2001-29] 94.4381640042826 iter/sec (stddev: 0.0023151624641382187) 111.31338842373786 iter/sec (stddev: 0.0017484773370695734) 1.18

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

Please sign in to comment.