This is an automated email from the ASF dual-hosted git repository.

lostluck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 5674f181412 [BEAM-14347] Rename registration package to register 
(#17603)
5674f181412 is described below

commit 5674f181412d6a3ab17d891ef45c4382562b3235
Author: Danny McCormick <[email protected]>
AuthorDate: Tue May 10 19:44:29 2022 -0400

    [BEAM-14347] Rename registration package to register (#17603)
---
 .github/codecov.yml                                      |  4 ++--
 sdks/go/pkg/beam/{registration => register}/doc.go       |  8 ++++----
 sdks/go/pkg/beam/{registration => register}/emitter.go   |  8 ++++----
 .../example_register_test.go}                            | 16 ++++++++--------
 sdks/go/pkg/beam/{registration => register}/iter.go      |  6 +++---
 .../registration.go => register/register.go}             |  4 ++--
 .../registration.tmpl => register/register.tmpl}         |  4 ++--
 .../registration_test.go => register/register_test.go}   |  2 +-
 8 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/.github/codecov.yml b/.github/codecov.yml
index f99b16d129e..0eaf91cdbdd 100644
--- a/.github/codecov.yml
+++ b/.github/codecov.yml
@@ -63,9 +63,9 @@ ignore:
   - "**/*_test.py"
   - "**/*_test_py3*.py"
   - "**/*_microbenchmark.py"
-  - "sdks/go/pkg/beam/registration/registration.go"
+  - "sdks/go/pkg/beam/register/register.go"
 
 # See https://docs.codecov.com/docs/flags for options.
 flag_management:
   default_rules: # the rules that will be followed for any flag added, 
generally
-    carryforward: true # recommended for multi-lang mono-repos.
\ No newline at end of file
+    carryforward: true # recommended for multi-lang mono-repos.
diff --git a/sdks/go/pkg/beam/registration/doc.go 
b/sdks/go/pkg/beam/register/doc.go
similarity index 77%
rename from sdks/go/pkg/beam/registration/doc.go
rename to sdks/go/pkg/beam/register/doc.go
index 6ef22eef102..a8178df37ec 100644
--- a/sdks/go/pkg/beam/registration/doc.go
+++ b/sdks/go/pkg/beam/register/doc.go
@@ -14,17 +14,17 @@
 // limitations under the License.
 
 //go:generate go install github.com/apache/beam/sdks/v2/go/cmd/specialize
-//go:generate specialize --package=registration --input=registration.tmpl 
--x=data,universals --imports=typex
+//go:generate specialize --package=register --input=register.tmpl 
--x=data,universals --imports=typex
 //go:generate go fmt
 
 /*
-Package registration contains functions for registering and optimizing your 
DoFn.
+Package register contains functions for registering and optimizing your DoFn.
 
-This package contains generic registration/optimization function for each 
possible combination of input and output arities in a DoFn's ProcessElement 
function.
+This package contains generic register/optimization function for each possible 
combination of input and output arities in a DoFn's ProcessElement function.
 For example, given a DoFn with a ProcessElement function that takes 4 inputs 
and returns 3 outputs, you can call
 register.DoFn4x3[input1 type, input2 type, input3 type, input4 type, output1 
type, output2 type, output3 type](&doFn{}) during pipeline construction. This 
will
 register your DoFn and produce optimized callers for your DoFn to 
significantly speed up execution at runtime.
 
 See DoFn2x1 for a full example.
 */
