Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ColeDCrawford committed May 28, 2024
1 parent b53df4a commit c14a57b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 141 deletions.
171 changes: 31 additions & 140 deletions edtf/parser/parser_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,17 +550,14 @@ def __init__(
ua=None,
**kwargs,
):
for param in ("date", "lower", "upper"):
if param in kwargs:
self.__init__(**kwargs[param])
return
self.year = year # Year is required, but sometimes passed in as a 'date' dict.
self.month = month
self.day = day
self.significant_digits = (
int(significant_digits) if significant_digits else None
super().__init__(
year=year,
month=month,
day=day,
significant_digits=significant_digits,
**kwargs,
)
self.ua = ua if ua else None
self.ua = ua
self.negative = self.year.startswith("-")

def __str__(self):
Expand All @@ -576,16 +573,8 @@ def _get_fuzzy_padding(self, lean):
padding = relativedelta()

if self.year:
year_no_symbol = self.year.lstrip("-")
years_padding = self._calculate_years_padding(multiplier, year_no_symbol)
# Reverse the padding for negative years and earliest calculations
# if self.negative:
# years_padding = -years_padding if lean == EARLIEST else years_padding
# else:
# years_padding = years_padding if lean == EARLIEST else -years_padding

years_padding = self._years_padding(multiplier)
padding += years_padding

if self.month:
padding += relativedelta(
months=int(multiplier * appsettings.PADDING_MONTH_PRECISION.months)
Expand All @@ -594,151 +583,53 @@ def _get_fuzzy_padding(self, lean):
padding += relativedelta(
days=int(multiplier * appsettings.PADDING_DAY_PRECISION.days)
)

return padding

def _calculate_years_padding(self, multiplier, year_no_symbol):
if self.precision == PRECISION_MILLENIUM:
return relativedelta(
years=int(multiplier * appsettings.PADDING_MILLENNIUM_PRECISION.years)
)
elif self.precision == PRECISION_CENTURY:
return relativedelta(
years=int(multiplier * appsettings.PADDING_CENTURY_PRECISION.years)
)
elif self.precision == PRECISION_DECADE:
return relativedelta(
years=int(multiplier * appsettings.PADDING_DECADE_PRECISION.years)
)
else:
return relativedelta(
years=int(multiplier * appsettings.PADDING_YEAR_PRECISION.years)
)
def _years_padding(self, multiplier):
"""Calculate year padding based on the precision."""
precision_settings = {
PRECISION_MILLENIUM: appsettings.PADDING_MILLENNIUM_PRECISION.years,
PRECISION_CENTURY: appsettings.PADDING_CENTURY_PRECISION.years,
PRECISION_DECADE: appsettings.PADDING_DECADE_PRECISION.years,
PRECISION_YEAR: appsettings.PADDING_YEAR_PRECISION.years,
}
years = precision_settings.get(self.precision, 0)
return relativedelta(years=int(multiplier * years))

def lower_fuzzy(self):
time_empty_time_tuple = tuple(TIME_EMPTY_TIME)
time_empty_extras_tuple = tuple(TIME_EMPTY_EXTRAS)
strict_val = (
self.lower_strict()
) # negative handled in the lower_strict() override

if self.negative:
adjusted = apply_delta(sub, strict_val, self._get_fuzzy_padding(LATEST))
if (
self.precision == PRECISION_YEAR
or self.precision == PRECISION_DECADE
or self.precision == PRECISION_CENTURY
or self.precision == PRECISION_MILLENIUM
):
adjusted = struct_time(
(adjusted.tm_year, 1, 1)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)
elif self.precision == PRECISION_MONTH:
adjusted = struct_time(
(adjusted.tm_year, adjusted.tm_mon, 1)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)
else:
adjusted = apply_delta(sub, strict_val, self._get_fuzzy_padding(EARLIEST))
if (
self.precision == PRECISION_YEAR
or self.precision == PRECISION_DECADE
or self.precision == PRECISION_CENTURY
or self.precision == PRECISION_MILLENIUM
):
adjusted = struct_time(
(adjusted.tm_year, 1, 1)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)
elif self.precision == PRECISION_MONTH:
days_in_month = calendar.monthrange(adjusted.tm_year, adjusted.tm_mon)[
1
]
adjusted = struct_time(
(adjusted.tm_year, adjusted.tm_mon, days_in_month)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)

adjusted = apply_delta(sub, strict_val, self._get_fuzzy_padding(EARLIEST))
return adjusted

def upper_fuzzy(self):
time_empty_time_tuple = tuple(TIME_EMPTY_TIME)
time_empty_extras_tuple = tuple(TIME_EMPTY_EXTRAS)
strict_val = (
self.upper_strict()
) # negative handled in the upper_strict() override

if self.negative:
adjusted = apply_delta(add, strict_val, self._get_fuzzy_padding(LATEST))
if (
self.precision == PRECISION_YEAR
or self.precision == PRECISION_DECADE
or self.precision == PRECISION_CENTURY
or self.precision == PRECISION_MILLENIUM
):
adjusted = struct_time(
(adjusted.tm_year, 12, 31)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)
elif self.precision == PRECISION_MONTH:
days_in_month = calendar.monthrange(adjusted.tm_year, adjusted.tm_mon)[
1
]
adjusted = struct_time(
(adjusted.tm_year, adjusted.tm_mon, days_in_month)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)
else:
adjusted = apply_delta(add, strict_val, self._get_fuzzy_padding(LATEST))
if (
self.precision == PRECISION_YEAR
or self.precision == PRECISION_DECADE
or self.precision == PRECISION_CENTURY
or self.precision == PRECISION_MILLENIUM
):
adjusted = struct_time(
(adjusted.tm_year, 12, 31)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)
elif self.precision == PRECISION_MONTH:
adjusted = struct_time(
(adjusted.tm_year, adjusted.tm_mon, 1)
+ time_empty_time_tuple
+ time_empty_extras_tuple
)

adjusted = apply_delta(add, strict_val, self._get_fuzzy_padding(LATEST))
return adjusted

def lower_strict(self):
if self.negative:
strict_val = self._strict_date(
lean=LATEST
) # gets the year right, but need to adjust day and month
if (
self.precision == PRECISION_YEAR
or self.precision == PRECISION_DECADE
or self.precision == PRECISION_CENTURY
or self.precision == PRECISION_MILLENIUM
if self.precision in (
PRECISION_YEAR,
PRECISION_DECADE,
PRECISION_CENTURY,
PRECISION_MILLENIUM,
):
return struct_time(
(strict_val.tm_year, 1, 1)
+ tuple(TIME_EMPTY_TIME)
+ tuple(TIME_EMPTY_EXTRAS)
)
elif self.precision == PRECISION_MONTH:
days_in_month = calendar.monthrange(
strict_val.tm_year, strict_val.tm_mon
)[1]
return struct_time(
(strict_val.tm_year, strict_val.tm_mon, days_in_month)
(strict_val.tm_year, strict_val.tm_mon, 1)
+ tuple(TIME_EMPTY_TIME)
+ tuple(TIME_EMPTY_EXTRAS)
)
Expand All @@ -750,11 +641,11 @@ def lower_strict(self):
def upper_strict(self):
if self.negative:
strict_val = self._strict_date(lean=EARLIEST)
if (
self.precision == PRECISION_YEAR
or self.precision == PRECISION_DECADE
or self.precision == PRECISION_CENTURY
or self.precision == PRECISION_MILLENIUM
if self.precision in (
PRECISION_YEAR,
PRECISION_DECADE,
PRECISION_CENTURY,
PRECISION_MILLENIUM,
):
return struct_time(
(strict_val.tm_year, 12, 31)
Expand Down
2 changes: 1 addition & 1 deletion edtf/parser/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
("1XXX", ("1000-01-01", "1999-12-31")),
("1XXX~", ("1000-01-01", "1999-12-31", "0000-01-01", "2999-12-31")),
("156X~", ("1560-01-01", "1569-12-31", "1550-01-01", "1579-12-31")),
("-01XX~", ("-0199-01-01", "-0100-12-31", "-0299-01-01", "-0000-12-31")),
("-01XX~", ("-0199-01-01", "-0100-12-31", "-0299-01-01", "0000-12-31")),
# L1 Extended Interval
# beginning unknown, end 2006
# for intervals with an unknown beginning or end, the unknown bound is calculated with the constant DELTA_IF_UNKNOWN (10 years)
Expand Down

5 comments on commit c14a57b

@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.py27485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   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.py30100% 
   grammar.py123992%147–150, 348, 352–355
   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.py76760%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, 352–357, 359–366, 369–371, 373
edtf
   __init__.py40100% 
   appsettings.py27292%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   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.py30100% 
   grammar.py123199%354
   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.py76198%373
TOTAL267697063% 

Tests Skipped Failures Errors Time
256 0 💤 0 ❌ 0 🔥 2.747s ⏱️

@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.py27485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   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.py30100% 
   grammar.py123992%147–150, 348, 352–355
   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.py76760%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, 352–357, 359–366, 369–371, 373
edtf
   __init__.py40100% 
   appsettings.py27292%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   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.py30100% 
   grammar.py123199%354
   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.py76198%373
TOTAL267697063% 

Tests Skipped Failures Errors Time
256 0 💤 0 ❌ 0 🔥 2.693s ⏱️

@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.py27485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   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.py30100% 
   grammar.py123992%147–150, 348, 352–355
   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.py76760%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, 352–357, 359–366, 369–371, 373
edtf
   __init__.py40100% 
   appsettings.py27292%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   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.py30100% 
   grammar.py123199%354
   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.py76198%373
TOTAL267697063% 

Tests Skipped Failures Errors Time
256 0 💤 0 ❌ 0 🔥 2.503s ⏱️

@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.py27485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   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.py30100% 
   grammar.py123992%147–150, 348, 352–355
   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.py76760%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, 352–357, 359–366, 369–371, 373
edtf
   __init__.py40100% 
   appsettings.py27292%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   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.py30100% 
   grammar.py123199%354
   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.py76198%373
TOTAL267697063% 

Tests Skipped Failures Errors Time
256 0 💤 0 ❌ 0 🔥 2.738s ⏱️

@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.py27485%10–13
   convert.py634430%11–19, 21, 38–39, 52, 61, 72–73, 75, 104, 107–109, 113, 117, 136–156
   fields.py922177%88, 93, 95, 98–99, 101–102, 104, 109, 113–116, 155, 157, 159, 169–170, 174–175, 183
   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.py30100% 
   grammar.py123992%147–150, 348, 352–355
   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.py76760%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, 352–357, 359–366, 369–371, 373
edtf
   __init__.py40100% 
   appsettings.py27292%12–13
   convert.py631182%11–19, 21, 73
   fields.py92920%1, 3–6, 8–10, 12, 20, 26, 28, 30–32, 35–36, 48–49, 64, 66, 69, 71–74, 76–80, 82–83, 85, 87–88, 90, 92–93, 95, 97–99, 101–102, 104, 106–109, 111, 113–116, 118, 127–129, 132, 135, 141–142, 144–146, 149, 153, 155, 157, 159, 162–175, 181, 183–184, 186–187, 192–193
   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.py30100% 
   grammar.py123199%354
   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.py76198%373
TOTAL267697063% 

Tests Skipped Failures Errors Time
256 0 💤 0 ❌ 0 🔥 4.049s ⏱️

Please sign in to comment.