Skip to content

[python][copilot] combine script sdk_package into sdk_generator #41692

Closed
@msyyc

Description

@msyyc

CONTEXT:

We need call https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/packaging_tools/sdk_generator.py then call https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/packaging_tools/sdk_package.py to generate SDK

GOAL: merge function main of https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/packaging_tools/sdk_package.py into main of https://github.com/Azure/azure-sdk-for-python/blob/main/tools/azure-sdk-tools/packaging_tools/sdk_generator.py. After this work done, we only need call sdk_generator.py to generate SDK

NOTE:

  • DO update https://github.com/Azure/azure-sdk-for-python/blob/main/scripts/automation_generate.sh
  • DO update
    self.autorest_result = str(Path(os.getenv("TEMP_FOLDER")) / "temp.json")
    with open(self.autorest_result, "w") as file:
    json.dump(input_data, file)
    # generate code(be careful about the order)
    print_exec("python scripts/dev_setup.py -p azure-core")
    print_check(f"python -m packaging_tools.sdk_generator {self.autorest_result} {self.autorest_result}")
    generate_result = self.get_autorest_result()
    self.tag_is_stable = list(generate_result.values())[0]["tagIsStable"]
    log(f"tag_is_stable is {self.tag_is_stable}")
    print_check(f"python -m packaging_tools.sdk_package {self.autorest_result} {self.autorest_result}")

Metadata

Metadata

Assignees

Labels

Mgmt-EngSysEngineering System (Management Plane Specific)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions