From abdb38e0ecaccad5d2ae4c84af1b599c59a18afc Mon Sep 17 00:00:00 2001
From: Michael Dockter
Date: Mon, 13 Jan 2025 20:26:12 -0500
Subject: [PATCH] #204 Update dependencies (#207)
* #204 Savepoint
* #204 Savepoint
* #204 Savepoint
* #204 Savepoint
* #204 Savepoint
* #204 Update dependencies
* #204 Update notebook
* #204 Update notebook
* #204 Update notebook
* #204 Update notebook
* #204 Prepare for versioned release
* #204 Update requirements
* update osx and win install
---------
Co-authored-by: Sam <109683132+kernelsam@users.noreply.github.com>
---
.github/workflows/go-test-darwin.yaml | 4 +-
.github/workflows/go-test-linux.yaml | 2 +-
.github/workflows/go-test-windows.yaml | 4 +-
.github/workflows/golangci-lint.yaml | 2 +-
CHANGELOG.md | 6 ++
development-requirements.txt | 2 +-
docs/development.md | 1 +
go.mod | 20 ++---
go.sum | 46 ++++++-----
.../static/templates/site/go/jupyter-lab.html | 62 +++++++++++++++
.../templates/site/go/local-development.html | 79 +++++++++++++++++++
.../static/templates/site/go/migrate.html | 79 +++++++++++++++++++
.../static/templates/site/go/playground.html | 23 ++++--
httpserver/static/templates/site/home.html | 22 +++---
.../templates/site/python/jupyter-lab.html | 3 +
.../site/python/local-development.html | 8 +-
.../static/templates/site/python/migrate.html | 28 +++----
requirements.txt | 4 +-
.../python/senzing_hello_world.ipynb | 9 +--
.../python/senzing_list_datasources.ipynb | 11 +--
.../python/senzing_load_truthsets.ipynb | 16 ++--
.../python/senzing_load_user_data.ipynb | 14 ++--
.../python/senzing_show_method_help.ipynb | 11 +--
rootfs/examples/python/senzing_hello_world.py | 8 +-
.../examples/python/senzing_load_truthsets.py | 15 +---
.../examples/python/senzing_load_user_data.py | 15 +---
rootfs/examples/python/senzing_method_help.py | 9 +--
27 files changed, 354 insertions(+), 149 deletions(-)
create mode 100644 httpserver/static/templates/site/go/jupyter-lab.html
create mode 100644 httpserver/static/templates/site/go/local-development.html
create mode 100644 httpserver/static/templates/site/go/migrate.html
diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml
index 48817cc..63fe761 100644
--- a/.github/workflows/go-test-darwin.yaml
+++ b/.github/workflows/go-test-darwin.yaml
@@ -39,9 +39,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Senzing SDK
- uses: senzing-factory/github-action-install-senzing-sdk@v1
+ uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
- senzingsdk-version: ${{ matrix.senzingsdk-version }}
+ senzingsdk-repository-path: ${{ secrets.SENZING_OSX_BETA_REPOSITORY }}
- name: Copy /etc files
run: sudo mkdir -p /opt/senzing/er/etc && sudo cp testdata/senzing-license/g2.lic /opt/senzing/er/etc/g2.lic
diff --git a/.github/workflows/go-test-linux.yaml b/.github/workflows/go-test-linux.yaml
index 37ca15c..b234af2 100644
--- a/.github/workflows/go-test-linux.yaml
+++ b/.github/workflows/go-test-linux.yaml
@@ -37,7 +37,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Senzing SDK
- uses: senzing-factory/github-action-install-senzing-sdk@v1
+ uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }}
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }}
diff --git a/.github/workflows/go-test-windows.yaml b/.github/workflows/go-test-windows.yaml
index 1db78f2..8a99dc5 100644
--- a/.github/workflows/go-test-windows.yaml
+++ b/.github/workflows/go-test-windows.yaml
@@ -36,9 +36,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Senzing SDK
- uses: senzing-factory/github-action-install-senzing-sdk@v1
+ uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
- senzingsdk-version: ${{ matrix.senzingsdk-version }}
+ senzingsdk-repository-path: ${{ secrets.SENZING_WIN_BETA_REPOSITORY }}
- name: Add to "Path" environment variable
run: |
diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml
index e5513cc..c0ba62a 100644
--- a/.github/workflows/golangci-lint.yaml
+++ b/.github/workflows/golangci-lint.yaml
@@ -24,7 +24,7 @@ jobs:
fetch-depth: 0
- name: Install Senzing SDK
- uses: senzing-factory/github-action-install-senzing-sdk@v1
+ uses: senzing-factory/github-action-install-senzing-sdk@v2
with:
senzingsdk-repository-package: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_PACKAGE }}
senzingsdk-repository-path: ${{ secrets.SENZING_APT_BETA_STAGING_REPOSITORY_URL }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a169ae7..c852925 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning].
## [Unreleased]
+## [0.4.7] - 2025-01-13
+
+### Changed in 0.4.7
+
+- Updated dependencies
+
## [0.4.6] - 2024-11-27
### Changed in 0.4.6
diff --git a/development-requirements.txt b/development-requirements.txt
index 52fa5b4..51bb3e7 100644
--- a/development-requirements.txt
+++ b/development-requirements.txt
@@ -1,4 +1,4 @@
-bandit==1.8.0
+bandit==1.8.2
black==24.10.0
build==1.2.2.post1
coverage==7.6.10
diff --git a/docs/development.md b/docs/development.md
index c72a7cf..c6afb56 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -196,6 +196,7 @@ Example:
```console
docker run \
--interactive \
+ --name senzing-playground \
--publish 8260:8260 \
--publish 8261:8261 \
--rm \
diff --git a/go.mod b/go.mod
index 3ad2384..c6c21de 100644
--- a/go.mod
+++ b/go.mod
@@ -18,7 +18,7 @@ require (
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
- google.golang.org/grpc v1.69.2
+ google.golang.org/grpc v1.69.4
)
require (
@@ -50,7 +50,7 @@ require (
github.com/klauspost/compress v1.17.11 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/magiconair/properties v1.8.9 // indirect
- github.com/mattn/go-colorable v0.1.13 // indirect
+ github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.24 // indirect
github.com/microsoft/go-mssqldb v1.8.0 // indirect
@@ -65,7 +65,7 @@ require (
github.com/prometheus/common v0.61.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
- github.com/sagikazarmark/locafero v0.6.0 // indirect
+ github.com/sagikazarmark/locafero v0.7.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/senzing-garage/go-databasing v0.5.4 // indirect
@@ -81,7 +81,7 @@ require (
github.com/senzing-garage/sz-sdk-proto v0.7.10 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
- github.com/spf13/afero v1.11.0 // indirect
+ github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
@@ -91,14 +91,14 @@ require (
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
- golang.org/x/crypto v0.31.0 // indirect
- golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 // indirect
- golang.org/x/net v0.33.0 // indirect
+ golang.org/x/crypto v0.32.0 // indirect
+ golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect
+ golang.org/x/net v0.34.0 // indirect
golang.org/x/sync v0.10.0 // indirect
- golang.org/x/sys v0.28.0 // indirect
+ golang.org/x/sys v0.29.0 // indirect
golang.org/x/text v0.21.0 // indirect
- google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb // indirect
- google.golang.org/protobuf v1.36.0 // indirect
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 // indirect
+ google.golang.org/protobuf v1.36.2 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
diff --git a/go.sum b/go.sum
index ac573d7..69842a2 100644
--- a/go.sum
+++ b/go.sum
@@ -92,9 +92,8 @@ github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/magiconair/properties v1.8.9 h1:nWcCbLq1N2v/cpNsy5WvQ37Fb+YElfq20WJ/a8RkpQM=
github.com/magiconair/properties v1.8.9/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
-github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
-github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
-github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
+github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
+github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM=
@@ -130,8 +129,8 @@ github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/sagikazarmark/locafero v0.6.0 h1:ON7AQg37yzcRPU69mt7gwhFEBwxI6P9T4Qu3N51bwOk=
-github.com/sagikazarmark/locafero v0.6.0/go.mod h1:77OmuIc6VTraTXKXIs/uvUxKGUXjE1GbemJYHqdNjX0=
+github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
+github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE=
github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ=
github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys=
@@ -176,8 +175,8 @@ github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
-github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
-github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
+github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs=
+github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4=
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
@@ -210,30 +209,29 @@ go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
-golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
-golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
-golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67 h1:1UoZQm6f0P/ZO0w1Ri+f+ifG/gXhegadRdwBIXEFWDo=
-golang.org/x/exp v0.0.0-20241217172543-b2144cdd0a67/go.mod h1:qj5a5QZpwLU2NLQudwIN5koi3beDhSAlJwa67PuM98c=
-golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
-golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
+golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
+golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
+golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA=
+golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU=
+golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
+golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
-golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
-golang.org/x/term v0.27.0 h1:WP60Sv1nlK1T6SupCHbXzSaN0b9wUmsPoRS9b61A23Q=
-golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM=
+golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
+golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg=
+golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek=
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb h1:3oy2tynMOP1QbTC0MsNNAV+Se8M2Bd0A5+x1QHyw+pI=
-google.golang.org/genproto/googleapis/rpc v0.0.0-20241219192143-6b3ec007d9bb/go.mod h1:lcTa1sDdWEIHMWlITnIczmw5w60CF9ffkb8Z+DVmmjA=
-google.golang.org/grpc v1.69.2 h1:U3S9QEtbXC0bYNvRtcoklF3xGtLViumSYxWykJS+7AU=
-google.golang.org/grpc v1.69.2/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
-google.golang.org/protobuf v1.36.0 h1:mjIs9gYtt56AzC4ZaffQuh88TZurBGhIJMBZGSxNerQ=
-google.golang.org/protobuf v1.36.0/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422 h1:3UsHvIr4Wc2aW4brOaSCmcxh9ksica6fHEr8P1XhkYw=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250106144421-5f5ef82da422/go.mod h1:3ENsm/5D1mzDyhpzeRi1NR784I0BcofWBoSc5QqqMK4=
+google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
+google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
+google.golang.org/protobuf v1.36.2 h1:R8FeyR1/eLmkutZOM5CWghmo5itiG9z0ktFlTVLuTmU=
+google.golang.org/protobuf v1.36.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
diff --git a/httpserver/static/templates/site/go/jupyter-lab.html b/httpserver/static/templates/site/go/jupyter-lab.html
new file mode 100644
index 0000000..3d59fd1
--- /dev/null
+++ b/httpserver/static/templates/site/go/jupyter-lab.html
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Senzing Playground - Go - Jupyter Lab
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/httpserver/static/templates/site/go/local-development.html b/httpserver/static/templates/site/go/local-development.html
new file mode 100644
index 0000000..33b170c
--- /dev/null
+++ b/httpserver/static/templates/site/go/local-development.html
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Senzing Playground - Go
+
+
+
+
+
+
+
+
+
+
+ Home
+ Go
+ Local development
+
+
+
Senzing SDK in my development environment
+
+ This exercise requires that you already have a Go development environment installed on your
+ computer.
+
+
+
+ Create a new directory and download any of the following files into the new directory:
+
+ senzing_hello_world/main.go
+ - A simple test of connectivity to Senzing engine.
+ senzing_load_truthsets/main.go
+ - Load and query the Senzing truth-set-data.
+ senzing_load_user_data/main.go
+ - Load custom data.
+ Requires input file (e.g.
+ senzing-example-data.json )
+
+
+
+
+
+ Run in the new directory, the following commands initialize, download dependencies, and execute code:
+
+
+
+ go mod init senzing
+ go mod tidy
+ go run main.go
+
+
+
+
+ Using the files as examples, build your own Go application using the Senzing SDK.
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/httpserver/static/templates/site/go/migrate.html b/httpserver/static/templates/site/go/migrate.html
new file mode 100644
index 0000000..8cd6b0f
--- /dev/null
+++ b/httpserver/static/templates/site/go/migrate.html
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ Senzing Playground - Go - Migrate
+
+
+
+
+
+
+
+
+
+
+ Home
+ Go
+ Migrate
+
+
+
Migrate from gRPC to native SDK
+
+
+ To migrate your Go application from using the Senzing SDK for Go over gRPC to using the
+ Senzing SDK for Go, replace the following code:
+
+
+
+ import "github.com/senzing-garage/sz-sdk-go-grpc/szabstractfactory"
+
+ szAbstractFactory := &szabstractfactory.Szabstractfactory{
+ GrpcConnection: grpcConnection,
+ }
+
+
+ with a customized version of this:
+
+
+
+ import "github.com/senzing-garage/sz-sdk-go-core/szabstractfactory"
+
+ settings := `{
+ "PIPELINE": {
+ "CONFIGPATH": "/etc/opt/senzing",
+ "RESOURCEPATH": "/opt/senzing/er/resources",
+ "SUPPORTPATH": "/opt/senzing/data",
+ },
+ "SQL": {"CONNECTION": "sqlite3://na:na@/tmp/sqlite/G2C.db"}
+ }`
+
+ szAbstractFactory := &szabstractfactory.Szabstractfactory{
+ ConfigID: senzing.SzInitializeWithDefaultConfiguration,
+ InstanceName: "My instance",
+ Settings: settings,
+ VerboseLogging: senzing.SzNoLogging,
+ }
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/httpserver/static/templates/site/go/playground.html b/httpserver/static/templates/site/go/playground.html
index ea5bcd9..8697732 100644
--- a/httpserver/static/templates/site/go/playground.html
+++ b/httpserver/static/templates/site/go/playground.html
@@ -103,12 +103,23 @@ Go SDK
To run the example programs in the Docker container, open a Docker terminal and run any of the following:
+ target="_blank">Docker terminal and run any of the following examples:
- senzing_hello_world.py
- senzing_load_truthsets.py
- senzing_load_user_data.py
+ cd /examples/go/senzing_hello_world
+ go run main.go
+
+
+
+
+ cd /examples/go/senzing_load_truthsets
+ go run main.go
+
+
+
+
+ cd /examples/go/senzing_load_user_data
+ go run main.go
@@ -125,13 +136,13 @@ Go SDK
container. Example download from Docker container:
- docker container cp senzing-playground:/examples/go/senzing_hello_world.py /tmp/senzing_hello_world.py
+ docker container cp senzing-playground:/examples/go/senzing_hello_world/main.go /tmp/senzing_hello_world/main.go
Example upload to Dockter container:
- docker container cp /tmp/my_local.py senzing-playground:/examples/go/my_local.py
+ docker container cp /tmp/my_main.go senzing-playground:/examples/go/my_main.go
diff --git a/httpserver/static/templates/site/home.html b/httpserver/static/templates/site/home.html
index 7077600..c9193c3 100644
--- a/httpserver/static/templates/site/home.html
+++ b/httpserver/static/templates/site/home.html
@@ -78,7 +78,7 @@ 1. I want to try Senzing SDK without installing anyt
Python
-
+
Java
@@ -92,7 +92,7 @@ 1. I want to try Senzing SDK without installing anyt
-
+
C#
@@ -129,21 +129,21 @@ 2. I want to use my own Jupyter Lab. (Sandbox)
Python
-
+
Java
-
+
Go
-
+
C#
@@ -188,21 +188,21 @@ 3. I want to try Senzing SDK in my development envir
Python
-
+
Java
-
+
Go
-
+
C#
@@ -243,21 +243,21 @@ 4. I want to migrate from using Senzing gRPC SDK to
Python
-
+
Java
-
+
Go
-
+
C#
diff --git a/httpserver/static/templates/site/python/jupyter-lab.html b/httpserver/static/templates/site/python/jupyter-lab.html
index bab1fca..bf653cd 100644
--- a/httpserver/static/templates/site/python/jupyter-lab.html
+++ b/httpserver/static/templates/site/python/jupyter-lab.html
@@ -42,6 +42,9 @@ Using my own Jupyter Lab
- Load and query the Senzing truth-set-data.
senzing_load_user_data.ipynb
- Load custom data.
+ Requires input file (e.g.
+ senzing-example-data.json )
diff --git a/httpserver/static/templates/site/python/local-development.html b/httpserver/static/templates/site/python/local-development.html
index 37a4c07..336f419 100644
--- a/httpserver/static/templates/site/python/local-development.html
+++ b/httpserver/static/templates/site/python/local-development.html
@@ -41,9 +41,11 @@ Senzing SDK in my development environment
senzing_load_truthsets.py
- Load and query the Senzing truth-set-data.
senzing_load_user_data.py
- - Load custom data.
- senzing_method_help.py
- - Show how to display help.
+ - Load custom data.
+ - Load custom data.
+ Requires input file (e.g.
+ senzing-example-data.json )
diff --git a/httpserver/static/templates/site/python/migrate.html b/httpserver/static/templates/site/python/migrate.html
index c46b43d..0a1fc62 100644
--- a/httpserver/static/templates/site/python/migrate.html
+++ b/httpserver/static/templates/site/python/migrate.html
@@ -35,30 +35,30 @@ Migrate from gRPC to native SDK
-from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters
+ from senzing_grpc import SzAbstractFactoryGrpc
-FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
- "grpc_channel": grpc.insecure_channel("localhost:8261"),
-}
+ grpc_channel = grpc.insecure_channel("localhost:8261")
+
+ sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)
with a customized version of this:
-from senzing_core import SzAbstractFactory, SzAbstractFactoryParameters
+ from senzing_core import SzAbstractFactoryCore
-FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
- "instance_name": "Example",
- "settings": {
+ instance_name = "Example"
+ settings = {
"PIPELINE": {
- "CONFIGPATH": "/etc/opt/senzing",
- "RESOURCEPATH": "/opt/senzing/er/resources",
- "SUPPORTPATH": "/opt/senzing/data",
- },
+ "CONFIGPATH": "/etc/opt/senzing",
+ "RESOURCEPATH": "/opt/senzing/er/resources",
+ "SUPPORTPATH": "/opt/senzing/data",
+ },
"SQL": {"CONNECTION": "sqlite3://na:na@/tmp/sqlite/G2C.db"},
- },
-}
+ }
+
+ sz_abstract_factory = SzAbstractFactoryCore(instance_name, settings)
diff --git a/requirements.txt b/requirements.txt
index f40df5a..1fc87f2 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,6 +7,6 @@ jupyterlab-code-formatter==3.0.2
nbconvert==7.16.5
notebook==7.3.2
protobuf==5.29.3
-senzing==0.2.0
-senzing-grpc==0.3.8
+senzing==0.2.1
+senzing-grpc==0.4.0
setuptools==75.8.0
diff --git a/rootfs/examples/notebooks/python/senzing_hello_world.ipynb b/rootfs/examples/notebooks/python/senzing_hello_world.ipynb
index fd58d69..bd18ec0 100644
--- a/rootfs/examples/notebooks/python/senzing_hello_world.ipynb
+++ b/rootfs/examples/notebooks/python/senzing_hello_world.ipynb
@@ -48,7 +48,7 @@
"import json\n",
"\n",
"import grpc\n",
- "from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters"
+ "from senzing_grpc import SzAbstractFactoryGrpc"
]
},
{
@@ -68,11 +68,8 @@
"metadata": {},
"outputs": [],
"source": [
- "FACTORY_PARAMETERS: SzAbstractFactoryParameters = {\n",
- " \"grpc_channel\": grpc.insecure_channel(\"localhost:8261\"),\n",
- "}\n",
- "\n",
- "sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)"
+ "grpc_channel = grpc.insecure_channel(\"localhost:8261\")\n",
+ "sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)"
]
},
{
diff --git a/rootfs/examples/notebooks/python/senzing_list_datasources.ipynb b/rootfs/examples/notebooks/python/senzing_list_datasources.ipynb
index 1502b0f..17f98a1 100644
--- a/rootfs/examples/notebooks/python/senzing_list_datasources.ipynb
+++ b/rootfs/examples/notebooks/python/senzing_list_datasources.ipynb
@@ -35,7 +35,7 @@
"source": [
"import json\n",
"import grpc\n",
- "from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters"
+ "from senzing_grpc import SzAbstractFactoryGrpc"
]
},
{
@@ -63,11 +63,8 @@
"metadata": {},
"outputs": [],
"source": [
- "FACTORY_PARAMETERS: SzAbstractFactoryParameters = {\n",
- " \"grpc_channel\": grpc.insecure_channel(\"localhost:8261\"),\n",
- "}\n",
- "\n",
- "sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)"
+ "grpc_channel = grpc.insecure_channel(\"localhost:8261\")\n",
+ "sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)"
]
},
{
@@ -145,7 +142,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.2"
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/rootfs/examples/notebooks/python/senzing_load_truthsets.ipynb b/rootfs/examples/notebooks/python/senzing_load_truthsets.ipynb
index 0f1c6e5..93f7da7 100644
--- a/rootfs/examples/notebooks/python/senzing_load_truthsets.ipynb
+++ b/rootfs/examples/notebooks/python/senzing_load_truthsets.ipynb
@@ -52,7 +52,8 @@
"\n",
"import grpc\n",
"import requests\n",
- "from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters, SzEngineFlags, SzError"
+ "from senzing import SzEngineFlags, SzError\n",
+ "from senzing_grpc import SzAbstractFactoryGrpc"
]
},
{
@@ -165,11 +166,8 @@
"metadata": {},
"outputs": [],
"source": [
- "FACTORY_PARAMETERS: SzAbstractFactoryParameters = {\n",
- " \"grpc_channel\": grpc.insecure_channel(\"localhost:8261\"),\n",
- "}\n",
- "\n",
- "sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)"
+ "grpc_channel = grpc.insecure_channel(\"localhost:8261\")\n",
+ "sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)"
]
},
{
@@ -251,9 +249,7 @@
"outputs": [],
"source": [
"new_json_config = sz_config.export_config(config_handle)\n",
- "new_config_id = sz_configmanager.add_config(\n",
- " new_json_config, \"Add TruthSet datasources\"\n",
- ")\n",
+ "new_config_id = sz_configmanager.add_config(new_json_config, \"Add TruthSet datasources\")\n",
"sz_configmanager.replace_default_config_id(old_config_id, new_config_id)"
]
},
@@ -402,7 +398,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.2"
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/rootfs/examples/notebooks/python/senzing_load_user_data.ipynb b/rootfs/examples/notebooks/python/senzing_load_user_data.ipynb
index 7f0c7d1..c64fb25 100644
--- a/rootfs/examples/notebooks/python/senzing_load_user_data.ipynb
+++ b/rootfs/examples/notebooks/python/senzing_load_user_data.ipynb
@@ -77,7 +77,8 @@
"source": [
"import json\n",
"import grpc\n",
- "from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters, SzEngineFlags, SzError"
+ "from senzing import SzEngineFlags, SzError\n",
+ "from senzing_grpc import SzAbstractFactoryGrpc"
]
},
{
@@ -181,11 +182,8 @@
"metadata": {},
"outputs": [],
"source": [
- "FACTORY_PARAMETERS: SzAbstractFactoryParameters = {\n",
- " \"grpc_channel\": grpc.insecure_channel(\"localhost:8261\"),\n",
- "}\n",
- "\n",
- "sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)"
+ "grpc_channel = grpc.insecure_channel(\"localhost:8261\")\n",
+ "sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)"
]
},
{
@@ -267,9 +265,7 @@
"outputs": [],
"source": [
"new_json_config = sz_config.export_config(config_handle)\n",
- "new_config_id = sz_configmanager.add_config(\n",
- " new_json_config, \"Add user datasources\"\n",
- ")\n",
+ "new_config_id = sz_configmanager.add_config(new_json_config, \"Add user datasources\")\n",
"sz_configmanager.replace_default_config_id(old_config_id, new_config_id)"
]
},
diff --git a/rootfs/examples/notebooks/python/senzing_show_method_help.ipynb b/rootfs/examples/notebooks/python/senzing_show_method_help.ipynb
index 697afb0..b6e61ab 100644
--- a/rootfs/examples/notebooks/python/senzing_show_method_help.ipynb
+++ b/rootfs/examples/notebooks/python/senzing_show_method_help.ipynb
@@ -24,7 +24,7 @@
"outputs": [],
"source": [
"import grpc\n",
- "from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters"
+ "from senzing_grpc import SzAbstractFactoryGrpc"
]
},
{
@@ -42,11 +42,8 @@
"metadata": {},
"outputs": [],
"source": [
- "FACTORY_PARAMETERS: SzAbstractFactoryParameters = {\n",
- " \"grpc_channel\": grpc.insecure_channel(\"localhost:8261\"),\n",
- "}\n",
- "\n",
- "sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)"
+ "grpc_channel = grpc.insecure_channel(\"localhost:8261\")\n",
+ "sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)"
]
},
{
@@ -120,7 +117,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.9.2"
+ "version": "3.12.3"
}
},
"nbformat": 4,
diff --git a/rootfs/examples/python/senzing_hello_world.py b/rootfs/examples/python/senzing_hello_world.py
index b8d9eb9..67498bb 100755
--- a/rootfs/examples/python/senzing_hello_world.py
+++ b/rootfs/examples/python/senzing_hello_world.py
@@ -3,12 +3,10 @@
import json
import grpc
-from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters
+from senzing_grpc import SzAbstractFactoryGrpc
-FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
- "grpc_channel": grpc.insecure_channel("localhost:8261"),
-}
+grpc_channel = grpc.insecure_channel("localhost:8261")
+sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)
-sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
sz_product = sz_abstract_factory.create_product()
print(json.dumps(json.loads(sz_product.get_version()), indent=2))
diff --git a/rootfs/examples/python/senzing_load_truthsets.py b/rootfs/examples/python/senzing_load_truthsets.py
index cbdb332..1004d40 100755
--- a/rootfs/examples/python/senzing_load_truthsets.py
+++ b/rootfs/examples/python/senzing_load_truthsets.py
@@ -7,16 +7,8 @@
import grpc
import requests
-from senzing_grpc import (
- SzAbstractFactory,
- SzAbstractFactoryParameters,
- SzEngineFlags,
- SzError,
-)
-
-FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
- "grpc_channel": grpc.insecure_channel("localhost:8261"),
-}
+from senzing import SzEngineFlags, SzError
+from senzing_grpc import SzAbstractFactoryGrpc
# Set environment specific variables.
@@ -53,7 +45,8 @@
# Create an abstract factory for accessing Senzing via gRPC.
-sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
+grpc_channel = grpc.insecure_channel("localhost:8261")
+sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)
# Create Senzing objects.
diff --git a/rootfs/examples/python/senzing_load_user_data.py b/rootfs/examples/python/senzing_load_user_data.py
index 97d079b..71aadff 100755
--- a/rootfs/examples/python/senzing_load_user_data.py
+++ b/rootfs/examples/python/senzing_load_user_data.py
@@ -5,16 +5,8 @@
import json
import grpc
-from senzing_grpc import (
- SzAbstractFactory,
- SzAbstractFactoryParameters,
- SzEngineFlags,
- SzError,
-)
-
-FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
- "grpc_channel": grpc.insecure_channel("localhost:8261"),
-}
+from senzing import SzEngineFlags, SzError
+from senzing_grpc import SzAbstractFactoryGrpc
# Set environment specific variables.
@@ -37,7 +29,8 @@
# Create an abstract factory for accessing Senzing via gRPC.
-sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
+grpc_channel = grpc.insecure_channel("localhost:8261")
+sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)
# Create Senzing objects.
diff --git a/rootfs/examples/python/senzing_method_help.py b/rootfs/examples/python/senzing_method_help.py
index 2781e8c..ba6875c 100755
--- a/rootfs/examples/python/senzing_method_help.py
+++ b/rootfs/examples/python/senzing_method_help.py
@@ -3,15 +3,12 @@
# Import Python packages.
import grpc
-from senzing_grpc import SzAbstractFactory, SzAbstractFactoryParameters
-
-FACTORY_PARAMETERS: SzAbstractFactoryParameters = {
- "grpc_channel": grpc.insecure_channel("localhost:8261"),
-}
+from senzing_grpc import SzAbstractFactoryGrpc
# Create an abstract factory for accessing Senzing via gRPC.
-sz_abstract_factory = SzAbstractFactory(**FACTORY_PARAMETERS)
+grpc_channel = grpc.insecure_channel("localhost:8261")
+sz_abstract_factory = SzAbstractFactoryGrpc(grpc_channel)
# Create Senzing object.