Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: refactor tests workflow #608

Merged
merged 7 commits into from
Dec 20, 2023

Conversation

joaoandre-avaiga
Copy link
Collaborator

No description provided.

@joaoandre-avaiga joaoandre-avaiga force-pushed the feature/refactor-gh-workflows branch 16 times, most recently from b251e01 to 631ee56 Compare December 15, 2023 01:42
Copy link
Contributor

github-actions bot commented Dec 15, 2023

Coverage

Taipy Overall Coverage Report
FileStmtsMissCoverMissing
__init__.py16193%31
_entrypoint.py32293%44–45
_run.py38294%77–78
version.py90100% 
_cli
   __init__.py00100% 
   _help_cli.py190100% 
   _run_cli.py251156%40, 42–46, 48–49, 51, 53, 59
   _scaffold_cli.py18288%41–42
_cli/_base_cli
   __init__.py10100% 
   _cli.py410100% 
config
   __init__.py38976%41–42, 44–49, 70
   _config.py61198%68
   _init.py30100% 
   config.py145497%87, 154, 178, 235
   section.py42685%35, 40, 44, 48, 53, 57
   setup.py14140%14–16, 18, 20–21, 23–27, 29, 31, 33
   unique_section.py60100% 
   version.py90100% 
config/_config_comparator
   __init__.py00100% 
   _comparator_result.py95396%67, 110–111
   _config_comparator.py680100% 
config/_serializer
   __init__.py00100% 
   _base_serializer.py125596%39, 142–143, 145–146
   _json_serializer.py24387%33–35
   _toml_serializer.py23195%42
config/checker
   __init__.py00100% 
   _checker.py140100% 
   issue.py150100% 
   issue_collector.py280100% 
config/checker/_checkers
   __init__.py00100% 
   _auth_config_checker.py25250%12–14, 17–19, 21–24, 26–30, 32–34, 39–40, 47–49, 54–55
   _config_checker.py30196%28
config/common
   __init__.py00100% 
   _classproperty.py50100% 
   _config_blocker.py240100% 
   _repr_enum.py70100% 
   _template_handler.py1121190%39, 54, 56, 60, 62, 64, 100–101, 119, 150–151
   _validate_id.py100100% 
   frequency.py70100% 
   scope.py220100% 
config/exceptions
   __init__.py10100% 
   exceptions.py50100% 
config/global_app
   __init__.py00100% 
   global_app_config.py32196%38
core
   __init__.py70100% 
   _core.py560100% 
   _core_cli.py460100% 
   _init.py160100% 
   _init_version.py100100% 
   setup.py15150%14–16, 18, 20–21, 23–27, 29, 40, 42, 49
   taipy.py3243888%117, 144, 185, 190, 195, 200, 205, 210, 215, 253, 258, 263, 268, 273, 278, 283, 288, 325, 355, 380–381, 388–392, 417–420, 814, 853, 869, 918–922
core/_backup
   __init__.py00100% 
   _backup.py33293%54–55
core/_entity
   __init__.py00100% 
   _dag.py65198%94
   _entity.py210100% 
   _entity_ids.py220100% 
   _labeled.py480100% 
   _migrate_cli.py73494%97–98, 116–117
   _properties.py350100% 
   _reload.py61198%71
   submittable.py74494%46, 101, 105, 109
core/_entity/_migrate
   __init__.py30100% 
   _migrate_fs.py66592%43, 68, 104–106
   _migrate_mongo.py75692%51, 70, 105, 127, 172–173
   _migrate_sql.py1065350%30–31, 33–36, 38–46, 53, 57, 64–65, 69, 76–77, 81, 89–90, 94, 100–101, 105, 110–111, 115, 120–121, 125, 127–137, 139–140, 154, 198–199, 201–202
   _utils.py1993084%32, 34–36, 38, 59–61, 63–67, 69–71, 73–74, 157, 160, 169, 197–199, 202–204, 241–242, 316
core/_manager
   __init__.py00100% 
   _manager.py82198%114
   _manager_factory.py21290%28, 32
core/_orchestrator
   __init__.py00100% 
   _abstract_orchestrator.py21480%25, 37, 49, 54
   _orchestrator.py188298%202–203
   _orchestrator_factory.py61985%36, 55–56, 58, 77, 92, 95–96, 98
core/_orchestrator/_dispatcher
   __init__.py30100% 
   _development_job_dispatcher.py19194%35
   _job_dispatcher.py84594%71, 84–85, 102, 120
   _standalone_job_dispatcher.py270100% 
   _task_function_wrapper.py58493%36, 43–45
core/_repository
   __init__.py00100% 
   _abstract_converter.py10280%19, 24
   _abstract_repository.py361072%29, 41, 53, 63, 73, 80, 90, 101, 113, 124
   _base_taipy_model.py31487%27–28, 50, 53
   _decoder.py21290%36, 51
   _encoder.py19384%30, 36, 41
   _filesystem_repository.py1592186%147, 173–174, 176, 178–181, 190–192, 196, 200–203, 227, 240–241, 260–261
   _sql_repository.py1311687%79–80, 123, 137, 143–144, 147–148, 153–157, 163, 180, 216
core/_repository/db
   __init__.py00100% 
   _sql_base_model.py30100% 
   _sql_connection.py46295%82–83
core/_version
   __init__.py00100% 
   _utils.py260100% 
   _version.py140100% 
   _version_converter.py140100% 
   _version_fs_repository.py68592%44–45, 100–101, 134
   _version_manager.py149894%98, 104, 148–149, 171, 212, 220, 230
   _version_manager_factory.py19289%26, 29
   _version_mixin.py190100% 
   _version_model.py210100% 
   _version_repository_interface.py26773%22, 26, 30, 34, 38, 42, 46
   _version_sql_repository.py530100% 
core/_version/_cli
   __init__.py00100% 
   _bcolor.py241058%21, 23–25, 27–31, 33
   _version_cli.py138497%81, 85, 193, 195
core/common
   __init__.py10100% 
   _listattributes.py29389%21–22, 32
   _mongo_connector.py17288%37, 45
   _repr_enum.py70100% 
   _utils.py390100% 
   _warnings.py210100% 
   mongo_default_document.py50100% 
   typing.py70100% 
   warn_if_inputs_not_ready.py140100% 
core/config
   __init__.py300100% 
   core_section.py182497%132, 141, 150, 163
   data_node_config.py332598%608, 610, 614, 616, 1015
   job_config.py73395%125–127
   migration_config.py46197%57
   scenario_config.py149497%214, 218, 226, 230
   task_config.py95792%70–71, 146, 149, 217–219
core/config/checkers
   __init__.py00100% 
   _config_id_checker.py170100% 
   _core_section_checker.py170100% 
   _data_node_config_checker.py81297%76, 111
   _job_config_checker.py190100% 
   _migration_config_checker.py300100% 
   _scenario_config_checker.py600100% 
   _task_config_checker.py270100% 
core/cycle
   __init__.py00100% 
   _cycle_converter.py110100% 
   _cycle_fs_repository.py60100% 
   _cycle_manager.py1010100% 
   _cycle_manager_factory.py20290%28, 31
   _cycle_model.py230100% 
   _cycle_sql_repository.py60100% 
   cycle.py109298%81, 147
   cycle_id.py30100% 
core/data
   __init__.py120100% 
   _abstract_file.py100100% 
   _abstract_sql.py1933183%103, 148, 150, 154, 167–168, 171–172, 184, 190, 192, 194, 200, 209, 239, 249, 270–277, 284, 290, 306, 315–317, 323
   _abstract_tabular.py60100% 
   _data_converter.py175597%114, 183, 225, 258, 267
   _data_fs_repository.py60100% 
   _data_manager.py117298%93, 179
   _data_manager_factory.py20290%28, 31
   _data_model.py320100% 
   _data_sql_repository.py60100% 
   _filter.py2011891%42, 64, 84–92, 144, 151, 193, 200, 215, 223, 232
   csv.py124695%98, 208, 212, 225, 229, 259
   data_node.py288797%149, 217, 269, 278, 455, 459, 463
   data_node_id.py50100% 
   excel.py225896%102, 295, 303, 310–311, 337, 375, 400
   generic.py48197%83
   in_memory.py280100% 
   json.py113595%91, 167, 171, 176, 180
   mongo.py1091288%201–208, 216, 226, 231, 283
   operator.py110100% 
   parquet.py118397%112, 127, 230
   pickle.py650100% 
   sql.py44197%99
   sql_table.py670100% 
core/exceptions
   __init__.py10100% 
   exceptions.py110496%173, 209, 247, 289
core/job
   __init__.py00100% 
   _job_converter.py31293%59–60
   _job_fs_repository.py60100% 
   _job_manager.py570100% 
   _job_manager_factory.py20290%28, 31
   _job_model.py260100% 
   _job_sql_repository.py60100% 
   job.py183497%75, 141, 304, 331
   job_id.py30100% 
   status.py110100% 
core/notification
   __init__.py70100% 
   _registration.py180100% 
   _topic.py23195%65
   core_event_consumer.py26196%84
   event.py40197%139
   notifier.py470100% 
   registration_id.py30100% 
core/scenario
   __init__.py00100% 
   _scenario_converter.py320100% 
   _scenario_fs_repository.py60100% 
   _scenario_manager.py272996%87–90, 182, 187, 375, 420, 431
   _scenario_manager_factory.py20290%28, 31
   _scenario_model.py300100% 
   _scenario_sql_repository.py60100% 
   scenario.py2931794%129, 132, 134–135, 173, 210, 242–246, 298, 337, 528, 530, 586, 592
   scenario_id.py30100% 
core/sequence
   __init__.py00100% 
   _sequence_converter.py190100% 
   _sequence_manager.py2361394%157, 225, 239, 241, 244, 249, 255, 281–284, 343, 361
   _sequence_manager_factory.py11190%23
   sequence.py139397%79, 154, 166
   sequence_id.py30100% 
core/submission
   __init__.py00100% 
   _submission_converter.py140100% 
   _submission_fs_repository.py60100% 
   _submission_manager.py320100% 
   _submission_manager_factory.py20290%28, 31
   _submission_model.py240100% 
   _submission_sql_repository.py60100% 
   submission.py131794%102, 110, 129, 145, 148, 154, 202
   submission_id.py30100% 
   submission_status.py100100% 
core/task
   __init__.py00100% 
   _task_converter.py28196%68
   _task_fs_repository.py60100% 
   _task_manager.py120595%152–153, 158–159, 196
   _task_manager_factory.py20290%28, 31
   _task_model.py250100% 
   _task_sql_repository.py60100% 
   task.py104694%31, 95, 100, 163–165
   task_id.py30100% 
gui
   __init__.py150100% 
   _default_config.py30100% 
   _gui_cli.py370100% 
   _gui_section.py300100% 
   _init.py10100% 
   _page.py32293%20–21
   _warnings.py110100% 
   config.py1101388%176, 179, 192, 200, 202, 206, 208, 210, 274–275, 280–281, 322
   gui.py116316885%39, 355, 357, 403–409, 412–419, 421–422, 424, 426–427, 429–431, 433–434, 436, 438–440, 442–445, 447–448, 450–455, 506, 517, 519, 521, 564, 616, 620, 651, 658–659, 724, 733, 753, 770–771, 775–781, 783–788, 836, 845, 933, 935, 940–941, 944, 947–948, 950, 952, 956, 959, 972–979, 981, 983, 996–1000, 1002–1005, 1019–1021, 1123–1124, 1185, 1187, 1201–1202, 1213, 1223, 1229, 1300, 1390–1392, 1402, 1411–1419, 1443, 1449, 1654, 1656, 1707, 1736–1738, 1740, 1743–1744, 1756, 1761–1763, 1765, 1823, 1878–1881, 1887, 1917, 1930, 1942, 1954, 1956, 1960–1961, 1970, 2086, 2095–2097, 2229, 2242, 2252, 2256
   gui_actions.py882868%61, 101, 133, 148, 174, 196–199, 220, 234, 238–239, 261–263, 289, 312–314, 318–319, 371–372, 377, 383, 421–422
   gui_types.py87693%142, 147, 152, 159, 170, 172
   icon.py231630%58–63, 66–75
   page.py48589%21, 46, 94, 105, 110
   partial.py27388%21, 66, 73
   server.py1592385%40, 64, 88, 106, 193, 244, 246–247, 270, 279, 281, 286–287, 294–295, 297–299, 309, 311, 313, 316–317
   setup.py25250%14, 16–18, 20–21, 23, 25–29, 31, 50, 52, 62–66, 69–72, 75
   state.py1091784%25, 129, 141, 155, 181, 211–213, 223–224, 236–239, 242–243, 246
gui/_renderers
   __init__.py73987%21–22, 40, 49, 85–87, 91, 98
   builder.py64611282%45, 120, 139–140, 154–156, 158, 171, 198, 230–231, 235, 253–254, 258, 273, 291, 296–297, 301, 312, 329–332, 341, 344–346, 359, 372, 374–375, 378, 382–385, 387, 394, 436, 448, 494–497, 499–503, 505–508, 510–514, 524, 544, 561, 589, 592–593, 595, 598, 602, 617, 624, 650, 662, 664–668, 671–672, 696, 699, 701, 783, 786, 807–808, 812, 844, 849–852, 854–857, 863–864, 874, 925, 942, 947, 952–958, 981
   factory.py77396%20–21, 566
   json.py30873%26, 33–39
   utils.py66887%38–39, 54, 66–67, 78–79, 90
gui/_renderers/_html
   __init__.py10100% 
   factory.py9188%22
   parser.py98792%41–42, 70, 74, 108–109, 121
