Skip to content

Commit b281cd0

Browse files
authored
Merge branch 'main' into copilot/fix-42506
2 parents a5e70b0 + ac233e8 commit b281cd0

File tree

56 files changed

+396
-478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+396
-478
lines changed

eng/pipelines/templates/stages/archetype-python-release.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ stages:
185185
echo "Uploaded sdist to devops feed"
186186
displayName: 'Publish package to feed: ${{parameters.DevFeedName}}'
187187
188-
- job: CreateApiView
189-
displayName: "Create APIView"
188+
- job: MarkPackageReleaseCompletion
189+
displayName: "Mark package release completion"
190190
dependsOn: PublishPackage
191191

192192
pool:
@@ -205,6 +205,11 @@ stages:
205205
inputs:
206206
versionSpec: '3.9'
207207

208+
- template: /eng/common/pipelines/templates/steps/mark-release-completion.yml
209+
parameters:
210+
ConfigFileDir: '$(Pipeline.Workspace)/${{parameters.ArtifactName}}/PackageInfo'
211+
PackageArtifactName: ${{artifact.name}}
212+
208213
- template: /eng/common/pipelines/templates/steps/create-apireview.yml
209214
parameters:
210215
ArtifactPath: $(Pipeline.Workspace)/${{parameters.ArtifactName}}

eng/tools/azure-sdk-tools/tests/README.md renamed to eng/tools/azure-sdk-tools/tests/integration/scenarios/snippet-updater/README.md

File renamed without changes.

eng/tools/azure-sdk-tools/tests/README_missing_snippet.md renamed to eng/tools/azure-sdk-tools/tests/integration/scenarios/snippet-updater/README_missing_snippet.md

File renamed without changes.

eng/tools/azure-sdk-tools/tests/README_out_of_sync.md renamed to eng/tools/azure-sdk-tools/tests/integration/scenarios/snippet-updater/README_out_of_sync.md

File renamed without changes.

eng/tools/azure-sdk-tools/tests/example_async.py renamed to eng/tools/azure-sdk-tools/tests/integration/scenarios/snippet-updater/example_async.py

File renamed without changes.

eng/tools/azure-sdk-tools/tests/integration/test_package_discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from ci_tools.functions import discover_targeted_packages
55

66

7-
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", ".."))
7+
repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", ".."))
88
core_service_root = os.path.join(repo_root, "sdk", "core")
99
storage_service_root = os.path.join(repo_root, "sdk", "storage")
1010

eng/tools/azure-sdk-tools/tests/test_python_snippet_updater.py

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,32 @@
11
import os
22
import pytest
3+
import shutil
4+
from tempfile import mkdtemp
5+
36
from ci_tools.snippet_update.python_snippet_updater import (
47
get_snippet,
58
update_snippet,
69
check_snippets,
710
check_not_up_to_date,
811
)
912

13+
scenario = os.path.join(os.path.dirname(__file__), "integration", "scenarios", "snippet-updater")
14+
15+
def create_temp_directory_from_template(input_directory: str) -> str:
16+
"""
17+
Create a temporary directory from a template directory.
18+
Args:
19+
input_directory (str): The path to the input directory to copy.
20+
Returns:
21+
str: The path to the newly created temporary directory.
22+
"""
23+
temp_dir = mkdtemp()
24+
shutil.copytree(input_directory, temp_dir, dirs_exist_ok=True)
25+
return temp_dir
26+
1027

1128
def test_get_snippet():
12-
folder = os.path.dirname(os.path.abspath(__file__))
29+
folder = scenario
1330
file = os.path.join(folder, "example_async.py")
1431
get_snippet(file)
1532
snippets = check_snippets().keys()
@@ -19,15 +36,15 @@ def test_get_snippet():
1936

2037

2138
def test_update_snippet():
22-
folder = os.path.dirname(os.path.abspath(__file__))
39+
folder = create_temp_directory_from_template(scenario)
2340
file = os.path.join(folder, "example_async.py")
2441
get_snippet(file)
2542
file_1 = os.path.join(folder, "README.md")
2643
update_snippet(file_1)
2744

2845

2946
def test_missing_snippet():
30-
folder = os.path.dirname(os.path.abspath(__file__))
47+
folder = create_temp_directory_from_template(scenario)
3148
file = os.path.join(folder, "example_async.py")
3249
get_snippet(file)
3350
file_1 = os.path.join(folder, "README_missing_snippet.md")
@@ -36,7 +53,7 @@ def test_missing_snippet():
3653

3754

3855
def test_out_of_sync():
39-
folder = os.path.dirname(os.path.abspath(__file__))
56+
folder = create_temp_directory_from_template(scenario)
4057
file = os.path.join(folder, "example_async.py")
4158
get_snippet(file)
4259
file_1 = os.path.join(folder, "README_out_of_sync.md")

eng/tools/azure-sdk-tools/tests/test_requirements_parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_replace_dev_reqs_relative(tmp_directory_create):
6767
).version
6868
identity_version = ParsedSetup.from_path(os.path.join(repo_root, "sdk", "identity", "azure-identity")).version
6969
mgmt_core_version = ParsedSetup.from_path(os.path.join(repo_root, "sdk", "core", "azure-mgmt-core")).version
70-
sdk_tools_version = ParsedSetup.from_path(os.path.join(repo_root, "tools", "azure-sdk-tools")).version
70+
sdk_tools_version = ParsedSetup.from_path(os.path.join(repo_root, "eng", "tools", "azure-sdk-tools")).version
7171
core_version = ParsedSetup.from_path(os.path.join(repo_root, "sdk", "core", "azure-core")).version
7272
keyvault_version = ParsedSetup.from_path(os.path.join(repo_root, "sdk", "keyvault", "azure-keyvault-keys")).version
7373

scripts/dev_setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def select_install_type(pkg, run_develop, exceptions):
7575

7676
packages = {
7777
tuple(os.path.dirname(f).rsplit(os.sep, 1))
78-
for f in glob.glob(os.path.join(root_dir, "sdk/*/azure-*/setup.py")) + glob.glob(os.path.join(root_dir, "tools/azure-*/setup.py"))
78+
for f in glob.glob(os.path.join(root_dir, "sdk/*/azure-*/setup.py")) + glob.glob(os.path.join(root_dir, "eng/tools/azure-*/setup.py"))
7979
}
8080
# [(base_folder, package_name), ...] to {package_name: base_folder, ...}
8181
packages = {package_name: base_folder for (base_folder, package_name) in packages}

scripts/devops_tasks/verify_dependencies_present.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
args = parser.parse_args()
2626

2727
package_name = args.package_name.replace("_", "-")
28-
path_to_setup = os.path.join(root_dir, "sdk", args.service, package_name, "setup.py")
28+
path_to_setup = os.path.join(root_dir, "sdk", args.service, package_name)
2929

3030
missing_packages = find_packages_missing_on_pypi(path_to_setup)
3131

0 commit comments

Comments
 (0)