55 Commits

Author SHA1 Message Date
boukeversteegh
1d7ba850e9 Reorder methods, use BETTERPROTO_DUMP for dump env var, docs. 2020-07-09 23:09:34 +02:00
boukeversteegh
72d72b4603 Merge remote-tracking branch 'daniel/master' into fix/service-input-message
# Conflicts:
#	betterproto/plugin.py
2020-07-08 23:00:32 +02:00
Bouke Versteegh
3273ae4d2c
Merge pull request #100 from boukeversteegh/fix/circular-dependencies
Import bug - Circular Dependencies
2020-07-07 21:45:06 +02:00
Arun Babu Neelicattu
0f3ad25770 Minor non-functional changes
- fix few typos
- remove unused imports
- fix minor code-quality issues
- replace `grpclib._protocols` with `grpclib._typing`
- fix boolean and None assertions in test cases
2020-07-07 19:23:38 +02:00
boukeversteegh
3f519d4fb1 Fixes #23 again, a broken test made it seem the issue was fixed before. 2020-07-05 17:14:53 +02:00
boukeversteegh
dedead048f Read proto objects before services 2020-07-05 13:10:25 +02:00
boukeversteegh
87b3a4b86d Move parsing of protobuf data types and services into separate methods 2020-07-05 12:27:06 +02:00
boukeversteegh
f2e87192b0 Clarify variable names 2020-07-05 12:24:21 +02:00
boukeversteegh
98d00f0d21 Supports running plugin.py standalone by reading from a dump-file, so its possible to debug it. 2020-07-05 12:20:55 +02:00
boukeversteegh
23dcbc2695 Fixes circular import problem when a non-circular dependency triangle is flattened into two python packages 2020-07-04 15:49:55 +02:00
boukeversteegh
0af0cf4bfb Fixes circular import problem when a non-circular dependency triangle is flattened into two python packages 2020-07-04 15:35:42 +02:00
boukeversteegh
f4ebcb0f65 Merge remote-tracking branch 'daniel/master' into fix/imports
# Conflicts:
#	Pipfile
#	README.md
#	betterproto/__init__.py
#	betterproto/plugin.py
#	betterproto/tests/util.py
2020-07-01 12:19:25 +02:00
nat
0c5d1ff868
Merge branch 'master' into client-streaming 2020-06-23 22:02:23 +02:00
Bouke Versteegh
1ecbf1a125
Merge pull request #90 from jameslan/fix/fixed-types
fixed field types should be int
2020-06-15 19:48:31 +02:00
Nat Noordanus
c8229e53a7 Fix most mypy warnings 2020-06-15 00:19:07 +02:00
Nat Noordanus
4b6f55dce5 Finish implementation and testing of client
Including stream_unary and stream_stream call methods.

Also
- improve organisation of relevant tests
- fix some generated type annotations
- Add AsyncChannel utility cos it's useful
2020-06-14 23:04:52 +02:00
Nat Noordanus
09f821921f Move ServiceStub to a seperate module and add more rpcs to service test 2020-06-14 22:19:51 +02:00
Hans Lellelid
a757da1b29 Adding basic support (untested) for client streaming 2020-06-14 22:19:51 +02:00
boukeversteegh
e2d672a422 Fix terminology, improve docstrings and add missing asserts to tests 2020-06-14 21:40:12 +02:00
boukeversteegh
87f4b34930 Revert "Support running plugin without installing betterproto"
This reverts commit c88edfd0
2020-06-14 16:52:33 +02:00
boukeversteegh
2c360a55f2 Readability for generating init_files 2020-06-14 16:51:52 +02:00
James Lan
04dce524aa fixed field types should be int 2020-06-12 17:04:56 -07:00
boukeversteegh
c88edfd093 Support running plugin without installing betterproto 2020-06-12 13:54:14 +02:00
boukeversteegh
8567892352 Simplify logic for generating package init files 2020-06-11 13:55:11 +02:00
boukeversteegh
fdf3b2e764 Compile proto files based on package structure 2020-06-11 13:55:11 +02:00
boukeversteegh
f7c2fd1194 Support nested messages, fix casing. Support test-cases in packages. 2020-06-11 13:55:11 +02:00
boukeversteegh
f7769a19d1 Pass betterproto option using custom_opt instead of environment variable 2020-06-06 12:51:37 +02:00
boukeversteegh
919b0a6a7d Check if betterproto has wrapper support in idiomatic way 2020-06-04 00:02:28 +02:00
Bouke Versteegh
ff14948a4e Use raw string for regex
Co-authored-by: nat <nat.noordanus@gmail.com>
2020-06-04 00:02:28 +02:00
boukeversteegh
2f658df666 Use betterproto wrapper classes, extract to module for testability 2020-06-04 00:02:28 +02:00
boukeversteegh
2a3e1e1827 Add basic support for all google.protobuf types 2020-06-03 23:58:47 +02:00
boukeversteegh
53ce1255d3 Do not unwrap google.protobuf.Value and unsupported wrapper types 2020-06-03 23:58:47 +02:00
boukeversteegh
f087c6c9bd Support compiling google protobuf files 2020-06-03 23:54:43 +02:00
nat
91111ab7d8 Make plugin import errors more helpful
This addresses an issue where if the user happens to have black installed in
their environment but not the other dependencies when running the protoc
plugin then the resulting import error (No module named 'google') is not very
helpful.
2020-05-30 16:08:36 +02:00
Nat Noordanus
cd1c2dc3b5 Rename template file to avoid confusing black or other build tools 2020-05-27 11:25:19 +02:00
Nat Noordanus
be2a24d15c blacken 2020-05-27 11:25:00 +02:00
boukeversteegh
8f0caf1db2 Read desired wrapper type directly from wrapper definition 2020-05-24 14:50:56 +02:00
boukeversteegh
b711d1e11f Merge remote-tracking branch 'daniel/master' into pr/wrapper-as-output 2020-05-24 10:41:40 +02:00
Nat Noordanus
5e2d9febea Blacken 2020-05-23 23:37:22 +02:00
Bouke Versteegh
7e9ba0866c
cleanup 2020-05-21 22:55:26 +02:00
boukeversteegh
499489f1d3 Support using Google's wrapper types as RPC output values 2020-05-10 16:36:29 +02:00
Adam Ehlers Nyholm Thomsen
36a14026d8
Fix issue that occurs with naming when proto is double nested (#21) 2020-04-15 14:10:43 +10:00
Daniel G. Taylor
33f74f6a45
Fix comment indent bug; bump version 2019-10-29 21:59:23 -07:00
Daniel G. Taylor
7e2dc595db
Autoformat files after rendering 2019-10-28 20:44:50 -07:00
Daniel G. Taylor
035793aec3
Support wrapper types 2019-10-27 14:55:25 -07:00
Daniel G. Taylor
c79535b614
Support Duration/Timestamp Google well-known types 2019-10-26 23:07:30 -07:00
Daniel G. Taylor
5daf61f64c
Refactor default value code 2019-10-25 21:16:32 -07:00
Daniel G. Taylor
4679c571c3
Fix comment newlines 2019-10-25 12:28:26 -07:00
Daniel G. Taylor
ff8463cf12
Handle fields that clash with Python reserved keywords 2019-10-23 21:28:31 -07:00
Daniel G. Taylor
eff9021529
Some informational output from the plugin, do not overwrite __init__.py 2019-10-23 15:07:05 -07:00