-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add mypy plugins to community (#470)
- Loading branch information
Showing
14 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source: | ||
github: | ||
owner: nipunn1313 | ||
repository: mypy-protobuf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
FROM python:3.11.2-alpine3.17 AS build | ||
WORKDIR /app | ||
RUN python -mvenv /app | ||
ADD /requirements.txt requirements.txt | ||
RUN source ./bin/activate \ | ||
&& pip install --no-cache-dir -r requirements.txt \ | ||
&& pip uninstall --yes pip setuptools \ | ||
&& rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ | ||
&& rm -f bin/protoc-gen-mypy | ||
|
||
FROM python:3.11.2-alpine3.17 | ||
COPY --from=build --link /app /app | ||
USER nobody | ||
ENTRYPOINT [ "/app/bin/protoc-gen-mypy_grpc" ] |
9 changes: 9 additions & 0 deletions
9
plugins/community/nipunn1313-mypy-grpc/v3.4.0/buf.plugin.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: v1 | ||
name: buf.build/community/nipunn1313-mypy-grpc | ||
plugin_version: v3.4.0 | ||
source_url: https://github.com/nipunn1313/mypy-protobuf | ||
description: Generate mypy stub files for grpcio generated code. | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v3.4.0/LICENSE | ||
output_languages: | ||
- python |
3 changes: 3 additions & 0 deletions
3
plugins/community/nipunn1313-mypy-grpc/v3.4.0/requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mypy-protobuf==3.4.0 | ||
protobuf==4.22.1 | ||
types-protobuf==4.22.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source: | ||
github: | ||
owner: nipunn1313 | ||
repository: mypy-protobuf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* | ||
!Dockerfile | ||
!requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
FROM python:3.11.2-alpine3.17 AS build | ||
WORKDIR /app | ||
RUN python -mvenv /app | ||
ADD /requirements.txt requirements.txt | ||
RUN source ./bin/activate \ | ||
&& pip install --no-cache-dir -r requirements.txt \ | ||
&& pip uninstall --yes pip setuptools \ | ||
&& rm -f requirements.txt bin/activate.fish bin/activate.csh bin/Activate.ps1 \ | ||
&& rm -f bin/protoc-gen-mypy_grpc | ||
|
||
FROM python:3.11.2-alpine3.17 | ||
COPY --from=build --link /app /app | ||
USER nobody | ||
ENTRYPOINT [ "/app/bin/protoc-gen-mypy" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: v1 | ||
name: buf.build/community/nipunn1313-mypy | ||
plugin_version: v3.4.0 | ||
source_url: https://github.com/nipunn1313/mypy-protobuf | ||
description: Generate mypy stub files from Protobuf definitions. | ||
spdx_license_id: Apache-2.0 | ||
license_url: https://github.com/nipunn1313/mypy-protobuf/blob/v3.4.0/LICENSE | ||
output_languages: | ||
- python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
mypy-protobuf==3.4.0 | ||
protobuf==4.22.1 | ||
types-protobuf==4.22.0.2 |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.4.0/eliza/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:A9N7pBCImjZXsRR9ABT9dmXFavxnOQRDMKxaM/RtxfQ= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/community/nipunn1313-mypy-grpc/v3.4.0/petapis/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:MWz8GNw9QHRiQZ1FZ/twTTwpQleK+Msf9BckmRsbSEg= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/community/nipunn1313-mypy/v3.4.0/eliza/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:g9p6eDyJyzHhp8zDP3ZbYIBl/CMoG5d8Q8mjMusOqY8= |
1 change: 1 addition & 0 deletions
1
tests/testdata/buf.build/community/nipunn1313-mypy/v3.4.0/petapis/plugin.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
h1:Si8XgIwUSUICXMVOAqHgRd4rUeUb7bEyD8yos4Ko2t8= |