gui/_renderers/_markdown
   __init__.py18194%30
   blocproc.py35488%48–49, 67–68
   control.py110100% 
   factory.py140100% 
   postproc.py190100% 
   preproc.py122695%23, 103, 132, 136, 140, 199
gui/builder
   __init__.py40100% 
   _api_generator.py59689%25, 43, 45, 51, 70, 73
   _context_manager.py13192%17
   _element.py88989%23, 47–48, 63, 68, 150, 161, 179, 182
   _factory.py9188%22
   page.py30970%57, 61–66, 70, 72
gui/data
   __init__.py30100% 
   array_dict_data_accessor.py40685%47–48, 50–51, 59, 66
   content_accessor.py961881%51, 58–60, 64, 66, 73, 85–86, 91–92, 109–110, 124–126, 128, 131
   data_accessor.py711480%27, 33, 37, 43, 48, 51, 72, 74, 77, 83, 87–88, 97–98
   data_format.py40100% 
   data_scope.py33293%55–56
   numpy_data_accessor.py21766%30, 33–35, 40–42
   pandas_data_accessor.py2366373%81, 83–92, 94, 96–103, 109, 117, 151–153, 158–161, 184, 207–212, 260–261, 277–278, 281, 290–292, 298–299, 309, 315–317, 351–355, 357, 362–363, 372–374, 404, 407
   utils.py592852%22, 53–54, 57–59, 82, 98, 118–119, 121–125, 127–133, 136, 138, 141–144
gui/data/decimator
   __init__.py40100% 
   lttb.py38294%53, 56
   minmax.py25196%45
   rdp.py64592%85, 112–114, 140
   scatter_decimator.py471274%62–63, 75–80, 84–87
gui/extension
   __init__.py20100% 
   library.py1381787%27–28, 61, 70, 74, 80, 131, 140, 142, 175, 239, 269, 348, 350, 363, 411, 421
gui/utils
   __init__.py220100% 
   _adapter.py1174462%39–40, 58–70, 82, 87, 92, 98–100, 103–108, 116, 126–133, 141–145, 149, 151, 153
   _attributes.py30583%16, 31–32, 39–40
   _bindings.py48197%20
   _evaluator.py2272887%22, 152, 171, 200–202, 244–248, 250–260, 270, 297, 313, 326–327, 338
   _locals_context.py480100% 
   _map_dict.py66592%34, 55, 70–71, 73
   _runtime_manager.py13284%17, 30
   _variable_directory.py100892%47–50, 61, 72, 84, 88
   boolean.py9188%27
   chart_config_builder.py1381291%23, 91–92, 107, 154–155, 195, 198–200, 266, 268
   clientvarname.py14285%23, 26
   datatype.py11372%20, 22, 24
   date.py17288%27, 30
   expr_var_name.py13192%23
   filename.py130100% 
   filter_locals.py50100% 
   get_imported_var.py110100% 
   get_module_name.py140100% 
   get_page_from_module.py5180%19
   getdatecolstrname.py8187%21
   html.py9188%22
   is_debugging.py3166%17
   is_port_open.py60100% 
   isnotebook.py10100% 
   proxy.py65650%12–17, 19–22, 24, 27, 29, 36–37, 40–46, 49, 52–53, 55–60, 62–63, 70–71, 73–79, 87–88, 91–95, 97–103, 106–109, 111–115
   singleton.py70100% 
   table_col_builder.py461860%21, 29, 38–40, 42, 52–54, 56, 59–61, 63, 66–68, 70
   types.py1301886%47–48, 102–108, 136–139, 142–144, 183–184
   varnamefromcontent.py6183%17
gui_core
   _GuiCoreLib.py340100% 
   __init__.py10100% 
   _adapters.py793851%48–53, 81–82, 84, 94, 97–110, 114, 127–128, 130, 141–147, 171–172, 174
   _context.py59621264%21–22, 80, 83–84, 145–146, 173–174, 184–185, 187–189, 191–192, 194, 200–201, 206, 208, 210–211, 224, 239–240, 249–255, 257–258, 261–264, 271–272, 275–280, 292, 318–336, 351, 353–356, 358–359, 368–373, 375, 378, 381, 385–396, 401, 428, 441–449, 458–460, 474, 508–511, 514–516, 524–528, 535–536, 543–545, 552–553, 561–564, 584–585, 591, 603–604, 615–616, 626, 636–637, 642, 654, 656–657, 664, 670–673, 676–679, 688–690, 692, 696, 702, 709–715, 717–718, 727–728, 731, 738–745, 755–758, 772, 792–793, 815–817, 823–824, 842–843, 860–861, 878–879, 883–894
   _init.py50100% 
logger
   __init__.py00100% 
   _taipy_logger.py22290%30–31
rest
   __init__.py40100% 
   _init.py10100% 
   app.py200100% 
   extensions.py30100% 
   rest.py7185%45
   setup.py11110%11–12, 14, 16–17, 19–23, 25
   version.py90100% 
rest/api
   __init__.py20100% 
   error_handler.py49197%87
   views.py64493%164–165, 211–212
rest/api/exceptions
   __init__.py00100% 
   exceptions.py90100% 
rest/api/middlewares
   __init__.py00100% 
   _middleware.py14192%34
rest/api/resources
   __init__.py70100% 
   cycle.py490100% 
   datanode.py86396%464, 583, 602
   job.py70494%200–203
   scenario.py640100% 
   sequence.py65198%292
   task.py64198%200
rest/api/schemas
   __init__.py70100% 
   cycle.py100100% 
   datanode.py630100% 
   job.py120100% 
   scenario.py120100% 
   sequence.py100100% 
   task.py110100% 
rest/commons
   __init__.py00100% 
   apispec.py51982%35, 49, 84, 87, 91, 98–100, 103
   encoder.py13653%22–25, 27–28
   pagination.py14140%12, 14, 16–17, 20–23, 26–29, 36, 44
   to_from_model.py80100% 
TOTAL17000179889% 

@joaoandre-avaiga joaoandre-avaiga force-pushed the feature/refactor-gh-workflows branch from d5ddce1 to 14ff9b6 Compare December 15, 2023 02:38
Copy link
Collaborator Author

@joaoandre-avaiga joaoandre-avaiga left a comment

Choose a reason for hiding this comment

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

Test

@joaoandre-avaiga joaoandre-avaiga force-pushed the feature/refactor-gh-workflows branch 6 times, most recently from 4f7310f to 385cac2 Compare December 15, 2023 03:18
@joaoandre-avaiga joaoandre-avaiga marked this pull request as ready for review December 15, 2023 09:57
.github/workflows/linter.yml Outdated Show resolved Hide resolved

on:
pull_request_review:
types: [submitted]
Copy link
Member

Choose a reason for hiding this comment

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

For example, if JR approves a PR, and Fabien approves it right after, does it mean the action will be run twice?
Or it will only be run once because there is no change between the 2 approves?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I believe the action will run again, which is not really desirable, but I don't see a way to prevent this at the moment. I still things it's better like this than run on every push, but we can discuss it.

jobs:
tests:
if: github.event.review.state == 'approved'
timeout-minutes: 40
Copy link
Member

Choose a reason for hiding this comment

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

I would increase the timeout, probably 60 minutes

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At this point, it's not needed. Tests are taking 14min to 30 min depending on OS and quantity of jobs running. We can increase it in the future if this becomes a problem, but I think we should focus on optmizing the test run to take less time, since 14 ~ 30 min is already too much.

logger:
- 'taipy/logger/**'
rest:
- 'taipy/rest/**'
Copy link
Member

Choose a reason for hiding this comment

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

I would add templates here as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't add templates because the templates test is still inside the package, it needs to be moved to the root test folder. I can add but effectively will only work after the tests are moved to the correct folder.

Copy link
Member

Choose a reason for hiding this comment

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

PR #583 from @toan-quach has already did that, however we did not merge it because of the timeout.
We need to align on this topic

.github/workflows/partial-tests.yml Show resolved Hide resolved
Pipfile Show resolved Hide resolved
@joaoandre-avaiga joaoandre-avaiga force-pushed the feature/refactor-gh-workflows branch 2 times, most recently from 32481ba to b78f8df Compare December 19, 2023 01:00
jrobinAV
jrobinAV previously approved these changes Dec 19, 2023
.github/workflows/partial-tests.yml Show resolved Hide resolved
.github/workflows/partial-tests.yml Show resolved Hide resolved
@joaoandre-avaiga joaoandre-avaiga force-pushed the feature/refactor-gh-workflows branch 2 times, most recently from 9a0778e to 0c761f8 Compare December 20, 2023 00:09
joaoandre-avaiga

This comment was marked as outdated.

@joaoandre-avaiga joaoandre-avaiga force-pushed the feature/refactor-gh-workflows branch from 0c761f8 to c150d23 Compare December 20, 2023 00:39
@joaoandre-avaiga joaoandre-avaiga merged commit 8c44379 into develop Dec 20, 2023
34 of 36 checks passed
@joaoandre-avaiga joaoandre-avaiga deleted the feature/refactor-gh-workflows branch December 20, 2023 10:03
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