Skip to content

Conversation

@cameron-simpson
Copy link
Collaborator

A decorator for parameter remapping, and applied it to the parse_edtf function.

The decorator should be in some other package if we want it elsewhere.

I exercise it in the __main__ section; did you want a test of the old parameter in the parser tests?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/edtf
   __init__.py40100% 
   appsettings.py29486%10–13
   convert.py634430%11–19, 21, 38–39, 51, 60, 71–73, 102, 105–107, 111, 115, 134–153, 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.py1191190%3–4, 6–9, 12–16, 19–24, 27–28, 31–32, 35–40, 43–47, 55–56, 59–65, 68–74, 77–82, 85–88, 91–94, 97–100, 103–110, 115–118, 120–121, 123, 125–130, 134, 136–140, 145, 147–151, 158–165, 167–170, 173–176, 179–182
   util.py331263%23, 26, 40–41, 44–46, 48–51, 61
/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1586956%60, 70–71, 73, 75–77, 82, 85, 88–89, 92–93, 95–99, 101–102, 104–106, 114–116, 118–122, 128, 130, 145, 151, 174–176, 178–182, 185–187, 189–193, 216–219, 223, 238, 240–241, 243, 260, 262, 270, 272, 274, 276, 281, 284, 290
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.12.11/x64/lib/python3.12/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1331390%149–152, 358, 364–370, 375
   parser_classes.py66137643%70, 72, 79–82, 84–85, 87–88, 114–116, 120, 123, 126, 186, 188, 195, 197, 203–207, 212–218, 225–229, 234–240, 272–274, 282–284, 292–294, 308, 312, 320–323, 326, 334–337, 340, 345, 358–359, 362, 390–394, 397, 402–403, 406, 409, 412, 415–419, 422–426, 444–446, 469, 472–474, 478, 480, 483, 499, 506, 522, 531–533, 535–537, 540–542, 545–546, 548–551, 553–557, 559–560, 564, 577, 584–587, 590, 593–596, 599–602, 604–608, 611–612, 615, 619, 625–626, 629, 632–633, 636, 640–641, 644–645, 648, 654, 659–660, 666, 668, 671–673, 679, 684–685, 688, 694–695, 699–713, 718–720, 724, 726, 729–731, 735, 737, 740, 743–744, 750–754, 759–760, 765–767, 770, 773–776, 779, 782–785, 787–789, 791–794, 801–804, 806–812, 821–822, 825, 828, 831–833, 835, 857–859, 861–864, 866–867, 869–870, 872, 874, 884, 887, 890, 897–898, 900–901, 903, 905–906, 908, 910–911, 913, 915–920, 922, 924–927, 929, 931–932, 934, 937, 942–944, 947–949, 952–954, 962, 964–965, 968–969, 972–973, 976–977, 979–980, 984, 988–989, 992, 997–998, 1002–1003, 1005–1013, 1015, 1025–1026, 1028, 1030–1031, 1033, 1036, 1041, 1046, 1051, 1055–1056, 1059–1060, 1063, 1065–1067, 1069, 1074–1075, 1077, 1085, 1089–1090, 1093–1094, 1097–1099, 1108–1109, 1111, 1113–1114, 1116, 1118–1120, 1132–1134, 1139, 1142–1144, 1149
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 274, 296, 298–301, 303–305, 307–311, 314–315, 317–318, 321–323, 326–327, 330–333, 336, 339–343, 346, 349, 352, 355–360, 363, 366, 369, 374–375, 377–378, 381–382, 384–386, 389, 391–396, 398–405, 408–410, 412, 415–416, 422–426
edtf
   __init__.py40100% 
   appsettings.py29293%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.py119496%137–138, 148–149
   util.py330100% 
edtf/natlang
   __init__.py20100% 
   en.py1581193%85, 88, 145, 181–182, 192–193, 218–219, 223, 290
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py133496%364, 367, 369, 375
   parser_classes.py66110683%114–116, 123, 126, 188, 194–198, 205–207, 214–218, 227–229, 234–240, 273, 345, 358–359, 390–394, 397, 412, 415–419, 422–426, 444–446, 474, 483, 546, 560, 564, 600, 608, 612, 659–660, 666, 684–685, 688, 694, 700, 702, 706, 713, 754, 779, 785, 789, 804, 808, 898, 908, 919–920, 922, 929, 932, 943, 948, 953, 989, 992, 998, 1003, 1005–1013, 1028, 1033, 1111, 1116, 1149
   tests.py89198%412
TOTAL3074114062% 

Tests Skipped Failures Errors Time
293 0 💤 0 ❌ 0 🔥 4.993s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/edtf
   __init__.py40100% 
   appsettings.py29486%10–13
   convert.py634430%11–19, 21, 38–39, 51, 60, 71–73, 102, 105–107, 111, 115, 134–153, 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.py1191190%3–4, 6–9, 12–16, 19–24, 27–28, 31–32, 35–40, 43–47, 55–56, 59–65, 68–74, 77–82, 85–88, 91–94, 97–100, 103–110, 115–118, 120–121, 123, 125–130, 134, 136–140, 145, 147–151, 158–165, 167–170, 173–176, 179–182
   util.py331263%23, 26, 40–41, 44–46, 48–51, 61
/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1586956%60, 70–71, 73, 75–77, 82, 85, 88–89, 92–93, 95–99, 101–102, 104–106, 114–116, 118–122, 128, 130, 145, 151, 174–176, 178–182, 185–187, 189–193, 216–219, 223, 238, 240–241, 243, 260, 262, 270, 272, 274, 276, 281, 284, 290
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.13.5/x64/lib/python3.13/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1331390%149–152, 358, 364–370, 375
   parser_classes.py66137643%70, 72, 79–82, 84–85, 87–88, 114–116, 120, 123, 126, 186, 188, 195, 197, 203–207, 212–218, 225–229, 234–240, 272–274, 282–284, 292–294, 308, 312, 320–323, 326, 334–337, 340, 345, 358–359, 362, 390–394, 397, 402–403, 406, 409, 412, 415–419, 422–426, 444–446, 469, 472–474, 478, 480, 483, 499, 506, 522, 531–533, 535–537, 540–542, 545–546, 548–551, 553–557, 559–560, 564, 577, 584–587, 590, 593–596, 599–602, 604–608, 611–612, 615, 619, 625–626, 629, 632–633, 636, 640–641, 644–645, 648, 654, 659–660, 666, 668, 671–673, 679, 684–685, 688, 694–695, 699–713, 718–720, 724, 726, 729–731, 735, 737, 740, 743–744, 750–754, 759–760, 765–767, 770, 773–776, 779, 782–785, 787–789, 791–794, 801–804, 806–812, 821–822, 825, 828, 831–833, 835, 857–859, 861–864, 866–867, 869–870, 872, 874, 884, 887, 890, 897–898, 900–901, 903, 905–906, 908, 910–911, 913, 915–920, 922, 924–927, 929, 931–932, 934, 937, 942–944, 947–949, 952–954, 962, 964–965, 968–969, 972–973, 976–977, 979–980, 984, 988–989, 992, 997–998, 1002–1003, 1005–1013, 1015, 1025–1026, 1028, 1030–1031, 1033, 1036, 1041, 1046, 1051, 1055–1056, 1059–1060, 1063, 1065–1067, 1069, 1074–1075, 1077, 1085, 1089–1090, 1093–1094, 1097–1099, 1108–1109, 1111, 1113–1114, 1116, 1118–1120, 1132–1134, 1139, 1142–1144, 1149
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 274, 296, 298–301, 303–305, 307–311, 314–315, 317–318, 321–323, 326–327, 330–333, 336, 339–343, 346, 349, 352, 355–360, 363, 366, 369, 374–375, 377–378, 381–382, 384–386, 389, 391–396, 398–405, 408–410, 412, 415–416, 422–426
edtf
   __init__.py40100% 
   appsettings.py29293%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.py119496%137–138, 148–149
   util.py330100% 
edtf/natlang
   __init__.py20100% 
   en.py1581193%85, 88, 145, 181–182, 192–193, 218–219, 223, 290
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py133496%364, 367, 369, 375
   parser_classes.py66110683%114–116, 123, 126, 188, 194–198, 205–207, 214–218, 227–229, 234–240, 273, 345, 358–359, 390–394, 397, 412, 415–419, 422–426, 444–446, 474, 483, 546, 560, 564, 600, 608, 612, 659–660, 666, 684–685, 688, 694, 700, 702, 706, 713, 754, 779, 785, 789, 804, 808, 898, 908, 919–920, 922, 929, 932, 943, 948, 953, 989, 992, 998, 1003, 1005–1013, 1028, 1033, 1111, 1116, 1149
   tests.py89198%412
TOTAL3074114062% 

Tests Skipped Failures Errors Time
293 0 💤 0 ❌ 0 🔥 6.031s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/edtf
   __init__.py40100% 
   appsettings.py29486%10–13
   convert.py634430%11–19, 21, 38–39, 51, 60, 71–73, 102, 105–107, 111, 115, 134–153, 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.py1191190%3–4, 6–9, 12–16, 19–24, 27–28, 31–32, 35–40, 43–47, 55–56, 59–65, 68–74, 77–82, 85–88, 91–94, 97–100, 103–110, 115–118, 120–121, 123, 125–130, 134, 136–140, 145, 147–151, 158–165, 167–170, 173–176, 179–182
   util.py331263%23, 26, 40–41, 44–46, 48–51, 61
/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1586956%60, 70–71, 73, 75–77, 82, 85, 88–89, 92–93, 95–99, 101–102, 104–106, 114–116, 118–122, 128, 130, 145, 151, 174–176, 178–182, 185–187, 189–193, 216–219, 223, 238, 240–241, 243, 260, 262, 270, 272, 274, 276, 281, 284, 290
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.11.13/x64/lib/python3.11/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1331390%149–152, 358, 364–370, 375
   parser_classes.py66137643%70, 72, 79–82, 84–85, 87–88, 114–116, 120, 123, 126, 186, 188, 195, 197, 203–207, 212–218, 225–229, 234–240, 272–274, 282–284, 292–294, 308, 312, 320–323, 326, 334–337, 340, 345, 358–359, 362, 390–394, 397, 402–403, 406, 409, 412, 415–419, 422–426, 444–446, 469, 472–474, 478, 480, 483, 499, 506, 522, 531–533, 535–537, 540–542, 545–546, 548–551, 553–557, 559–560, 564, 577, 584–587, 590, 593–596, 599–602, 604–608, 611–612, 615, 619, 625–626, 629, 632–633, 636, 640–641, 644–645, 648, 654, 659–660, 666, 668, 671–673, 679, 684–685, 688, 694–695, 699–713, 718–720, 724, 726, 729–731, 735, 737, 740, 743–744, 750–754, 759–760, 765–767, 770, 773–776, 779, 782–785, 787–789, 791–794, 801–804, 806–812, 821–822, 825, 828, 831–833, 835, 857–859, 861–864, 866–867, 869–870, 872, 874, 884, 887, 890, 897–898, 900–901, 903, 905–906, 908, 910–911, 913, 915–920, 922, 924–927, 929, 931–932, 934, 937, 942–944, 947–949, 952–954, 962, 964–965, 968–969, 972–973, 976–977, 979–980, 984, 988–989, 992, 997–998, 1002–1003, 1005–1013, 1015, 1025–1026, 1028, 1030–1031, 1033, 1036, 1041, 1046, 1051, 1055–1056, 1059–1060, 1063, 1065–1067, 1069, 1074–1075, 1077, 1085, 1089–1090, 1093–1094, 1097–1099, 1108–1109, 1111, 1113–1114, 1116, 1118–1120, 1132–1134, 1139, 1142–1144, 1149
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 274, 296, 298–301, 303–305, 307–311, 314–315, 317–318, 321–323, 326–327, 330–333, 336, 339–343, 346, 349, 352, 355–360, 363, 366, 369, 374–375, 377–378, 381–382, 384–386, 389, 391–396, 398–405, 408–410, 412, 415–416, 422–426
edtf
   __init__.py40100% 
   appsettings.py29293%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.py119496%137–138, 148–149
   util.py330100% 
edtf/natlang
   __init__.py20100% 
   en.py1581193%85, 88, 145, 181–182, 192–193, 218–219, 223, 290
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py133496%364, 367, 369, 375
   parser_classes.py66110683%114–116, 123, 126, 188, 194–198, 205–207, 214–218, 227–229, 234–240, 273, 345, 358–359, 390–394, 397, 412, 415–419, 422–426, 444–446, 474, 483, 546, 560, 564, 600, 608, 612, 659–660, 666, 684–685, 688, 694, 700, 702, 706, 713, 754, 779, 785, 789, 804, 808, 898, 908, 919–920, 922, 929, 932, 943, 948, 953, 989, 992, 998, 1003, 1005–1013, 1028, 1033, 1111, 1116, 1149
   tests.py89198%412
TOTAL3074114062% 

Tests Skipped Failures Errors Time
293 0 💤 0 ❌ 0 🔥 4.572s ⏱️

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/edtf
   __init__.py40100% 
   appsettings.py29486%10–13
   convert.py634430%11–19, 21, 38–39, 51, 60, 71–73, 102, 105–107, 111, 115, 134–153, 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.py1191190%3–4, 6–9, 12–16, 19–24, 27–28, 31–32, 35–40, 43–47, 55–56, 59–65, 68–74, 77–82, 85–88, 91–94, 97–100, 103–110, 115–118, 120–121, 123, 125–130, 134, 136–140, 145, 147–151, 158–165, 167–170, 173–176, 179–182
   util.py331263%23, 26, 40–41, 44–46, 48–51, 61
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/edtf/natlang
   __init__.py20100% 
   en.py1586956%60, 70–71, 73, 75–77, 82, 85, 88–89, 92–93, 95–99, 101–102, 104–106, 114–116, 118–122, 128, 130, 145, 151, 174–176, 178–182, 185–187, 189–193, 216–219, 223, 238, 240–241, 243, 260, 262, 270, 272, 274, 276, 281, 284, 290
   tests.py10100%3, 5, 10, 179, 184–185, 190–191, 207, 211
/opt/hostedtoolcache/Python/3.10.18/x64/lib/python3.10/site-packages/edtf/parser
   __init__.py40100% 
   edtf_exceptions.py151126%13–19, 22–24, 29
   grammar.py1331390%149–152, 358, 364–370, 375
   parser_classes.py66137643%70, 72, 79–82, 84–85, 87–88, 114–116, 120, 123, 126, 186, 188, 195, 197, 203–207, 212–218, 225–229, 234–240, 272–274, 282–284, 292–294, 308, 312, 320–323, 326, 334–337, 340, 345, 358–359, 362, 390–394, 397, 402–403, 406, 409, 412, 415–419, 422–426, 444–446, 469, 472–474, 478, 480, 483, 499, 506, 522, 531–533, 535–537, 540–542, 545–546, 548–551, 553–557, 559–560, 564, 577, 584–587, 590, 593–596, 599–602, 604–608, 611–612, 615, 619, 625–626, 629, 632–633, 636, 640–641, 644–645, 648, 654, 659–660, 666, 668, 671–673, 679, 684–685, 688, 694–695, 699–713, 718–720, 724, 726, 729–731, 735, 737, 740, 743–744, 750–754, 759–760, 765–767, 770, 773–776, 779, 782–785, 787–789, 791–794, 801–804, 806–812, 821–822, 825, 828, 831–833, 835, 857–859, 861–864, 866–867, 869–870, 872, 874, 884, 887, 890, 897–898, 900–901, 903, 905–906, 908, 910–911, 913, 915–920, 922, 924–927, 929, 931–932, 934, 937, 942–944, 947–949, 952–954, 962, 964–965, 968–969, 972–973, 976–977, 979–980, 984, 988–989, 992, 997–998, 1002–1003, 1005–1013, 1015, 1025–1026, 1028, 1030–1031, 1033, 1036, 1041, 1046, 1051, 1055–1056, 1059–1060, 1063, 1065–1067, 1069, 1074–1075, 1077, 1085, 1089–1090, 1093–1094, 1097–1099, 1108–1109, 1111, 1113–1114, 1116, 1118–1120, 1132–1134, 1139, 1142–1144, 1149
   tests.py89890%3–4, 6, 8–10, 26, 229, 243, 274, 296, 298–301, 303–305, 307–311, 314–315, 317–318, 321–323, 326–327, 330–333, 336, 339–343, 346, 349, 352, 355–360, 363, 366, 369, 374–375, 377–378, 381–382, 384–386, 389, 391–396, 398–405, 408–410, 412, 415–416, 422–426
