Commit Graph

19 Commits

Author SHA1 Message Date
Sergii Tkachenko de6ed9ba9f
[Python] Migrate from yapf to black (#33138)
- Switched  from yapf to black
- Reconfigure isort for black
- Resolve black/pylint idiosyncrasies 

Note: I used `--experimental-string-processing` because black was
producing "implicit string concatenation", similar to what described
here: https://github.com/psf/black/issues/1837. While currently this
feature is experimental, it will be enabled by default:
https://github.com/psf/black/issues/2188. After running black with the
new string processing so that the generated code merges these `"hello" "
world"` strings concatenations, then I removed
`--experimental-string-processing` for stability, and regenerated the
code again.

To the reviewer: don't even try to open "Files Changed" tab 😄 It's
better to review commit-by-commit, and ignore `run black and isort`.
2023-06-09 15:08:55 -07:00
Jan Tattermusch 740932c899
Make remaining objc test jobs to pass on MacOS monterey (#32493)
Make remaining objC jobs compatible with kokoro monterey workers and
prepare for boringssl upgrade.

The changes here are taken from https://github.com/grpc/grpc/pull/32357,
but they should be merged in a separate PR
(we need the changes to be able to upgrade to monterey anyway and
there's no reason to make the boringssl upgrade PR more complicated by
bundling more fixes into it).

I've checked that the grpc_basictests_objc_examples and
grpc_ios_binary_size are green if switched to monterey.
Unfortunately it's hard to make grpc_basictests_objc_examples pass on
both monterey and mojave, so I suggest merging this PR at the same time
as CL to upgrade the kokoro jobs to monterey.
- that way both PR and continuous runs will remain green
- older branches would need a backport anyway

---------

Co-authored-by: Hannah Shi <hannahshisfb@gmail.com>
2023-03-01 09:55:33 +01:00
Jan Tattermusch c33963d371
iOS binary size script cleanup (#29377)
* iOS binary size script cleanup

* add job cfg for running iOS binary size on master
2022-04-14 11:01:16 +02:00
Richard Belleville 59693b7e72
Migrate Infrastructure Scripts to Python 3 (#27135)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Migrate tools/distrib directory to python 3

* Remove unnecessary shebang

* Restore line_count directory

* Immediately convert subprocess.check_output output to string

* Take care of Python 2 shebangs

* Invoke scripts using a Python 3 interpreter

* Yapf. Isort

* Try installing Python 3 first

* See if we have any Python 3 versions installed

* Add Python 3.7 to Windows path

* Try adding a symlink

* Try to symlink differently

* Install six for Python 3

* Run run_interop_tests with python 3

* Try installing six in python3.7 explicitly

* Revert "Try installing six in python3.7 explicitly"

This reverts commit 2cf60d72f3.

* And debug some more

* Fix issue with jobset.py

* Add debug for CI failure

* Revert microbenchmark changes
2021-11-08 08:55:25 -08:00
Richard Belleville b6cc72f129
Revert "Run 2to3 on tools directory (#26002)" (#27183)
This reverts commit a388361c3d.
2021-08-30 12:29:20 -07:00
Richard Belleville a388361c3d
Run 2to3 on tools directory (#26002)
* Run 2to3 on tools directory

* Delete github_stats_tracking

* Re-run 2to3

* Remove unused script

* Remove unused script

* Remove unused line count utility

* Yapf. Isort

* Remove accidentally included file

* Restore line_count directory
2021-08-30 09:25:21 -07:00
Lidi Zheng 2231c2ba77
Introduce Python import sorting to our sanity test suite (#26768)
* Add isort_code.sh to sanity tests

* Run tools/distrib/isort_code.sh

* Fine tune the import order for relative imports

* Make pylint and project generation happy

* Fix a few corner cases

* Use --check instead of --diff

* The import order impacts test result somehow

* Make isort print diff and check output at the same time

* Let tools/run_tests/python_utils be firstparty library

* Run isort against latest HEAD
2021-07-26 12:31:21 -07:00
Esun Kim bfdfc9eabc Python3 ios_bin/binary_size.py 2020-11-12 18:48:46 -08:00
Esun Kim 7be821ac47 Yapf all target python sources 2020-01-03 09:25:10 -08:00
Esun Kim f88bd06ee5 Go UPB! 2019-08-06 15:27:14 -07:00
Lidi Zheng 0f0822d53f WIP: Utilize the GitHub Check Feature 2018-12-13 16:40:47 -08:00
Muxi Yan 07f190d2d5 Fix binary_size.py 2018-08-07 17:03:25 -07:00
Muxi Yan e773a9b75f Use /tmpfs on Kokoro for ObjC tests 2018-07-27 14:09:24 -07:00
Muxi Yan 687316c025
Clarify it's Objective-C sizes in comment 2018-07-19 16:55:35 -07:00
Muxi Yan 4df5a4d384 yapf_code 2018-07-10 09:57:43 -07:00
Muxi Yan 252359bbdc CI integration 2018-07-10 09:53:51 -07:00
Muxi Yan eb22c792f2 Provide diff sign for each line 2018-06-07 15:47:14 -07:00
Muxi Yan 9ea0b9f836 Description fix 2018-06-06 14:40:44 -07:00
Muxi Yan a2da1d7b1b Scripts for iOS size audit 2018-06-05 14:19:48 -07:00