Skip to content

[python] add back api view sphinx#10323

Open
iscai-msft wants to merge 37 commits intomicrosoft:mainfrom
iscai-msft:python/addBackApiViewSphinx
Open

[python] add back api view sphinx#10323
iscai-msft wants to merge 37 commits intomicrosoft:mainfrom
iscai-msft:python/addBackApiViewSphinx

Conversation

@iscai-msft
Copy link
Copy Markdown
Member

No description provided.

@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Apr 9, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 9, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-python@10323

commit: fd36dc1

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - internal ✏️

Add apiview and sphinx to ci

@azure-sdk
Copy link
Copy Markdown
Collaborator

azure-sdk commented Apr 9, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Comment thread packages/http-client-python/eng/scripts/ci/regenerate.ts Fixed
iscai-msft and others added 10 commits April 14, 2026 14:25
Remove duplicate testserver fixtures from azure/shared/unbranded conftest
files. The root tests/conftest.py already handles server lifecycle with
proper file locking — the duplicates were causing EADDRINUSE on Windows
when tox environments ran in parallel.

Add generated_tests to _SKIP_DIRS in test_sensitive_word since test
preparers use AzureRecordedTestCase regardless of flavor.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The pytest_configure hook runs in the xdist controller process, but
session fixtures run in each worker. Moving server startup to the
testserver fixture ensures each worker can start/find the server,
with file locking to prevent duplicate starts. Also removed stdout
suppression so server errors are visible for debugging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
With xdist, session fixtures run per-worker. The worker that starts
the server may finish before others, terminating it prematurely.
The server is now left running and cleaned up when the tox process exits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
--index-url replaces PyPI entirely, causing 401 errors when uv tries
to fetch standard dependencies (like pylint) from the Azure DevOps
feed. --extra-index-url keeps PyPI as primary and adds the Azure feed
as supplementary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add SKIP_PACKAGE_DIRS and get_package_namespace_dir() to util.py, used
by pylint, mypy, pyright, and sphinx scripts to consistently skip
generated_tests, generated_samples, and build directories.

Also switch Azure DevOps feed installs from uv to pip (uv treats 401
from the feed as a hard error), and add pip to lint requirements.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Both uv and pip fail when the Azure DevOps feed returns 401 for
packages it doesn't host. Use --no-deps with --index-url to fetch
only the Azure-hosted packages, and let tox deps handle their
PyPI dependencies.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
iscai-msft and others added 10 commits April 15, 2026 13:30
Without tsconfigRootDir, typescript-eslint finds multiple candidate
tsconfig files (emitter/tsconfig.json and ../../tsconfig.base.json)
and fails with a parsing error in CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nation

When azure and unbranded tox envs run in parallel, both build packages
with the same name+version (e.g. typetest-array==1.0.0b1) from different
source directories. Without --no-cache, uv's shared build cache can serve
an unbranded wheel to the azure env (or vice versa), causing 'No module
named corehttp' errors in azure sphinx builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Key changes:
- Merge lint + mypy + pyright into single 'check-{flavor}' tox env,
  cutting redundant package installs from 10 to 6 (each builds ~100+
  wheels from source)
- Remove separate lint:generated and typecheck:generated steps from
  Test-Packages.ps1 — now covered by check-{flavor} in npm run ci
- Use per-flavor uv cache dir instead of --no-cache to get cache
  benefits within a flavor while preventing cross-flavor contamination
- Increase parallelism in CI check scripts from cpu_count/2 to cpu_count
- Increase Python regeneration jobs from jobs/2 to full jobs

Before: 10 tox envs × ~100 wheel builds each = ~1000 builds
After:  6 tox envs × ~100 wheel builds each = ~600 builds

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move black formatting out of per-spec worker processes into a single
  sequential pass after all codegen completes. This avoids duplicating
  black's import/init cost across N workers and lets codegen workers
  finish faster.
- Increase install_packages.py batch size from 20 to 50 (paths are
  ~60 chars each, well under Windows 32KB cmd limit). Reduces number
  of uv pip install invocations from 6 batches to 3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Major CI performance improvements:

1. Pre-build wheels once per flavor before starting tox envs. Each tox
   env then installs from pre-built wheels via --find-links (instant,
   no compilation). Falls back to source install if wheels unavailable.

2. Split docs into separate apiview and sphinx tox envs so they run
   in parallel instead of sequentially within a single env.

Before: 6 tox envs (test×2, check×2, docs×2), docs sequential
After:  8 tox envs (test×2, check×2, apiview×2, sphinx×2), all parallel
        + wheels pre-built so each env installs in <5s instead of ~2min

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Generated SDK packages are regenerated in CI and don't need to be
checked in. Only the 4 custom _patch.py files in authentication-api-key
(which add patch_added_operation) are preserved via git add -f.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sphinx needs azure-core (azure) or corehttp (unbranded) to import
generated packages for docstring extraction. Without these deps,
autodoc fails with 'No module named azure.core/corehttp'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants