Skip to content

Commit 23a8ed4

Browse files
committed
chore: rename to raystack
1 parent 254183a commit 23a8ed4

128 files changed

Lines changed: 1380 additions & 1315 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release-js-client.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
node-version: "12.x"
1616
registry-url: "https://registry.npmjs.org"
17-
scope: "@odpf"
17+
scope: "@raystack"
1818
- run: npm install
1919
working-directory: clients/js
2020
- run: npm publish --access public

.goreleaser.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ builds:
1212
flags:
1313
- -a
1414
ldflags:
15-
- -X github.com/odpf/stencil/config.Version={{.Tag}}
16-
- -X github.com/odpf/stencil/config.BuildCommit={{.FullCommit}}
17-
- -X github.com/odpf/stencil/config.BuildDate={{.Date}}
15+
- -X github.com/raystack/stencil/config.Version={{.Tag}}
16+
- -X github.com/raystack/stencil/config.BuildCommit={{.FullCommit}}
17+
- -X github.com/raystack/stencil/config.BuildDate={{.Date}}
1818
goos: [darwin, linux, windows]
1919
goarch: [amd64, 386, arm, arm64]
2020
env:
@@ -48,13 +48,13 @@ dockers:
4848
- stencil
4949
dockerfile: Dockerfile
5050
image_templates:
51-
- "docker.io/odpf/{{.ProjectName}}:latest"
52-
- "docker.io/odpf/{{.ProjectName}}:{{ .Version }}"
53-
- "docker.io/odpf/{{.ProjectName}}:{{ .Tag }}-amd64"
51+
- "docker.io/raystack/{{.ProjectName}}:latest"
52+
- "docker.io/raystack/{{.ProjectName}}:{{ .Version }}"
53+
- "docker.io/raystack/{{.ProjectName}}:{{ .Tag }}-amd64"
5454
nfpms:
5555
- maintainer: ODPF
5656
description: Schema registry
57-
homepage: https://github.com/odpf/stencil
57+
homepage: https://github.com/raystack/stencil
5858
license: Apache 2.0
5959
formats:
6060
- deb
@@ -63,17 +63,17 @@ nfpms:
6363
darwin: macOS
6464
scoop:
6565
bucket:
66-
owner: odpf
66+
owner: raystack
6767
name: scoop-bucket
68-
homepage: "https://github.com/odpf/stencil"
68+
homepage: "https://github.com/raystack/stencil"
6969
description: "Schema registry"
7070
license: Apache 2.0
7171
brews:
7272
- name: stencil
73-
homepage: "https://github.com/odpf/stencil"
73+
homepage: "https://github.com/raystack/stencil"
7474
description: "Schema registry"
7575
tap:
76-
owner: odpf
76+
owner: raystack
7777
name: homebrew-tap
7878
license: "Apache 2.0"
7979
folder: Formula

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NAME="github.com/odpf/stencil"
1+
NAME="github.com/raystack/stencil"
22
VERSION=$(shell git describe --always --tags 2>/dev/null)
33
PROTON_COMMIT := "a6c7056fa80128145d00d5ee72f216c28578ec43"
44

@@ -22,9 +22,9 @@ lint: ## Run golang-ci lint
2222
golangci-lint run
2323

2424
proto: ## Generate the protobuf files
25-
@echo " > generating protobuf from odpf/proton"
25+
@echo " > generating protobuf from raystack/proton"
2626
@echo " > [info] make sure correct version of dependencies are installed using 'make install'"
27-
@buf generate https://github.com/odpf/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path odpf/stencil
27+
@buf generate https://github.com/raystack/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path raystack/stencil
2828
@echo " > protobuf compilation finished"
2929