edtf
   __init__.py40100% 
   appsettings.py29293%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.py119496%137–138, 148–149
   util.py330100% 
edtf/natlang
   __init__.py20100% 
   en.py1581193%85, 88, 145, 181–182, 192–193, 218–219, 223, 290
   tests.py10190%211
edtf/parser
   __init__.py40100% 
   edtf_exceptions.py15286%24, 29
   grammar.py133496%364, 367, 369, 375
   parser_classes.py66110683%114–116, 123, 126, 188, 194–198, 205–207, 214–218, 227–229, 234–240, 273, 345, 358–359, 390–394, 397, 412, 415–419, 422–426, 444–446, 474, 483, 546, 560, 564, 600, 608, 612, 659–660, 666, 684–685, 688, 694, 700, 702, 706, 713, 754, 779, 785, 789, 804, 808, 898, 908, 919–920, 922, 929, 932, 943, 948, 953, 989, 992, 998, 1003, 1005–1013, 1028, 1033, 1111, 1116, 1149
   tests.py89198%412
TOTAL3074114062% 

Tests Skipped Failures Errors Time
293 0 💤 0 ❌ 0 🔥 4.498s ⏱️

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Details
Benchmark suite Current: 83c8ba2 Previous: 36fa346 Ratio
edtf/natlang/tests.py::test_benchmark_natlang[23rd Dynasty-None] 3896667.1054737167 iter/sec (stddev: 1.3840005306592688e-7) 4045828.090756116 iter/sec (stddev: 4.5525769498448756e-8) 1.04
edtf/natlang/tests.py::test_benchmark_natlang[January 2008-2008-01] 4120696.885950153 iter/sec (stddev: 1.4235292503325525e-7) 3627412.410458349 iter/sec (stddev: 1.6005526960808885e-7) 0.88
edtf/natlang/tests.py::test_benchmark_natlang[ca1860-1860~] 3796424.8205653843 iter/sec (stddev: 4.602628455285393e-8) 3623835.2967353514 iter/sec (stddev: 1.5849056815471277e-7) 0.95
edtf/natlang/tests.py::test_benchmark_natlang[uncertain: approx 1862-1862%] 3783906.7266859263 iter/sec (stddev: 4.928374524812365e-8) 3637589.0437032995 iter/sec (stddev: 1.1522462998676079e-7) 0.96
edtf/natlang/tests.py::test_benchmark_natlang[January-XXXX-01] 3850544.2824105197 iter/sec (stddev: 1.0599797210188732e-7) 3626241.3627181253 iter/sec (stddev: 4.012117454455803e-8) 0.94
edtf/natlang/tests.py::test_benchmark_natlang[Winter 1872-1872-24] 3865065.231349897 iter/sec (stddev: 5.163098624691647e-8) 3660710.8166115824 iter/sec (stddev: 1.1970693132718216e-7) 0.95
edtf/natlang/tests.py::test_benchmark_natlang[before approx January 18 1928-/1928-01-18~] 3800222.9262807686 iter/sec (stddev: 1.856995780382027e-7) 3329160.4932871717 iter/sec (stddev: 4.352953943794583e-8) 0.88
edtf/natlang/tests.py::test_benchmark_natlang[birthday in 1872-1872] 3846056.679545249 iter/sec (stddev: 3.6370385350465614e-8) 3695510.081302484 iter/sec (stddev: 1.300653813278426e-7) 0.96
edtf/natlang/tests.py::test_benchmark_natlang[1270 CE-1270] 3825154.7079341575 iter/sec (stddev: 1.4638310017436357e-7) 3758071.4994793693 iter/sec (stddev: 1.7706240056339501e-7) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[2nd century bce--01XX] 3844636.7719582072 iter/sec (stddev: 4.049496108164654e-8) 3769485.3068561037 iter/sec (stddev: 1.856047419092188e-7) 0.98
edtf/natlang/tests.py::test_benchmark_natlang[1858/1860-[1858, 1860]] 3866661.8340933197 iter/sec (stddev: 1.8868176806269788e-7) 3718318.787899858 iter/sec (stddev: 1.3913192900032567e-7) 0.96
edtf/parser/tests.py::test_benchmark_parser[2001-02-03] 175.6200500025684 iter/sec (stddev: 0.0005780411721517352) 172.12621043455135 iter/sec (stddev: 0.0005996820802580561) 0.98
edtf/parser/tests.py::test_benchmark_parser[2008-12] 179.53432695815508 iter/sec (stddev: 0.0016336147425229622) 182.10775640705626 iter/sec (stddev: 0.001409129218154591) 1.01
edtf/parser/tests.py::test_benchmark_parser[2008] 233.13386483113769 iter/sec (stddev: 0.0004987932007664678) 230.49180147321488 iter/sec (stddev: 0.0004826480048373334) 0.99
edtf/parser/tests.py::test_benchmark_parser[-0999] 219.83054947518758 iter/sec (stddev: 0.0016058841894924444) 215.9400104061111 iter/sec (stddev: 0.0013886473250614064) 0.98
edtf/parser/tests.py::test_benchmark_parser[2004-01-01T10:10:10+05:00] 157.16014468388326 iter/sec (stddev: 0.0004107186962915605) 153.00340336159826 iter/sec (stddev: 0.0003564231898353574) 0.97
edtf/parser/tests.py::test_benchmark_parser[-2005/-1999-02] 122.31719238607135 iter/sec (stddev: 0.0018680219721144168) 119.6065419515741 iter/sec (stddev: 0.00017539061544201887) 0.98
edtf/parser/tests.py::test_benchmark_parser[/2006] 281.8490524098306 iter/sec (stddev: 0.0002533547841677691) 261.97749687330264 iter/sec (stddev: 0.0011747201812811168) 0.93
edtf/parser/tests.py::test_benchmark_parser[?2004-%06] 242.79942836843708 iter/sec (stddev: 0.0004137980919304289) 236.91317649435496 iter/sec (stddev: 0.00032756775185827195) 0.98
edtf/parser/tests.py::test_benchmark_parser[[1667, 1760-12]] 20.180584480311715 iter/sec (stddev: 0.0019502450616734031) 18.236448447287632 iter/sec (stddev: 0.002044393069779871) 0.90
edtf/parser/tests.py::test_benchmark_parser[Y3388E2S3] 454.44136337426744 iter/sec (stddev: 0.0001419099094307426) 445.8229272981294 iter/sec (stddev: 0.0001084781927643624) 0.98
edtf/parser/tests.py::test_benchmark_parser[2001-29] 131.86838081911412 iter/sec (stddev: 0.001762720700271494) 127.22914393879928 iter/sec (stddev: 0.001826311363375489) 0.96

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

@aweakley
Copy link
Member

aweakley commented Aug 7, 2025

That looks great, thanks very much. Yes, please could you add a single test of the old parameter.

@aweakley
Copy link
Member

aweakley commented Aug 7, 2025

Also, I guess we should run the tests form main during the CI process?

@aweakley
Copy link
Member

aweakley commented Aug 7, 2025

Also, I guess we should run the tests form main during the CI process?

Or else maybe move the tests out of out of the utils file and next to the other tests instead?

@cameron-simpson
Copy link
Collaborator Author

Also, I guess we should run the tests form main during the CI process?

Or else maybe move the tests out of out of the utils file and next to the other tests instead?

Ok, tests moved and tests for parse_edtf() itself added. How's it look?

@aweakley
Copy link
Member

That's great. Thanks very much.

@aweakley aweakley merged commit e5a9a49 into main Aug 11, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants