Skip to content

Commit 9f0376e

Browse files
committed
#329 Savepoint
1 parent 11efb11 commit 9f0376e

File tree

3 files changed

+48
-6
lines changed

3 files changed

+48
-6
lines changed

docs/development.md

+42
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
3636
export GIT_REPOSITORY=serve-grpc
3737
export GIT_ACCOUNT_DIR=~/${GIT_ACCOUNT}.git
3838
export GIT_REPOSITORY_DIR="${GIT_ACCOUNT_DIR}/${GIT_REPOSITORY}"
39+
3940
```
4041

4142
1. Using the environment variables values just set, follow
@@ -49,6 +50,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
4950
```console
5051
cd ${GIT_REPOSITORY_DIR}
5152
make dependencies-for-development
53+
5254
```
5355

5456
1. Install dependencies needed for [Go] code.
@@ -57,6 +59,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
5759
```console
5860
cd ${GIT_REPOSITORY_DIR}
5961
make dependencies
62+
6063
```
6164

6265
## Lint
@@ -67,6 +70,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
6770
```console
6871
cd ${GIT_REPOSITORY_DIR}
6972
make lint
73+
7074
```
7175

7276
## Build
@@ -77,13 +81,15 @@ Since the Senzing library is a prerequisite, it must be installed first.
7781
```console
7882
cd ${GIT_REPOSITORY_DIR}
7983
make clean build
84+
8085
```
8186

8287
1. The binaries will be found in the `${GIT_REPOSITORY_DIR}/target` directory.
8388
Example:
8489

8590
```console
8691
tree ${GIT_REPOSITORY_DIR}/target
92+
8793
```
8894

8995
## Run
@@ -98,6 +104,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
98104

99105
```console
100106
export SENZING_TOOLS_DATABASE_FILE=/tmp/sqlite/G2C.db
107+
101108
```
102109

103110
1. Copy template database and run command.
@@ -108,18 +115,21 @@ Since the Senzing library is a prerequisite, it must be installed first.
108115
cp ${GIT_REPOSITORY_DIR}/testdata/sqlite/G2C.db ${SENZING_TOOLS_DATABASE_FILE}
109116
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere${SENZING_TOOLS_DATABASE_FILE}
110117
${GIT_REPOSITORY_DIR}/target/linux-amd64/serve-grpc
118+
111119
```
112120

113121
1. macOS
114122

115123
```console
116124
${GIT_REPOSITORY_DIR}/target/darwin-amd64/serve-grpc
125+
117126
```
118127

119128
1. Windows
120129

121130
```console
122131
${GIT_REPOSITORY_DIR}/target/windows-amd64/serve-grpc
132+
123133
```
124134

125135
1. Clean up.
@@ -128,6 +138,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
128138
```console
129139
cd ${GIT_REPOSITORY_DIR}
130140
make clean
141+
131142
```
132143

133144
## Test
@@ -138,6 +149,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
138149
```console
139150
cd ${GIT_REPOSITORY_DIR}
140151
make clean setup test
152+
141153
```
142154

143155
1. **Optional:** View the SQLite database.
@@ -152,6 +164,7 @@ Since the Senzing library is a prerequisite, it must be installed first.
152164
--tty \
153165
--volume /tmp/sqlite:/data \
154166
coleifer/sqlite-web
167+
155168
```
156169

157170
Visit [localhost:9174].
@@ -166,6 +179,7 @@ Create a code coverage map.
166179
```console
167180
cd ${GIT_REPOSITORY_DIR}
168181
make clean setup coverage
182+
169183
```
170184

171185
A web-browser will show the results of the coverage.
@@ -180,6 +194,7 @@ Create a code coverage map.
180194
```console
181195
cd ${GIT_REPOSITORY_DIR}
182196
make clean documentation
197+
183198
```
184199

185200
1. If a web page doesn't appear, visit [localhost:6060].
@@ -197,6 +212,7 @@ Example:
197212
```console
198213
cd ${GIT_REPOSITORY_DIR}
199214
make clean
215+
200216
```
201217

202218
## Docker
@@ -207,6 +223,7 @@ Example:
207223
```console
208224
cd ${GIT_REPOSITORY_DIR}
209225
make docker-build
226+
210227
```
211228

212229
1. Run docker container.
@@ -219,6 +236,7 @@ Example:
219236
--rm \
220237
--tty \
221238
senzing/serve-grpc
239+
222240
```
223241

224242
1. **Optional:** Test using `docker-compose`.
@@ -227,13 +245,15 @@ Example:
227245
```console
228246
cd ${GIT_REPOSITORY_DIR}
229247
make clean docker-test
248+
230249
```
231250

232251
To bring the `docker-compose` formation, run
233252

234253
```console
235254
cd ${GIT_REPOSITORY_DIR}
236255
make clean
256+
237257
```
238258

