Skip to content

Commit

Permalink
Improvements to dependency graph (Azure#22892)
Browse files Browse the repository at this point in the history
  • Loading branch information
chidozieononiwu authored Feb 4, 2022
1 parent 466fae9 commit 8e675e2
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Azure SDK for Python

[![Packages](https://img.shields.io/badge/packages-latest-blue.svg)](https://azure.github.io/azure-sdk/releases/latest/python.html) [![Dependencies](https://img.shields.io/badge/dependency-report-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/dependencies.html) [![DepGraph](https://img.shields.io/badge/dependency-graph-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/InterdependencyGraph.html) [![Python](https://img.shields.io/pypi/pyversions/azure-core.svg?maxAge=2592000)](https://pypi.python.org/pypi/azure/) [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/python/python%20-%20core%20-%20ci?branchName=main)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=458&branchName=main)
[![Packages](https://img.shields.io/badge/packages-latest-blue.svg)](https://azure.github.io/azure-sdk/releases/latest/python.html) [![Dependencies](https://img.shields.io/badge/dependency-report-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/dependencies.html) [![DepGraph](https://img.shields.io/badge/dependency-graph-blue.svg)](https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-python/dependencies/dependencyGraph/index.html) [![Python](https://img.shields.io/pypi/pyversions/azure-core.svg?maxAge=2592000)](https://pypi.python.org/pypi/azure/) [![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/python/python%20-%20core%20-%20ci?branchName=main)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=458&branchName=main)

This repository is for active development of the Azure SDK for Python. For consumers of the SDK we recommend visiting our [public developer docs](https://docs.microsoft.com/python/azure/) or our versioned [developer docs](https://azure.github.io/azure-sdk-for-python).

Expand Down
19 changes: 16 additions & 3 deletions eng/pipelines/aggregate-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,29 @@ stages:
parameters:
ScanPath: $(Build.SourcesDirectory)

- task: AzureFileCopy@2
displayName: 'Upload dependency report'
- task: AzureFileCopy@4
displayName: 'Upload Dependency Report'
condition: and(succeededOrFailed(), eq(variables['System.TeamProject'], 'internal'))
inputs:
sourcePath: '$(Build.ArtifactStagingDirectory)/reports'
sourcePath: '$(Build.ArtifactStagingDirectory)/reports/*'
azureSubscription: 'Azure SDK Artifacts'
destination: AzureBlob
storage: azuresdkartifacts
containerName: 'azure-sdk-for-python'
blobPrefix: dependencies
AdditionalArgumentsForBlobCopy: '--exclude-pattern=*data.js*'

- task: AzureFileCopy@4
displayName: 'Upload Dependency Graph'
condition: and(succeededOrFailed(), eq(variables['System.TeamProject'], 'internal'))
inputs:
sourcePath: '$(Build.ArtifactStagingDirectory)/reports/*'
azureSubscription: 'Azure SDK Artifacts'
destination: AzureBlob
storage: azuresdkartifacts
containerName: 'azure-sdk-for-python'
blobPrefix: dependencies/dependencyGraph
AdditionalArgumentsForBlobCopy: '--include-pattern=*data.js*'

- task: PowerShell@2
displayName: "Verify Repository Resource Refs"
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/templates/steps/analyze_dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ steps:
condition: succeededOrFailed()
inputs:
scriptPath: 'scripts/analyze_deps.py'
arguments: '--verbose --out "$(Build.ArtifactStagingDirectory)/reports/dependencies.html" --dump "$(Build.ArtifactStagingDirectory)/reports/data.js"'
arguments: '--verbose --out "$(Build.ArtifactStagingDirectory)/reports/dependencies.html" --dump "$(Build.ArtifactStagingDirectory)/reports"'
4 changes: 3 additions & 1 deletion scripts/analyze_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,9 @@ def display_order(k):
pkg_ids = [k for k in dump_data.keys()]
for pkg_id in pkg_ids:
resolve_lib_deps(dump_data, data_pkgs, pkg_id)
with io.open(args.dump, 'w', encoding='utf-8') as dump_file:
with io.open(f"{args.dump}/data.js", 'w', encoding='utf-8') as dump_file:
dump_file.write('const data = ' + json.dumps(dump_data) + ';')
with io.open(f"{args.dump}/arcdata.json", 'w', encoding='utf-8') as dump_file:
dump_file.write(json.dumps(dump_data))

sys.exit(exitcode)

0 comments on commit 8e675e2

Please sign in to comment.