(
name,
props,
description,
project_shortname,
prefix=None,
rpkg_data=None,
)
| 456 | |
| 457 | # pylint: disable=too-many-arguments |
| 458 | def write_class_file( |
| 459 | name, |
| 460 | props, |
| 461 | description, |
| 462 | project_shortname, |
| 463 | prefix=None, |
| 464 | rpkg_data=None, |
| 465 | ): |
| 466 | props = reorder_props(props=props) |
| 467 | |
| 468 | # generate the R help pages for each of the Dash components that we |
| 469 | # are transpiling -- this is done to avoid using Roxygen2 syntax, |
| 470 | # we may eventually be able to generate similar documentation using |
| 471 | # doxygen and an R plugin, but for now we'll just do it on our own |
| 472 | # from within Python |
| 473 | write_help_file(name, props, description, prefix, rpkg_data) |
| 474 | |
| 475 | import_string = "# AUTO GENERATED FILE - DO NOT EDIT\n\n" |
| 476 | class_string = generate_class_string(name, props, project_shortname, prefix) |
| 477 | |
| 478 | file_name = format_fn_name(prefix, name) + ".R" |
| 479 | |
| 480 | file_path = os.path.join("R", file_name) |
| 481 | with open(file_path, "w", encoding="utf-8") as f: |
| 482 | f.write(import_string) |
| 483 | f.write(class_string) |
| 484 | |
| 485 | print("Generated {}".format(file_name)) |
| 486 | |
| 487 | |
| 488 | def write_js_metadata(pkg_data, project_shortname, has_wildcards): |
nothing calls this directly
no test coverage detected
searching dependent graphs…