203 Commits

Author SHA1 Message Date
boukeversteegh
81711d2427 Avoid naming conflicts when importing multiple types with the same name from an ancestor package 2020-07-01 12:07:59 +02:00
boukeversteegh
e3135ce766 Add parameter for non-strict cased output that preserves delimiter count 2020-07-01 09:39:37 +02:00
boukeversteegh
52eea5ce4c Added missing tests for casing 2020-06-14 23:15:56 +02:00
boukeversteegh
fdbe0205f1 find_module docstring and search for init files instead of directories 2020-06-14 22:54:03 +02:00
boukeversteegh
e2d672a422 Fix terminology, improve docstrings and add missing asserts to tests 2020-06-14 21:40:12 +02:00
boukeversteegh
63f5191f02 Shorten list selectors 2020-06-14 16:54:34 +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
boukeversteegh
32c8e77274 Recompile Google Protobuf files 2020-06-12 13:56:32 +02:00
boukeversteegh
d9fa6d2dd3 Fixes issue where generated Google Protobuf messages imported from betterproto.lib instead of using local forward references 2020-06-12 13:55:55 +02:00
boukeversteegh
c88edfd093 Support running plugin without installing betterproto 2020-06-12 13:54:14 +02:00
boukeversteegh
83e13aa606 Fix method name 2020-06-11 13:55:12 +02:00
boukeversteegh
3ca75dadd7 Remove dependency on stringcase, apply black 2020-06-11 13:55:12 +02:00
boukeversteegh
5d2f3a2cd9 Remove fixed test from xfail list #11 2020-06-11 13:55:12 +02:00
boukeversteegh
65c1f366ef Update readme with new output structure and fix example inconsistencies 2020-06-11 13:55:12 +02:00
boukeversteegh
34c34bd15a Add failing test for importing a message from package that looks like a nested type #87 2020-06-11 13:55:12 +02:00
boukeversteegh
fb54917f2c Detect entry-point of tests automatically 2020-06-11 13:55:12 +02:00
boukeversteegh
1a95a7988e Ensure uniquely generated import aliases are not name mangled (python.org/dev/peps/pep-0008/#id34) 2020-06-11 13:55:11 +02:00
boukeversteegh
76db2f153e Add import aliases to ancestor imports 2020-06-11 13:55:11 +02:00
boukeversteegh
8567892352 Simplify logic for generating package init files 2020-06-11 13:55:11 +02:00
boukeversteegh
3105e952ea Fixes issue where importing cousin where path has a package with the same name broke import 2020-06-11 13:55:11 +02:00
boukeversteegh
7c8d47de6d Add test cases for cousin imports that break due to aliases starting with two underscores 2020-06-11 13:55:11 +02:00
boukeversteegh
c00e2aef19 Break up importing logic in methods 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
d8abb850f8 Update tests to reflect new generated package structure 2020-06-11 13:55:11 +02:00
boukeversteegh
d7ba27de2b fix all broken imports 2020-06-11 13:55:11 +02:00
boukeversteegh
57523a9e7f Implement importing unrelated package 2020-06-11 13:55:11 +02:00
boukeversteegh
e5e61c873c Implement some import scenarios 2020-06-11 13:55:11 +02:00
boukeversteegh
9fd1c058e6 Create unit tests for importing 2020-06-11 13:55:11 +02:00
nat
9a45ea9f16
Merge pull request #78 from boukeversteegh/pr/google
Basic general support for Google Protobuf
2020-06-11 10:50:12 +02:00
boukeversteegh
f7769a19d1 Pass betterproto option using custom_opt instead of environment variable 2020-06-06 12:51:37 +02:00
boukeversteegh
d31f90be6b Combine circular imports 2020-06-04 00:11:22 +02:00
boukeversteegh
919b0a6a7d Check if betterproto has wrapper support in idiomatic way 2020-06-04 00:02:28 +02:00
boukeversteegh
7ecf3fe0e6 Add comment to explain unusual import location 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
Bouke Versteegh
cb00273257 Fix name PROTOBUF_OPTS -> BETTERPROTO_OPTS 2020-06-04 00:02:28 +02:00
boukeversteegh
973d68a154 Add missing field to MockChannel to prevent warnings while testing 2020-06-04 00:02:28 +02:00
boukeversteegh
ab9857b5fd Add test-case for service that returns google protobuf values 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
b813d1cedb Undo adding skip to test 2020-06-03 23:59:10 +02:00
boukeversteegh
f5ce1b7108 Check that config.xfail contains valid test case names 2020-06-03 23:59:10 +02:00
boukeversteegh
62fc421d60 Add failing tests for google.protobuf Struct and Value #9 2020-06-03 23:59:10 +02:00
boukeversteegh
eeed1c0db7 Extend pre-compiled Duration and Timestamp instead of manual definition 2020-06-03 23:58:47 +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
e8991339e9 Use pre-compiled wrapper-classes 2020-06-03 23:54:43 +02:00
boukeversteegh
4556d67503 Include pre-compiled google protobuf classes 2020-06-03 23:54:43 +02:00
boukeversteegh
f087c6c9bd Support compiling google protobuf files 2020-06-03 23:54:43 +02:00
Bouke Versteegh
eec24e4ee8
Merge pull request #77 from danielgtaylor/nat-n-patch-1
Rearrange plugin import to make import errors more helpful
2020-05-30 20:52:35 +02:00