Skip to content

Conversation

@JennyPng
Copy link
Member

@JennyPng JennyPng commented Nov 21, 2025

@JennyPng
Copy link
Member Author

JennyPng commented Nov 21, 2025

added the max_python_version because running with python ver > 3.11 causes some astroid exceptions 🤔 for example:

  File "/home/jennypeng/azure-sdk-for-python/sdk/core/azure-core/.venv_apistub/lib/python3.12/site-packages/astroid/rebuilder.py", line 609, in visit
    visit_method = getattr(self, visit_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'TreeRebuilder' object has no attribute 'visit_typealias'

@JennyPng JennyPng marked this pull request as ready for review November 21, 2025 20:45
Copilot AI review requested due to automatic review settings November 21, 2025 20:45
Copilot finished reviewing on behalf of JennyPng November 21, 2025 20:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the apistub check to the azpysdk CLI tool, allowing API stub generation without requiring tox. This aligns with the ongoing migration from the slower tox-based framework to a lightweight implementation using the azpysdk entrypoint. The check generates API stubs for packages, which are used for API review and documentation purposes.

Key Changes

  • Implements a new apistub check class that follows the existing Check pattern
  • Registers the check with the CLI parser and adds documentation
  • Configures the template pyproject.toml to opt-out by default (apistub = false)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
eng/tools/azure-sdk-tools/azpysdk/apistub.py New check implementation that generates API stubs by installing apiview dependencies, building wheels, and running the apistub tool
eng/tools/azure-sdk-tools/azpysdk/main.py Imports and registers the new apistub check in the CLI parser
sdk/template/azure-template/pyproject.toml Adds apistub = false configuration to opt-out by default in the template
doc/tool_usage_guide.md Documents the new apistub tool in the available tools table

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant