Skip to content

Conversation

samestep
Copy link
Contributor

@samestep samestep commented Apr 7, 2021

This PR

  • adds a tools/translate_annotations.py script that
  • modifies the flake8-py3 and clang-tidy jobs to use that script and thus upload JSON in their artifacts instead of raw text; and
  • modifies the "Add annotations" workflow to specify mode: json to allow it to use those preprocessed annotations.

Depends on pytorch/add-annotations-github-action#18.

Test plan:

You can run the unit tests with this command:

python tools/test/test_translate_annotations.py

I also tested the entire system together in my personal sandbox repo.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Apr 7, 2021

💊 CI failures summary and remediations

As of commit 74fc3f8 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@codecov
Copy link

codecov bot commented Apr 8, 2021

Codecov Report

Merging #55569 (c6447f8) into master (ffe3018) will increase coverage by 0.00%.
The diff coverage is n/a.

❗ Current head c6447f8 differs from pull request most recent head 85e785e. Consider uploading reports for the commit 85e785e to get more accurate results

@@           Coverage Diff           @@
##           master   #55569   +/-   ##
=======================================
  Coverage   77.42%   77.42%           
=======================================
  Files        1891     1895    +4     
  Lines      187544   187529   -15     
=======================================
+ Hits       145199   145201    +2     
+ Misses      42345    42328   -17     

@samestep samestep marked this pull request as ready for review April 8, 2021 21:48
@samestep samestep requested review from a team, janeyx99, malfet and seemethere April 8, 2021 21:48
@facebook-github-bot
Copy link
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@samestep samestep requested a review from a team April 8, 2021 23:14
@facebook-github-bot
Copy link
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Co-authored-by: Nikita Shulga <nikita.shulga@gmail.com>
@facebook-github-bot
Copy link
Contributor

@samestep has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@samestep merged this pull request in f3367f9.

@samestep samestep deleted the translate-annotations branch April 12, 2021 14:29
krshrimali pushed a commit to krshrimali/pytorch that referenced this pull request May 19, 2021
Summary:
This PR

- adds a `tools/translate_annotations.py` script that
  - parses annotations into JSON using the regexes that we were previously passing to [`pytorch/add-annotations-github-action`](https://github.com/pytorch/add-annotations-github-action) and
  - uses `git diff-index` to translate the line numbers for those annotations from the PR `merge` onto the PR `head`, since (as of pytorch#54967) we now run CI on the former instead of the latter;
- modifies the `flake8-py3` and `clang-tidy` jobs to use that script and thus upload JSON in their artifacts instead of raw text; and
- modifies the "Add annotations" workflow to specify `mode: json` to allow it to use those preprocessed annotations.

Depends on pytorch/add-annotations-github-action#18.

Pull Request resolved: pytorch#55569

Test Plan:
You can run the unit tests with this command:
```
python tools/test/test_translate_annotations.py
```
I also tested the entire system together in my personal sandbox repo.

Reviewed By: malfet

Differential Revision: D27662161

Pulled By: samestep

fbshipit-source-id: ecca51b79b9cf00c90fd89f0d41d0c7b89d69c63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants