(project_shortname, pkg_data)
| 413 | |
| 414 | |
| 415 | def generate_toml_file(project_shortname, pkg_data): |
| 416 | package_author = pkg_data.get("author", "") |
| 417 | project_ver = pkg_data.get("version") |
| 418 | package_name = jl_package_name(project_shortname) |
| 419 | u = uuid.UUID(jl_dash_uuid) |
| 420 | |
| 421 | package_uuid = uuid.UUID( |
| 422 | hex=u.hex[:-12] + hashlib.sha256(package_name.encode("utf-8")).hexdigest()[-12:] |
| 423 | ) |
| 424 | |
| 425 | authors_string = ( |
| 426 | 'authors = ["{}"]\n'.format(package_author) if package_author else "" |
| 427 | ) |
| 428 | |
| 429 | base_package = base_package_name(project_shortname) |
| 430 | |
| 431 | toml_string = jl_projecttoml_string.format( |
| 432 | package_name=package_name, |
| 433 | package_uuid=package_uuid, |
| 434 | version=project_ver, |
| 435 | authors=authors_string, |
| 436 | base_package=base_package, |
| 437 | base_version=jl_base_version[base_package], |
| 438 | dash_uuid=base_package_uid(project_shortname), |
| 439 | ) |
| 440 | file_path = "Project.toml" |
| 441 | with open(file_path, "w", encoding="utf-8") as f: |
| 442 | f.write(toml_string) |
| 443 | print("Generated {}".format(file_path)) |
| 444 | |
| 445 | |
| 446 | def generate_class_string(name, props, description, project_shortname, prefix): |
no test coverage detected
searching dependent graphs…