239259
## Package
@@ -250,13 +270,15 @@ The actual packaging is done in the [senzing-tools] repository.
250270
```console
251271
cd ${GIT_REPOSITORY_DIR}
252272
make package
273+
253274
```
254275

255276
1. The results will be in the `${GIT_REPOSITORY_DIR}/target` directory.
256277
Example:
257278

258279
```console
259280
tree ${GIT_REPOSITORY_DIR}/target
281+
260282
```
261283

262284
### Test DEB package on Ubuntu
@@ -266,6 +288,7 @@ The actual packaging is done in the [senzing-tools] repository.
266288

267289
```console
268290
apt list --installed | grep serve-grpc
291+
269292
```
270293

271294
1. :pencil2: Install `serve-grpc`.
@@ -275,13 +298,15 @@ The actual packaging is done in the [senzing-tools] repository.
275298
```console
276299
cd ${GIT_REPOSITORY_DIR}/target
277300
sudo apt install ./serve-grpc-0.0.0.deb
301+
278302
```
279303

280304
1. :pencil2: Identify a location for database.
281305
Example:
282306

283307
```console
284308
export SENZING_TOOLS_DATABASE_FILE=/tmp/sqlite/G2C.db
309+
285310
```
286311

287312
1. Copy template database and run command.
@@ -291,6 +316,7 @@ The actual packaging is done in the [senzing-tools] repository.
291316
mkdir --parents ${SENZING_TOOLS_DATABASE_FILE%/*}
292317
cp ${GIT_REPOSITORY_DIR}/testdata/sqlite/G2C.db ${SENZING_TOOLS_DATABASE_FILE}
293318
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere${SENZING_TOOLS_DATABASE_FILE}
319+
294320
```
295321

296322
1. :pencil2: Run command.
@@ -299,13 +325,15 @@ The actual packaging is done in the [senzing-tools] repository.
299325
```console
300326
export LD_LIBRARY_PATH=/opt/senzing/er/lib/
301327
serve-grpc
328+
302329
```
303330

304331
1. Remove `serve-grpc` from system.
305332
Example:
306333

307334
```console
308335
sudo apt-get remove serve-grpc
336+
309337
```
310338

311339
### Test RPM package on Centos
@@ -315,6 +343,7 @@ The actual packaging is done in the [senzing-tools] repository.
315343

316344
```console
317345
yum list installed | grep serve-grpc
346+
318347
```
319348

320349
1. :pencil2: Install `serve-grpc`.
@@ -324,6 +353,7 @@ The actual packaging is done in the [senzing-tools] repository.
324353
```console
325354
cd ${GIT_REPOSITORY_DIR}/target
326355
sudo yum install ./serve-grpc-0.0.0.rpm
356+
327357
```
328358

329359
1. :pencil2: Identify database.
@@ -332,6 +362,7 @@ The actual packaging is done in the [senzing-tools] repository.
332362

333363
```console
334364
export SENZING_TOOLS_DATABASE_URL=sqlite3://na:na@nowhere/tmp/sqlite/G2C.db
365+
335366
```
336367

337368
1. Run command.
@@ -340,13 +371,15 @@ The actual packaging is done in the [senzing-tools] repository.
340371
```console
341372
export LD_LIBRARY_PATH=/opt/senzing/er/lib/
342373
serve-grpc
374+
343375
```
344376

345377
1. Remove `serve-grpc` from system.
346378
Example:
347379

348380
```console
349381
sudo yum remove serve-grpc
382+
350383
```
351384

352385
## Specialty
@@ -362,6 +395,7 @@ in testing the `sz-sdk-go-core` packages.
362395

363396
```console
364397
export SENZING_DEMO_DIR=~/my-senzing-demo
398+
365399
```
366400

367401
1. Bring up the docker-compose stack.
@@ -390,6 +424,7 @@ in testing the `sz-sdk-go-core` packages.
390424

391425
cd ${SENZING_DEMO_DIR}
392426
sudo --preserve-env docker-compose up
427+
393428
```
394429

395430
1. In a separate terminal window, set environment variables.
@@ -399,13 +434,15 @@ in testing the `sz-sdk-go-core` packages.
399434
```console
400435
export LOCAL_IP_ADDRESS=$(curl --silent https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/gists/find-local-ip-address/find-local-ip-address.py | python3 -)
401436
export SENZING_TOOLS_DATABASE_URL=postgresql://postgres:postgres@${LOCAL_IP_ADDRESS}:5432/er/?sslmode=disable
437+
402438
```
403439

404440
1. Run tests.
405441

406442
```console
407443
cd ${GIT_REPOSITORY_DIR}
408444
make clean test
445+
409446
```
410447

411448
1. **Optional:** View the PostgreSQL database.
@@ -423,6 +460,7 @@ in testing the `sz-sdk-go-core` packages.
423460

424461
cd ${GIT_REPOSITORY_DIR}
425462
make clean
463+
426464
```
427465

428466
### Test using bloomrpc
@@ -441,6 +479,7 @@ For other gRPC tools, visit [Awesome gRPC].
441479
```console
442480
wget https://github.com/bloomrpc/bloomrpc/releases/download/1.5.3/bloomrpc_1.5.3_amd64.deb
443481
sudo apt install ./bloomrpc_1.5.3_amd64.deb
482+
444483
```
445484

446485
1. Start the test server.
@@ -449,13 +488,15 @@ For other gRPC tools, visit [Awesome gRPC].
449488
```console
450489
cd ${GIT_REPOSITORY_DIR}
451490
make clean run-serve-grpc
491+
452492
```
453493

454494
1. In a separate terminal, start the gRPC test client.
455495
Example:
456496

457497
```console
458498
bloomrpc
499+
459500
```
460501

461502
1. In `bloomrpc`:
@@ -474,6 +515,7 @@ For other gRPC tools, visit [Awesome gRPC].
474515
"iniParams": "{\"PIPELINE\":{\"CONFIGPATH\":\"/etc/opt/senzing\",\"RESOURCEPATH\":\"/opt/senzing/er/resources\",\"SUPPORTPATH\":\"/opt/senzing/data\"},\"SQL\":{\"CONNECTION\":\"sqlite3://na:na@nowhere/tmp/sqlite/G2C.db\"}}",
475516
"verboseLogging": 0
476517
}
518+
477519
```
478520

479521
1. Near the center, click the green "play" button.

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/senzing-garage/go-observing v0.3.3
1313
github.com/senzing-garage/sz-sdk-go v0.14.2
1414
github.com/senzing-garage/sz-sdk-go-core v0.8.3
15-
github.com/senzing-garage/sz-sdk-proto v0.7.9
15+
github.com/senzing-garage/sz-sdk-proto v0.7.10-0.20241009171550-675844cbe133
1616
github.com/spf13/cobra v1.8.1
1717
github.com/spf13/viper v1.19.0
1818
github.com/stretchr/testify v1.9.0
@@ -39,7 +39,7 @@ require (
3939
github.com/spf13/pflag v1.0.5 // indirect
4040
github.com/subosito/gotenv v1.6.0 // indirect
4141
go.uber.org/multierr v1.11.0 // indirect
42-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect
42+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
4343
golang.org/x/net v0.30.0 // indirect
4444
golang.org/x/sys v0.26.0 // indirect
4545
golang.org/x/text v0.19.0 // indirect

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ github.com/senzing-garage/sz-sdk-go v0.14.2 h1:1LksQW0+epSY0DhlxThxrnfeDwgyLPvyq
5050
github.com/senzing-garage/sz-sdk-go v0.14.2/go.mod h1:rj9HH6qo+kW5PsFSRnEIUQqDZBE34gZjQGsDvAxw6dI=
5151
github.com/senzing-garage/sz-sdk-go-core v0.8.3 h1:FlBRkqQd9QKPmr9KVVtG+FsoczqO+fXhRoZ9DnnvP0Y=
5252
github.com/senzing-garage/sz-sdk-go-core v0.8.3/go.mod h1:uwAgQ/Ai8gKhJL/5TYMWYoDte7wnDqJXPWRD5A/Ushg=
53-
github.com/senzing-garage/sz-sdk-proto v0.7.9 h1:B8X8Y+D9a/s6Alo35XX0QpTZMCmEMNOPDDCN+pqwpLU=
54-
github.com/senzing-garage/sz-sdk-proto v0.7.9/go.mod h1:pvaLa5AR36n5T59Perh/zulKKPe6EB1HTWGhSP4smb4=
53+
github.com/senzing-garage/sz-sdk-proto v0.7.10-0.20241009171550-675844cbe133 h1:IxmpWHlSGbq05FurNpGlUyVbCgi8sRpLesAbOOS3SYY=
54+
github.com/senzing-garage/sz-sdk-proto v0.7.10-0.20241009171550-675844cbe133/go.mod h1:pvaLa5AR36n5T59Perh/zulKKPe6EB1HTWGhSP4smb4=
5555
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
5656
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
5757
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
@@ -70,8 +70,8 @@ github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8
7070
github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU=
7171
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
7272
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
73-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 h1:1wqE9dj9NpSm04INVsJhhEUzhuDVjbcyKH91sVyPATw=
74-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
73+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c h1:7dEasQXItcW1xKJ2+gg5VOiBnqWrJc+rq0DPKyvvdbY=
74+
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c/go.mod h1:NQtJDoLvd6faHhE7m4T/1IY708gDefGGjR/iUW8yQQ8=
7575
golang.org/x/net v0.30.0 h1:AcW1SDZMkb8IpzCdQUaIq2sP4sZ4zw+55h6ynffypl4=
7676
golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU=
7777
golang.org/x/sys v0.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo=

0 commit comments

Comments
 (0)