-package registration
+package register
diff --git a/sdks/go/pkg/beam/registration/emitter.go 
b/sdks/go/pkg/beam/register/emitter.go
similarity index 95%
rename from sdks/go/pkg/beam/registration/emitter.go
rename to sdks/go/pkg/beam/register/emitter.go
index 347aa641272..6c88d28d9fc 100644
--- a/sdks/go/pkg/beam/registration/emitter.go
+++ b/sdks/go/pkg/beam/register/emitter.go
@@ -13,7 +13,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package registration
+package register
 
 import (
        "context"
@@ -123,7 +123,7 @@ func (e *emit2WithTimestamp[T1, T2]) invoke(et 
typex.EventTime, key T1, val T2)
 // Emitter1 registers parameters from your DoFn with a
 // signature func(T) and optimizes their execution.
 // This must be done by passing in type parameters of your input as a 
constraint,
-// aka: registration.Emitter1[T]()
+// aka: register.Emitter1[T]()
 func Emitter1[T1 any]() {
        e := (*func(T1))(nil)
        registerFunc := func(n exec.ElementProcessor) exec.ReusableEmitter {
@@ -135,7 +135,7 @@ func Emitter1[T1 any]() {
 // Emitter2 registers parameters from your DoFn with a
 // signature func(T1, T2) and optimizes their execution.
 // This must be done by passing in type parameters of all inputs (including 
EventTime)
-// as constraints, aka: registration.Emitter2[T1, T2](), where T2 is the type 
of your
+// as constraints, aka: register.Emitter2[T1, T2](), where T2 is the type of 
your
 // value and T2 is either the type of your key or the eventTime.
 func Emitter2[T1, T2 any]() {
        e := (*func(T1, T2))(nil)
@@ -153,7 +153,7 @@ func Emitter2[T1, T2 any]() {
 // Emitter3 registers parameters from your DoFn with a
 // signature func(T1, T2, T3) and optimizes their execution.
 // This must be done by passing in type parameters of all inputs as 
constraints,
-// aka: registration.Emitter3[beam.EventTime, T1, T2](), where T1 is the type 
of
+// aka: register.Emitter3[beam.EventTime, T1, T2](), where T1 is the type of
 // your key and T2 is the type of your value.
 func Emitter3[T1 typex.EventTime, T2, T3 any]() {
        e := (*func(T1, T2, T3))(nil)
diff --git a/sdks/go/pkg/beam/registration/example_registration_test.go 
b/sdks/go/pkg/beam/register/example_register_test.go
similarity index 83%
rename from sdks/go/pkg/beam/registration/example_registration_test.go
rename to sdks/go/pkg/beam/register/example_register_test.go
index 9392e758984..0b5de858183 100644
--- a/sdks/go/pkg/beam/registration/example_registration_test.go
+++ b/sdks/go/pkg/beam/register/example_register_test.go
@@ -13,14 +13,14 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package registration_test
+package register_test
 
 import (
        "context"
 
        "github.com/apache/beam/sdks/v2/go/pkg/beam"
        "github.com/apache/beam/sdks/v2/go/pkg/beam/core/graph/mtime"
-       "github.com/apache/beam/sdks/v2/go/pkg/beam/registration"
+       "github.com/apache/beam/sdks/v2/go/pkg/beam/register"
 )
 
 type myDoFn struct{}
@@ -69,19 +69,19 @@ func ExampleDoFn2x1() {
        // Since myDoFn's ProcessElement call has 2 inputs and 1 output, call 
DoFn2x1.
        // Since the inputs to ProcessElement are (string, func(int)), and the 
output
        // is int, we pass those parameter types to the function.
-       registration.DoFn3x1[string, func(*string) bool, func(int), 
int](&myDoFn{})
+       register.DoFn3x1[string, func(*string) bool, func(int), int](&myDoFn{})
 
        // Any function parameters (iters or emitters) must be registered 
separately
        // as well to get the fully optimized experience. Since ProcessElement 
has
        // an emitter with the signature func(int) we can register it. This 
must be
        // done by passing in the type parameters of all inputs as constraints.
-       registration.Emitter1[int]()
-       registration.Iter1[string]()
+       register.Emitter1[int]()
+       register.Iter1[string]()
 
-       registration.DoFn3x3[string, func(**Foo, *beam.EventTime) bool, 
func(beam.EventTime, string, int), beam.EventTime, string, int](&myDoFn2{})
+       register.DoFn3x3[string, func(**Foo, *beam.EventTime) bool, 
func(beam.EventTime, string, int), beam.EventTime, string, int](&myDoFn2{})
 
        // More complex iter/emitter registration work in the same way, even 
when
        // timestamps or pointers are involved.
-       registration.Emitter3[beam.EventTime, string, int]()
-       registration.Iter2[*Foo, beam.EventTime]()
+       register.Emitter3[beam.EventTime, string, int]()
+       register.Iter2[*Foo, beam.EventTime]()
 }
diff --git a/sdks/go/pkg/beam/registration/iter.go 
b/sdks/go/pkg/beam/register/iter.go
similarity index 97%
rename from sdks/go/pkg/beam/registration/iter.go
rename to sdks/go/pkg/beam/register/iter.go
index 4a1e69b4dba..71d3f3df723 100644
--- a/sdks/go/pkg/beam/registration/iter.go
+++ b/sdks/go/pkg/beam/register/iter.go
@@ -13,7 +13,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package registration
+package register
 
 import (
        "fmt"
@@ -107,7 +107,7 @@ func (v *iter2[T1, T2]) invoke(key *T1, value *T2) bool {
 // Iter1 registers parameters from your DoFn with a
 // signature func(*T) bool and optimizes their execution.
 // This must be done by passing in type parameters of all inputs as 
constraints,
-// aka: registration.Iter1[T]()
+// aka: register.Iter1[T]()
 func Iter1[T any]() {
        i := (*func(*T) bool)(nil)
        registerFunc := func(s exec.ReStream) exec.ReusableInput {
@@ -119,7 +119,7 @@ func Iter1[T any]() {
 // Iter1 registers parameters from your DoFn with a
 // signature func(*T1, *T2) bool and optimizes their execution.
 // This must be done by passing in type parameters of all inputs as 
constraints,
-// aka: registration.Iter2[T1, T2]()
+// aka: register.Iter2[T1, T2]()
 func Iter2[T1, T2 any]() {
        i := (*func(*T1, *T2) bool)(nil)
        registerFunc := func(s exec.ReStream) exec.ReusableInput {
diff --git a/sdks/go/pkg/beam/registration/registration.go 
b/sdks/go/pkg/beam/register/register.go
similarity index 99%
rename from sdks/go/pkg/beam/registration/registration.go
rename to sdks/go/pkg/beam/register/register.go
index 95057a428ae..caeb687bcea 100644
--- a/sdks/go/pkg/beam/registration/registration.go
+++ b/sdks/go/pkg/beam/register/register.go
@@ -15,9 +15,9 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Code generated from registration.tmpl. DO NOT EDIT.
+// Code generated from register.tmpl. DO NOT EDIT.
 
-package registration
+package register
 
 import (
        "context"
diff --git a/sdks/go/pkg/beam/registration/registration.tmpl 
b/sdks/go/pkg/beam/register/register.tmpl
similarity index 99%
rename from sdks/go/pkg/beam/registration/registration.tmpl
rename to sdks/go/pkg/beam/register/register.tmpl
index f73c0e323e2..459b97e321f 100644
--- a/sdks/go/pkg/beam/registration/registration.tmpl
+++ b/sdks/go/pkg/beam/register/register.tmpl
@@ -112,9 +112,9 @@ func build{{$upperName}}Wrapper(doFn interface{}) 
func(interface{}) reflectx.Fun
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-// Code generated from registration.tmpl. DO NOT EDIT.
+// Code generated from register.tmpl. DO NOT EDIT.
 
-package registration
+package register
 
 import (
        "context"
diff --git a/sdks/go/pkg/beam/registration/registration_test.go 
b/sdks/go/pkg/beam/register/register_test.go
similarity index 99%
rename from sdks/go/pkg/beam/registration/registration_test.go
rename to sdks/go/pkg/beam/register/register_test.go
index 2b535692ff2..e89b2c12310 100644
--- a/sdks/go/pkg/beam/registration/registration_test.go
+++ b/sdks/go/pkg/beam/register/register_test.go
@@ -13,7 +13,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package registration
+package register
 
 import (
        "context"

Reply via email to