Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
31bd574
add apiview and sphinx
Apr 9, 2026
2151fae
add changeset and try to run azure and unbranded parallel as well
Apr 9, 2026
41c50c7
fix package location
Apr 9, 2026
b75fb4e
batch generate
Apr 9, 2026
1eb3120
improve apiview run
Apr 9, 2026
48922fb
Merge branch 'main' of https://github.com/microsoft/typespec into pyt…
Apr 9, 2026
58cfc05
try to fix regeneration, add progress bar
Apr 9, 2026
3e8ab4c
fix linting
Apr 9, 2026
e3bd7d4
fix generation output dir
Apr 9, 2026
8ddf2e8
try again
Apr 9, 2026
7160d46
Merge branch 'main' of https://github.com/microsoft/typespec into pyt…
Apr 10, 2026
7502b50
change how we pass args for emit-yaml-only
Apr 10, 2026
46e80c0
fix additional deps
Apr 10, 2026
8e1b51f
flavor setting
Apr 10, 2026
9154085
fix modifying of global list
Apr 10, 2026
3aef02f
fail fast
Apr 10, 2026
a358a47
kill processes
Apr 10, 2026
6204999
configure tests to pass hopefully
Apr 14, 2026
0b69b32
fix: remove duplicate testserver fixtures and fix sensitive word test
Apr 14, 2026
57e057f
fix: move server startup from pytest_configure to session fixture
Apr 14, 2026
8f41a41
fix: do not terminate mock server in fixture teardown
Apr 14, 2026
6582bc1
fix: use --extra-index-url instead of --index-url for Azure feed
Apr 15, 2026
412b5a2
fix: standardize skipping generated_tests/generated_samples in CI checks
Apr 15, 2026
38c2240
fix: use --no-deps for Azure DevOps feed installs
Apr 15, 2026
8ea4926
chore: bump black to 26.3.1
Apr 15, 2026
ee5a2f8
format and lint
Apr 15, 2026
dda5f51
add apiview gen to gitignore
Apr 15, 2026
69927e9
fix: set tsconfigRootDir in eslint config to resolve ambiguity
Apr 15, 2026
2f07c46
fix: add --no-cache to uv pip install to prevent cross-flavor contami…
Apr 15, 2026
7768671
perf: reduce CI time by combining tox envs and increasing parallelism
Apr 15, 2026
a28e1c9
perf: batch black formatting and increase install batch size
Apr 15, 2026
6192c1a
perf: pre-build wheels and split docs for parallelism
Apr 15, 2026
50cd792
chore: remove generated SDKs from repo, keep only custom _patch.py files
Apr 15, 2026
f87f84b
docs: note custom _patch.py files in authentication-api-key config
Apr 15, 2026
2c55ef5
Revert "docs: note custom _patch.py files in authentication-api-key c…
Apr 15, 2026
5bd93f2
Revert "chore: remove generated SDKs from repo, keep only custom _pat…
Apr 15, 2026
fd36dc1
fix: add SDK deps to sphinx tox envs for import resolution
Apr 15, 2026
1442e94
perf: split check into parallel lint/mypy/pyright envs
Apr 16, 2026
fd26c83
chore: formatting fixes and simplify emitter-prep-for-pr skill
Apr 16, 2026
0f191b5
Merge remote-tracking branch 'upstream/main' into python/addBackApiVi…
Apr 16, 2026
d532da3
fix: pass wheel file paths instead of source dirs for --no-index install
Apr 16, 2026
d29a4a1
fix: use pip instead of uv for Azure DevOps feed installs in apiview/…
Apr 17, 2026
3641bc0
fix: use --extra-index-url without --no-deps for lint pylint plugin
Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
changeKind: internal
packages:
- "@typespec/http-client-python"
---

Add apiview and sphinx to ci
257 changes: 51 additions & 206 deletions .github/skills/emitter-prep-for-pr/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: >
# Emitter Prep for PR

Prepares language emitter changes for pull request by running build/format/lint,
creating a changeset with an appropriate message, and pushing to the remote branch.
checking for a changeset, and pushing to the remote branch.

**This skill is for language emitter packages only:**

Expand All @@ -24,276 +24,121 @@ Do NOT use this skill for core TypeSpec packages (compiler, http, openapi3, etc.

## Workflow

### Step 1: Identify changed language emitter packages
### Step 1: Determine the emitter package

Determine which language emitter packages have changes:
Figure out which emitter package the user is working on from context (cwd, recent
changes, or ask). The package will be under `packages/<package-name>/`.

```bash
cd ~/Desktop/github/typespec

# Compare against upstream/main (microsoft/typespec) if available, otherwise main
BASE_BRANCH=$(git rev-parse --verify upstream/main 2> /dev/null && echo "upstream/main" || echo "main")

# Filter for language emitter packages only
git diff "$BASE_BRANCH" --name-only | grep "^packages/http-client-" | cut -d'/' -f2 | sort -u
```

This filters for `http-client-python`, `http-client-csharp`, `http-client-java`, etc.

### Step 2: Validate each changed emitter package

For each changed emitter package (e.g., `http-client-python`, `http-client-csharp`, `http-client-java`):
### Step 2: Build, format, and lint the emitter package

```bash
cd ~/Desktop/github/typespec/packages/PACKAGE_NAME

# Build
npm run build
if [ $? -ne 0 ]; then
echo "Build failed for PACKAGE_NAME"
exit 1
fi

# Format
# Format (includes both TypeScript and Python formatting)
npm run format
if [ $? -ne 0 ]; then
echo "Format failed for PACKAGE_NAME"
exit 1
fi

# Lint (if available)
npm run lint 2> /dev/null || echo "No lint script for PACKAGE_NAME"
# Lint (emitter-only is fine for quick validation)
npm run lint -- --emitter
```

If any step fails, report the error and stop. Do not proceed to changeset.

### Step 3: Run format and spell check at repo root
If any step fails, report the error and stop. Do not proceed.

After validating individual packages, run format and spell check at the repo root:
### Step 3: Run format at repo root

```bash
cd ~/Desktop/github/typespec

# Format all files
pnpm format

# Spell check
pnpm cspell
```

If spell check fails, either fix the typos or add words to the cspell dictionary.
**Important:** `pnpm format` may touch files outside the emitter package (e.g.,
`.devcontainer/`, other packages). When staging changes in Step 6, **only stage
files within the emitter package directory** (`packages/PACKAGE_NAME/`) and
`.chronus/changes/` and `.github/skills/`. Discard any formatting changes to
unrelated files with `git checkout -- <file>`.

### Step 4: Analyze changes for changeset message
### Step 4: Check for existing changeset

Examine the changes to determine an appropriate changeset message:
Check if a changeset already exists for the current branch:

```bash
cd ~/Desktop/github/typespec

# Determine base branch
BASE_BRANCH=$(git rev-parse --verify upstream/main 2> /dev/null && echo "upstream/main" || echo "main")

# Get commit messages on this branch
git log "$BASE_BRANCH"..HEAD --oneline

# Get changed files
git diff "$BASE_BRANCH" --name-only

# Get the actual code changes (for understanding intent)
git diff "$BASE_BRANCH" --stat
BRANCH=$(git rev-parse --abbrev-ref HEAD)
ls .chronus/changes/ | grep -i "$BRANCH" || echo "NO_CHANGESET"
```

### Step 5: Determine changeset parameters

Based on the changes, determine:

1. **changeKind** - one of:
- `internal` - Internal changes not user-facing (tests, docs, refactoring)
- `fix` - Bug fixes (patch version bump)
- `feature` - New features (minor version bump)
- `deprecation` - Deprecating existing features (minor version bump)
- `breaking` - Breaking changes (major version bump)
- `dependencies` - Dependency bumps (patch version bump)
- If a changeset **exists**: Skip to Step 6 (no need to create one).
- If **NO_CHANGESET**: Proceed to Step 5 to create one.

2. **packages** - affected packages, e.g.:
- `@typespec/http-client-python`
- `@typespec/http-client-csharp`
- `@typespec/http-client-java`
### Step 5: Create changeset (only if none exists)

3. **message** - concise description of the change
Ask the user what kind of change this is, or infer from context:

### Step 6: Create changeset file
1. **changeKind** - one of: `internal`, `fix`, `feature`, `deprecation`, `breaking`, `dependencies`
2. **message** - concise user-focused description

Create a changeset file in `.chronus/changes/`:
Then create the file:

```bash
cd ~/Desktop/github/typespec

# Generate filename with timestamp
BRANCH=$(git rev-parse --abbrev-ref HEAD)
TIMESTAMP=$(date +"%Y-%m-%d-%H-%M-%S")
FILENAME=".chronus/changes/BRANCH_NAME-${TIMESTAMP}.md"
FILENAME=".chronus/changes/${BRANCH}-${TIMESTAMP}.md"
```

cat > "$FILENAME" << 'EOF'
```markdown
---
changeKind: <KIND>
packages:
- "<PACKAGE>"
---

<MESSAGE>
EOF
```

### Step 7: Show changes and prompt user

Display all changes to the user:

```bash
cd ~/Desktop/github/typespec
git status
git diff --stat
```

Then use AskUserQuestion to confirm:

- Show the changeset that will be added
- Show the files that will be committed
- Show which remote will be used: "Will push to `origin`"
- Ask: "Do these changes look good to push to origin?"

Options:

- "Yes, push to origin" - proceed with commit and push to origin
- "Push to different remote" - ask which remote to use instead
- "Edit changeset" - let user modify the changeset message/kind
- "Cancel" - abort without pushing

If user selects "Push to different remote", ask which remote name to use and push to that instead of origin.

### Step 8: Commit and push (if approved)

If user approves, commit the changes:
### Step 6: Stage, commit, and push

```bash
cd ~/Desktop/github/typespec

# Stage all changes
git add -A

# Commit with descriptive message
git commit -m "$(
cat << 'EOF'
<COMMIT_MESSAGE>

Co-Authored-By: Claude Opus 4.5 <[email protected]>
EOF
)"
git status
```

Then push to the user's fork. **Default to `origin`**, but if the user specified a different remote, use that instead:
Show the user what will be committed and ask for confirmation. Then:

```bash
# Get current branch name
BRANCH=$(git rev-parse --abbrev-ref HEAD)
git commit -m "<COMMIT_MESSAGE>

# Push to origin by default (or user-specified remote)
git push -u origin "$BRANCH"
```

### Asking about remote

When prompting the user in Step 7, include the remote that will be used:

- Show: "Will push to `origin` (your fork)"
- If the user says to use a different remote (e.g., "push to `my_fork`"), use that instead

**Important:** Never push directly to the `microsoft/typespec` remote (usually named `upstream`).

## Changeset Message Guidelines

Write changeset messages that are:
Co-authored-by: Copilot <[email protected]>"

1. **User-focused** - Describe the impact on users, not implementation details
2. **Concise** - One sentence, starting with a verb (Add, Fix, Update, Remove)
3. **Specific** - Mention the feature/fix clearly

### Examples by changeKind:

**internal:**

- "Refactor namespace resolution logic for clarity"
- "Add mock API tests for paging scenarios"
- "Update development tooling and skills"

**fix:**

- "Fix incorrect deserialization of nullable enum properties"
- "Fix client initialization when using custom endpoints"

**feature:**
# Always push to origin (user's fork), never upstream
git push origin "$BRANCH"
```

- "Add support for XML serialization in request bodies"
- "Add `@clientOption` decorator for customizing client behavior"
## Changeset Guidelines

**deprecation:**
### changeKind reference

- "Deprecate `legacyMode` option in favor of `compatibilityMode`"
- **internal**: Tests, CI/CD, refactoring, docs, skills — not user-facing
- **fix**: Bug fixes users would notice
- **feature**: New user-facing capabilities
- **deprecation**: Marking something as deprecated
- **breaking**: Removing or changing behavior incompatibly
- **dependencies**: Dependency version bumps

**breaking:**
### Message examples

- "Remove deprecated `v1` client generation mode"
- "Change default serialization format from XML to JSON"
- `internal`: "Improve CI pipeline performance and test infrastructure"
- `fix`: "Fix incorrect deserialization of nullable enum properties"
- `feature`: "Add support for XML serialization in request bodies"

## Language Emitter Package Names
### Package names

| Folder | Package Name |
| -------------------- | ------------------------------ |
| `http-client-python` | `@typespec/http-client-python` |
| `http-client-csharp` | `@typespec/http-client-csharp` |
| `http-client-java` | `@typespec/http-client-java` |

## Notes

### When to use each changeKind

- **internal**: Tests, documentation, refactoring, CI/CD changes, skill updates
- **fix**: Bug fixes that users would notice
- **feature**: New capabilities users can use
- **deprecation**: Marking something as deprecated (still works, but discouraged)
- **breaking**: Removing or changing behavior in incompatible ways

### Multiple packages

If changes affect multiple packages **with the same change kind**, list all of them in a single changeset:

```yaml
packages:
- "@typespec/http-client-python"
- "@typespec/http-client-csharp"
```

**If packages have different change kinds, create separate changeset files for each.** For example, if the PR adds a feature to `@typespec/http-client-python` and fixes a bug in `@typespec/http-client-csharp`, create two files:

```yaml
# File 1: feature for python
changeKind: feature
packages:
- "@typespec/http-client-python"
```

```yaml
# File 2: fix for csharp
changeKind: fix
packages:
- "@typespec/http-client-csharp"
```

### Skipping changeset

Some changes don't need a changeset:

- Changes only to `.github/skills/` (CI will allow this)
- Changes only to test files (if marked in `changedFiles` config)
- Changes only to markdown files (if marked in `changedFiles` config)

Check `.chronus/config.yaml` for `changedFiles` patterns that are excluded.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ packages/http-client-python/tests/**/cadl-ranch-coverage.json
!packages/http-client-python/package-lock.json
packages/http-client-python/micropip.lock
packages/http-client-python/venv_build_wheel/
packages/http-client-python/tests/**.json

# http-server-js emitter
packages/http-server-js/test/e2e/generated
.pnpm-store/
packages/http-client-python/tests/.uv-cache/
packages/http-client-python/tests/.wheels/
Loading
Loading