Skip to content

Conversation

@dhruvmanila
Copy link
Member

@dhruvmanila dhruvmanila commented Jul 25, 2025

Summary

This PR adds a workflow to comment the diff of diagnostics when running ty between main and a pull request on the typing conformance test suite.

The main workflow is introduced in #19555 which this workflow depends on. This workflow is similar to the mypy primer comment workflow.

Test Plan

I cannot test this workflow without merging it on main unless anyone knows a way to do this.

@dhruvmanila dhruvmanila added ci Related to internal CI tooling ty Multi-file analysis & type inference no-test Disable CI tests for a pull request labels Jul 25, 2025
@dhruvmanila dhruvmanila marked this pull request as ready for review July 25, 2025 14:13
@dhruvmanila dhruvmanila merged commit 53e9e44 into main Jul 25, 2025
38 checks passed
@dhruvmanila dhruvmanila deleted the dhruv/conformance-test-comment branch July 25, 2025 15:24
AlexWaygood pushed a commit that referenced this pull request Jul 25, 2025
…19556)

## Summary

This PR adds a workflow to comment the diff of diagnostics when running
ty between `main` and a pull request on the [typing conformance test
suite](https://github.com/python/typing/tree/main/conformance/tests).

The main workflow is introduced in
#19555 which this workflow depends
on. This workflow is similar to the [mypy primer
comment](https://github.com/astral-sh/ruff/blob/d781a6ab3f44afe5dd1afe1d06fb58fd3739fab5/.github/workflows/mypy_primer_comment.yaml)
workflow.

## Test Plan

I cannot test this workflow without merging it on `main` unless anyone
knows a way to do this.
dcreager added a commit that referenced this pull request Jul 25, 2025
* main:
  [ty] Added support for "document symbols" and "workspace symbols" (#19521)
  Add `TextEmitter::with_color` and disable colors in `unreadable_files` test (#19562)
  [ty] Added support for document highlights in playground. (#19540)
  [`refurb`] Ignore decorated functions for `FURB118` (#19339)
  [ty] Add workflow to comment diagnostic diff for conformance tests (#19556)
dhruvmanila added a commit that referenced this pull request Jul 28, 2025
## Summary

Follow-up to #19556, this PR adds
the workflow that computes the diagnostic diff which the workflow
introduced in the linked PR will add as a comment.

This workflow is similar to the [ty ecosystem-analyzer
workflow](https://github.com/astral-sh/ruff/blob/d781a6ab3f44afe5dd1afe1d06fb58fd3739fab5/.github/workflows/ty-ecosystem-analyzer.yaml).

Closes: astral-sh/ty#212

## Test Plan

1. Initially there's no diff to show
2. This
[commit](d0db993)
comments out a rule which updates the comment with the diff
3. Later, that commit is reverted and the diff goes away

Use the comment history to look at the diff output where the order of
the history corresponds to the steps mentioned above in reverse order
i.e., the edit in the middle will contain the diff output:

<img width="1082" height="313" alt="Screenshot 2025-07-25 at 21 09 26"
src="https://github.com/user-attachments/assets/6aceb60c-1987-4b9a-9063-e3999844f035"
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Related to internal CI tooling no-test Disable CI tests for a pull request ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants