Skip to content

Commit

Permalink
232 dockter 1 (#239)
Browse files Browse the repository at this point in the history
* #232 Update dependencies

* #232 Update variable names

* #232 Update documentation

* #232 Remove DLEXPORT comments

* #232 Simplify searchByAttributes

* #232 Savepoint

* #232 Working unit tests

* #232 Savepoint

* #232 Working on testcases

* #232 Working testcases

* #232 Exclusion to avoide

* #232 Prepare for versioned release

* #232 Prepare for versioned release

* Force re-test

* Force re-test
  • Loading branch information
docktermj authored Sep 11, 2024
1 parent c7d28e5 commit 03ef2f3
Show file tree
Hide file tree
Showing 34 changed files with 1,475 additions and 686 deletions.
2 changes: 1 addition & 1 deletion .github/linters/.golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ linters:
- bidichk
- bodyclose
- contextcheck
- copyloopvar
- durationcheck
- errcheck
- errchkjson
- errorlint
- exhaustive
- exportloopref
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
Expand Down
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
[markdownlint](https://dlaa.me/markdownlint/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The format is based on [Keep a Changelog], [markdownlint],
and this project adheres to [Semantic Versioning].

## [Unreleased]

-

## [0.8.2] - 2024-09-11

### Changed in 0.8.2

- Update dependencies
- Added test cases.

## [0.8.1] - 2024-08-27

### Changed in 0.8.1
Expand Down Expand Up @@ -335,3 +341,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Initial functionality
-

[Keep a Changelog]: https://keepachangelog.com/en/1.0.0/
[markdownlint]: https://dlaa.me/markdownlint/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at <support@senzing.com>. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at support@senzing.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,10 @@ hello-world: hello-world-osarch-specific
# -----------------------------------------------------------------------------

.PHONY: dependencies-for-development
dependencies-for-development:
dependencies-for-development: dependencies-for-development-osarch-specific
@go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
@go install github.com/vladopajic/go-test-coverage/v2@latest
@go install golang.org/x/tools/cmd/godoc@latest
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.58.1


.PHONY: dependencies
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ interface include:

## Use

(TODO:)
See [main.go] for an example of use.

## References

Expand Down Expand Up @@ -75,6 +75,7 @@ interface include:
[gRPC]: https://github.com/senzing-garage/knowledge-base/blob/main/WHATIS/grpc.md
[License Badge]: https://img.shields.io/badge/License-Apache2-brightgreen.svg
[License]: https://github.com/senzing-garage/sz-sdk-go-core/blob/main/LICENSE
[main.go]: main.go
[Package reference]: https://pkg.go.dev/github.com/senzing-garage/sz-sdk-go-core
[Senzing Garage]: https://github.com/senzing-garage
[Senzing Quick Start guides]: https://docs.senzing.com/quickstart/
Expand Down
60 changes: 18 additions & 42 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,57 +11,33 @@ The Senzing sz-sdk-go-core packages enable Go programs to call Senzing library f
Under the covers, Golang's CGO is used by the sz-sdk-go-core packages to make the calls
to the Senzing functions.
More information at https://github.com/senzing-garage/sz-sdk-go-core
More information at [sz-sdk-go-core].
# Installing Senzing library
Since the Senzing library is a pre-requisite, it must be installed first.
Since the Senzing API library is a pre-requisite, it must be installed first.
This can be done by installing the Senzing package using apt, yum,
or a technique using Docker containers.
Once complete, the Senzing library will be installed in the /opt/senzing directory.
Using apt:
wget https://senzing-production-apt.s3.amazonaws.com/senzingrepo_1.0.0-1_amd64.deb
sudo apt install ./senzingrepo_1.0.0-1_amd64.deb
sudo apt update
sudo apt install senzingapi
Using yum:
sudo yum install https://senzing-production-yum.s3.amazonaws.com/senzingrepo-1.0.0-1.x86_64.rpm
sudo yum install senzingapi
Using Docker, build an installer:
curl -X GET \
--output /tmp/senzing-versions-latest.sh \
https://raw.githubusercontent.com/senzing-garage/knowledge-base/main/lists/senzing-versions-latest.sh
source /tmp/senzing-versions-latest.sh
sudo docker build \
--build-arg SENZING_ACCEPT_EULA=I_ACCEPT_THE_SENZING_EULA \
--build-arg SENZING_APT_INSTALL_PACKAGE=senzingapi=${SENZING_VERSION_SENZINGAPI_BUILD} \
--build-arg SENZING_DATA_VERSION=${SENZING_VERSION_SENZINGDATA} \
--no-cache \
--tag senzing/installer:${SENZING_VERSION_SENZINGAPI} \
https://github.com/senzing-garage/docker-installer.git#main
Using Docker, install Senzing:
sudo rm -rf /opt/senzing
sudo mkdir -p /opt/senzing
sudo docker run \
--rm \
--user 0 \
--volume /opt/senzing:/opt/senzing \
senzing/installer:${SENZING_VERSION_SENZINGAPI}
See [How to install Senzing API].
# Examples
Examples of use can be seen in the xxxx_test.go files.
[bob]: https://www.bob.com
In addition to the examples in the documentation, the test files provide additional examples:
- [szconfig_test.go]
- [szconfigmanager_test.go]
- [szdiagnostic_test.go]
- [szengine_test.go]
- [szproduct_test.go]
[How to install Senzing API]: https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/install-senzing-api.md
[sz-sdk-go-core]: https://github.com/senzing-garage/sz-sdk-go-core
[szconfig_test.go]: https://github.com/senzing-garage/sz-sdk-go-core/blob/main/szconfig/szconfig_test.go
[szconfigmanager_test.go]: https://github.com/senzing-garage/sz-sdk-go-core/blob/main/szconfigmanager/szconfigmanager_test.go
[szdiagnostic_test.go]: https://github.com/senzing-garage/sz-sdk-go-core/blob/main/szdiagnostic/szdiagnostic_test.go
[szengine_test.go]: https://github.com/senzing-garage/sz-sdk-go-core/blob/main/szengine/szengine_test.go
[szproduct_test.go]: https://github.com/senzing-garage/sz-sdk-go-core/blob/main/szproduct/szproduct_test.go
*/
package main
22 changes: 22 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,28 @@ Example:

```

## Debugging

### View SQLite

1. View the SQLite database.
Example:

```console
docker run \
--env SQLITE_DATABASE=G2C.db \
--interactive \
--name SqliteWeb \
--publish 9174:8080 \
--rm \
--tty \
--volume /tmp/sqlite:/data \
coleifer/sqlite-web

```

Visit [localhost:9174](http://localhost:9174).

## References

[clone-repository]: https://github.com/senzing-garage/knowledge-base/blob/main/HOWTO/clone-repository.md
Expand Down
18 changes: 10 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
module github.com/senzing-garage/sz-sdk-go-core

go 1.21
go 1.22.0

toolchain go1.23.1

require (
github.com/aquilax/truncate v1.0.0
github.com/senzing-garage/go-helpers v0.6.1
github.com/senzing-garage/go-logging v1.5.1
github.com/senzing-garage/go-messaging v1.5.2
github.com/senzing-garage/go-observing v0.3.3
github.com/senzing-garage/sz-sdk-go v0.14.0
github.com/senzing-garage/sz-sdk-go v0.14.1
github.com/stretchr/testify v1.9.0
golang.org/x/text v0.18.0
)

require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/kr/text v0.2.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed // indirect
google.golang.org/grpc v1.66.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.66.1 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ github.com/senzing-garage/go-messaging v1.5.2 h1:lU9W2HV3zKQsDU9Vs7lwe/C/LbHVCMn
github.com/senzing-garage/go-messaging v1.5.2/go.mod h1:iEWGVuDGWjolIkwLqnn9oJS7ifF3aoZjTtI44tf1gWQ=
github.com/senzing-garage/go-observing v0.3.3 h1:AhQYgOG012sDZtWXYcXVAaS5qEoDjlWmPYJDVCUZ/g0=
github.com/senzing-garage/go-observing v0.3.3/go.mod h1:qFUi5Dwb6vmd7izTZGjGbWKUGRHzWzsgbsX3oNSD198=
github.com/senzing-garage/sz-sdk-go v0.14.0 h1:Pv+CGgl3qFmaksMlzkcMATdFplnWZi3oFx+enFU9rcM=
github.com/senzing-garage/sz-sdk-go v0.14.0/go.mod h1:pr9d622FPNGFPgAFooCcUWNeh+AEyVDkvR3Fmsp6whg=
github.com/senzing-garage/sz-sdk-go v0.14.1 h1:bJOOHROg/SMEZ8KhCypVMr7scMzCuSpDpcMR9e4gzsA=
github.com/senzing-garage/sz-sdk-go v0.14.1/go.mod h1:9Kvr/NpNoU1DSKpVXmZ+91/WFMKvXmjuubFhAiS69Ts=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed h1:J6izYgfBXAI3xTKLgxzTmUltdYaLsuBxFCgDHWJ/eXg=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.66.0 h1:DibZuoBznOxbDQxRINckZcUvnCEvrW9pcWIE2yF9r1c=
google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU=
google.golang.org/grpc v1.66.1 h1:hO5qAXR19+/Z44hmvIM4dQFMSYX9XcWsByfoxutBpAM=
google.golang.org/grpc v1.66.1/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
6 changes: 6 additions & 0 deletions makefiles/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ coverage-osarch-specific:
@open file://$(MAKEFILE_DIRECTORY)/coverage.html


.PHONY: dependencies-for-development-osarch-specific
dependencies-for-development-osarch-specific:
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin latest


.PHONY: documentation-osarch-specific
documentation-osarch-specific:
@pkill godoc || true
@godoc &
@open http://localhost:6060

Expand Down
8 changes: 6 additions & 2 deletions makefiles/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,14 @@ coverage-osarch-specific:
@xdg-open $(MAKEFILE_DIRECTORY)/coverage.html


.PHONY: dependencies-for-development-osarch-specific
dependencies-for-development-osarch-specific:
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin latest


.PHONY: documentation-osarch-specific
documentation-osarch-specific:
@pkill godoc || true
@godoc &
@xdg-open http://localhost:6060

Expand All @@ -57,10 +63,8 @@ setup-osarch-specific:

.PHONY: test-osarch-specific
test-osarch-specific:
@go test -v -p 1 ./szengine -run TestSzengine_Destroy_multipleEngines
@go test -json -v -p 1 ./... 2>&1 | tee /tmp/gotest.log | gotestfmt


# -----------------------------------------------------------------------------
# Makefile targets supported only by this platform.
# -----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions makefiles/windows.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ coverage-osarch-specific:

.PHONY: documentation-osarch-specific
documentation-osarch-specific:
@taskkill /f /t/im godoc
@start /b godoc
@explorer http://localhost:6060

Expand Down
2 changes: 1 addition & 1 deletion szabstractfactory/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ package szabstractfactory

/*
ComponentID is the identifier of the szabstractfactory package.
abstractfactory package messages will have the format "SZSDK6000eeee" where "eeee" is the error identifier.
Package abstractfactory messages will have the format "SZSDK6000eeee" where "eeee" is the error identifier.
*/
const ComponentID = 6000
10 changes: 5 additions & 5 deletions szabstractfactory/szabstractfactory.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Szabstractfactory struct {
// ----------------------------------------------------------------------------

/*
The CreateSzConfig method returns an SzConfig object
Method CreateSzConfig returns an SzConfig object
implemented to use the Senzing native C binary, libSz.so.
Input
Expand All @@ -44,7 +44,7 @@ func (factory *Szabstractfactory) CreateSzConfig(ctx context.Context) (senzing.S
}

/*
The CreateSzConfigManager method returns an SzConfigManager object
Method CreateSzConfigManager returns an SzConfigManager object
implemented to use the Senzing native C binary, libSz.so.
Input
Expand All @@ -60,7 +60,7 @@ func (factory *Szabstractfactory) CreateSzConfigManager(ctx context.Context) (se
}

/*
The CreateSzDiagnostic method returns an SzDiagnostic object
Method CreateSzDiagnostic returns an SzDiagnostic object
implemented to use the Senzing native C binary, libSz.so.
Input
Expand All @@ -76,7 +76,7 @@ func (factory *Szabstractfactory) CreateSzDiagnostic(ctx context.Context) (senzi
}

/*
The CreateSzEngine method returns an SzEngine object
Method CreateSzEngine returns an SzEngine object
implemented to use the Senzing native C binary, libSz.so.
Input
Expand All @@ -92,7 +92,7 @@ func (factory *Szabstractfactory) CreateSzEngine(ctx context.Context) (senzing.S
}

/*
The CreateSzProduct method returns an SzProduct object
Method CreateSzProduct returns an SzProduct object
implemented to use the Senzing native C binary, libSz.so.
Input
Expand Down
Loading

0 comments on commit 03ef2f3

Please sign in to comment.