3030
clean: ## Clean the build artifacts

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/
4343
`stencil` is available via a Homebrew Tap, and as downloadable binary from the [releases](https://github.com/raystack/stencil/releases/latest) page:
4444

4545
```sh
46-
brew install odpf/tap/stencil
46+
brew install raystack/tap/stencil
4747
```
4848

4949
To upgrade to the latest version:
@@ -75,13 +75,13 @@ scoop update stencil
7575
We provide ready to use Docker container images. To pull the latest image:
7676

7777
```sh
78-
docker pull odpf/stencil:latest
78+
docker pull raystack/stencil:latest
7979
```
8080

8181
To pull a specific version:
8282

8383
```sh
84-
docker pull odpf/stencil:v0.3.3
84+
docker pull raystack/stencil:v0.3.3
8585
```
8686

8787
## Usage

buf.gen.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ plugins:
66
- name: go-grpc
77
out: ./proto
88
opt: paths=source_relative
9-
- remote: buf.build/odpf/plugins/validate
9+
- remote: buf.build/raystack/plugins/validate
1010
out: "proto"
1111
opt: "paths=source_relative,lang=go"
1212
- name: grpc-gateway

clients/clojure/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A Clojure library designed to easily encode and decode protobuf messages by usin
77
Add the below dependency to your `project.clj` file:
88

99
```clj
10-
[io.odpf/stencil-clj "0.3.3"]
10+
[org.raystack/stencil-clj "0.3.3"]
1111
```
1212

1313
## Usage
@@ -20,7 +20,7 @@ syntax = "proto3";
2020
package example;
2121
2222
option java_multiple_files = true;
23-
option java_package = "io.odpf.CljTest";
23+
option java_package = "org.raystack.CljTest";
2424
2525
message Address {
2626
string city = 1;
@@ -60,7 +60,7 @@ message Person {
6060
(:require [stencil.core :refer [serialize]])
6161

6262
(def serialized-data
63-
(serialize client "io.odpf.CljTest" {:name "Foo"
63+
(serialize client "org.raystack.CljTest" {:name "Foo"
6464
:address {:street "bar"}
6565
:email-list ["a@example.com" "b@b.com"]
6666
:gender :NON-BINARY
@@ -72,7 +72,7 @@ message Person {
7272
```clojure
7373
(:require [stencil.core :refer [deserialize]])
7474

75-
(deserialize client "io.odpf.CljTest" serialized-data)
75+
(deserialize client "org.raystack.CljTest" serialized-data)
7676
;; prints
7777
;; {:name "Foo"
7878
;; :address {:street "bar"}
@@ -88,7 +88,7 @@ message Person {
8888
| field names | keywords in kebab case | `name` -> `:name`, `field_name` -> `:field-name` |
8989
| scalar fields | Values follow [protobuf-java scalar value mappings](https://developers.google.com/protocol-buffers/docs/proto3#scalar) | |
9090
| enums | Values converted as keywords of enum's original value | `UNKNOWN` -> `:UNKNOWN` |
91-
| messages | clojure map | `message Hello {string name = 1;}` -> {:name "odpf"} |
91+
| messages | clojure map | `message Hello {string name = 1;}` -> {:name "raystack"} |
9292
| repeated fields | clojure vector | |
9393
| one-of fields | treated as regular fields | if two fields are set that are part of one-of, last seen value is considered while serializing data |
9494
| map | map values follow it's [wire representation](https://developers.google.com/protocol-buffers/docs/proto3#backwards_compatibility) | for `map<string, string>` type, example value will be `[{:key "key" :value "value"}]` |
@@ -155,7 +155,7 @@ Serialize will throw error in following cases
155155

156156
```clojure
157157
(let [client (create-client sample-client-config)
158-
proto-package "io.odpf.stencil_clj_test"
158+
proto-package "org.raystack.stencil_clj_test"
159159
proto-class-name "Scalar"
160160
fully-qualified-proto-name (str proto-package "." proto-class-name)]
161161
(get-descriptor client fully-qualified-proto-name))
@@ -183,7 +183,7 @@ Serialize will throw error in following cases
183183

184184
```clojure
185185
(let [client (create-client sample-client-config)
186-
proto-package "io.odpf.stencil_clj_test"
186+
proto-package "org.raystack.stencil_clj_test"
187187
proto-class-name "Scalar"
188188
fully-qualified-proto-name (str proto-package "." proto-class-name)
189189
proto-desc (get-descriptor client fully-qualified-proto-name)
@@ -213,7 +213,7 @@ Serialize will throw error in following cases
213213

214214
```clojure
215215
(let [client (create-client sample-client-config)
216-
proto-package "io.odpf.stencil_clj_test"
216+
proto-package "org.raystack.stencil_clj_test"
217217
proto-class-name "Scalar"
218218
fully-qualified-proto-name (str proto-package "." proto-class-name)
219219
proto-desc (get-descriptor client fully-qualified-proto-name)]

clients/clojure/project.clj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
(defproject io.odpf/stencil-clj "0.3.3"
1+
(defproject org.raystack/stencil-clj "0.3.3"
22
:description "Stencil client for clojure"
3-
:url "https://github.com/odpf/stencil"
3+
:url "https://github.com/raystack/stencil"
44
:license {:name "Apache 2.0"
55
:url "https://www.apache.org/licenses/LICENSE-2.0"}
66
:dependencies [[org.clojure/clojure "1.10.3"]
7-
[io.odpf/stencil "0.2.1"]]
7+
[org.raystack/stencil "0.2.1"]]
88
:plugins [[lein-cljfmt "0.7.0"]]
99
:global-vars {*warn-on-reflection* true}
1010
:source-paths ["src"]

clients/clojure/src/stencil/core.clj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
(:require [stencil.encode :refer [map->bytes]]
33
[stencil.decode :refer [bytes->map]])
44
(:import
5-
(io.odpf.stencil.client StencilClient)
6-
(io.odpf.stencil StencilClientFactory)
7-
(io.odpf.stencil.cache SchemaRefreshStrategy)
8-
(io.odpf.stencil.exception StencilRuntimeException)
9-
(io.odpf.stencil.config StencilConfig)
5+
(org.raystack.stencil.client StencilClient)
6+
(org.raystack.stencil StencilClientFactory)
7+
(org.raystack.stencil.cache SchemaRefreshStrategy)
8+
(org.raystack.stencil.exception StencilRuntimeException)
9+
(org.raystack.stencil.config StencilConfig)
1010
(org.apache.http.message BasicHeader) (java.util ArrayList)))
1111

1212
(defn create-client

clients/clojure/test/stencil/core_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
(:require [clojure.test :refer :all]
33
[stencil.core :refer :all])
44
(:import
5-
(io.odpf.stencil.client StencilClient)))
5+
(org.raystack.stencil.client StencilClient)))
66

77
(deftest test-create-client
88
(testing "should create client"
9-
(let [config {:url "http://localhost:8000/v1beta1/namespaces/odpf/schemas/proton"
9+
(let [config {:url "http://localhost:8000/v1beta1/namespaces/raystack/schemas/proton"
1010
:refresh-ttl 100
1111
:request-timeout 10000
1212
:request-backoff-time 100

clients/clojure/test/stencil/serde_test.clj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[stencil.encode :refer [map->bytes]]
44
[stencil.decode :refer [bytes->map]])
55
(:import
6-
(io.odpf.stencil DescriptorMapBuilder)
6+
(org.raystack.stencil DescriptorMapBuilder)
77
(java.io File FileInputStream)))
88

99
(defn file-desc-map [^String path]
@@ -81,52 +81,52 @@
8181

8282
(deftest serialization-deserialization-test
8383
(testing "should handle scalar types"
84-
(let [proto-name "io.odpf.stencil_clj_test.Scalar"
84+
(let [proto-name "org.raystack.stencil_clj_test.Scalar"
8585
descriptor (local-get-descriptor proto-name)
8686
serialized-data (map->bytes descriptor scalar-data)
8787
deserialized-data (bytes->map descriptor serialized-data)]
8888
(is (= (dissoc deserialized-data :field-bytes) (dissoc scalar-data :field-bytes)))
8989
(is (= (seq (:field-bytes deserialized-data)) (seq (:field-bytes scalar-data))))))
9090

9191
(testing "should handle enum type if enum value is by name"
92-
(verify "io.odpf.stencil_clj_test.SimpleNested" {:field-name :VALUE-1}))
92+
(verify "org.raystack.stencil_clj_test.SimpleNested" {:field-name :VALUE-1}))
9393

9494
(testing "should handle enum type if enum value is by number"
95-
(let [proto-name "io.odpf.stencil_clj_test.SimpleNested"
95+
(let [proto-name "org.raystack.stencil_clj_test.SimpleNested"
9696
descriptor (local-get-descriptor proto-name)
9797
test-data {:field-name 2}
9898
serialized-data (map->bytes descriptor test-data)
9999
deserialized-data (bytes->map descriptor serialized-data)]
100100
(is (= deserialized-data {:field-name :VALUE-2}))))
101101

102102
(testing "should deserialize message type field"
103-
(verify "io.odpf.stencil_clj_test.SimpleNested" simple-nested))
103+
(verify "org.raystack.stencil_clj_test.SimpleNested" simple-nested))
104104

105105
(testing "should handle struct and map types"
106-
(verify "io.odpf.stencil_clj_test.ComplexTypes" complex-types))
106+
(verify "org.raystack.stencil_clj_test.ComplexTypes" complex-types))
107107

108108
(testing "should handle repeated fields"
109-
(verify "io.odpf.stencil_clj_test.SimpleArray" simple-array))
109+
(verify "org.raystack.stencil_clj_test.SimpleArray" simple-array))
110110

111111
(testing "should handle self referencing types"
112-
(verify "io.odpf.stencil_clj_test.Recursive" recursive-data))
112+
(verify "org.raystack.stencil_clj_test.Recursive" recursive-data))
113113

114114
(testing "should handle wrapper types"
115-
(verify "io.odpf.stencil_clj_test.Wrappers" wrapper-data))
115+
(verify "org.raystack.stencil_clj_test.Wrappers" wrapper-data))
116116

117117
(testing "should throw error if unknown field is present"
118-
(try (verify "io.odpf.stencil_clj_test.Scalar" {:x "test"})
118+
(try (verify "org.raystack.stencil_clj_test.Scalar" {:x "test"})
119119
(catch Exception e
120120
(is (= {:cause :unknown-field, :info {:field-name :x}} (ex-data e))))))
121121

122122
(testing "should throw error if enum value is invalid"
123-
(try (verify "io.odpf.stencil_clj_test.SimpleArray" {:groups [:invalid :UNKNOWN]})
123+
(try (verify "org.raystack.stencil_clj_test.SimpleArray" {:groups [:invalid :UNKNOWN]})
124124
(catch Exception e
125125
(is (= {:cause :unknown-enum-value
126126
:info {:field-name :invalid}} (ex-data e))))))
127127

128128
(testing "should throw error if non array value assigned to repeated(array) field"
129-
(try (verify "io.odpf.stencil_clj_test.SimpleArray" {:groups :UNKNOWN})
129+
(try (verify "org.raystack.stencil_clj_test.SimpleArray" {:groups :UNKNOWN})
130130
(catch Exception e
131131
(is (= {:cause :not-a-collection
132132
:info {:value :UNKNOWN}} (ex-data e)))))))

0 commit comments

Comments
 (0)