Skip to content

Commit

Permalink
Fix 124 identifiers sha (#135)
Browse files Browse the repository at this point in the history
* run configurations

* adding a uuid command to get uuid for a file sent to stdin.
updated cobra and viper package versions

* Example JSON Paths and arrays of paths


* glcon tool id --idtype indentifiersha --jsonld some file

* test for #129.

* Implemented changes to prevent context mangling

*

* Get things working and DRY code up a bit

* Extract out a constant and a json processing function

* Add test for json finding method

* Test for the api config helper

* Try to make this work for DataStream as well

* Identifiers fix for @graph


* fix wrap in quotes 'script[type="application/ld+json"]'

* add an ideal example resource

* IdentiferPath is a comma separated set of strings, or one string.

* If you are trying not to recorder an array... and copy it, don't use the original later
Clean up LdProc Normalize Tests. Empty triples will be empty triples

* #150 #108
initialize gleaner and nabu configs idependently.

* #145

* added test for a couple of problem children.

* methods to allow dumping data before upload

and glcon tools
jsonld: jsonld > corrected jsonld
rdf: jsonld > rdf

* add a couple resources for cli testing

* Headless rework to make more testable

* Fix Minio connection check error, like was done on nabu

* Implement headlessWait in the headless Javascript.
Fixes #152

* Implement headlessWait in the headless Javascript.
Fixes #152
add a test that is expected to fail, with 1 JSONld returned.

* #155 enable --prefix flag for nabu

* Using c.Page.LoadEventFired to wait for content.
Works. leaving in the headlessWait incase another issue that requires its.

* linux reading of config not working. Updating modules

* Use the config class to read the gleanerConfig.

* Use the config class to read the gleanerConfig.

* Cleaned up tests. Files now used. (#161)

Added ability to just generate a sha of the json.
Was option, but not coded.

* Fix 124 identifiers tests (#162)

* Cleaned up tests. Files now used.
Added ability to just generate a sha of the json.
Was option, but not coded.

* put in approvals into jsonutils

* use log.info not println so this does not show up in console output.

* test for #129.

* Implemented changes to prevent context mangling

* Example JSON Paths and arrays of paths

* clean up some logging CLI.

* glcon tool id --idtype indentifiersha --jsonld some file

* If it's an array, we standardized.
Tests to be sure arrays are not mangled by string
and that strings are not mangled by array.


* IdentiferPath is a comma separated set of strings, or one string.

* methods to allow dumping data before upload
 glcon tools
jsonld: jsonld > corrected jsonld
rdf: jsonld > rdf

Added ability to just generate a sha of the json.
Was option, but not coded.

* Fix 124 identifiers tests (#162)

* put in approvals into jsonutils

* add approval test .approved

* Sort the jsonpath results because UUID generation depends on order of results.


* One more fix for tool id. If no config is passed, just use a generic one.
We need is the contexts, for the triples if it falls through to a normalizedsha
makefile. copy binaries up to that assets are in correct location relative to binaries


---------

Co-authored-by: melinda <melindaminch@oceannetworks.ca>
Co-authored-by: Douglas Fils <drfils@gmail.com>
  • Loading branch information
3 people authored Mar 6, 2023
1 parent ecbab66 commit 5049528
Show file tree
Hide file tree
Showing 62 changed files with 29,487 additions and 25,578 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_gleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ jobs:
project_path: "./cmd/gleaner"
binary_name: "gleaner"
ldflags: "-s -w -X main.VERSION=${{ env.VERSION }}"
extra_files: README.md docs/ configs/ scripts/ schemaorg-current-https.jsonld
extra_files: README.md docs/ configs/ scripts/ assets/
# extra_files: LICENSE README.md
2 changes: 1 addition & 1 deletion .github/workflows/release_gleaner_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
project_path: "./cmd/glcon"
binary_name: "glcon"
ldflags: "-s -w -X main.VERSION=${{ env.VERSION }}"
extra_files: README.md docs/ configs/ scripts/ schemaorg-current-https.jsonld assets/
extra_files: README.md docs/ configs/ scripts/ assets/
# extra_files: LICENSE README.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ configs/local/
**/credentials/
.idea

/configs/wifire/
25 changes: 17 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,44 @@ MAINVERSION :=`cat ../../VERSION`

gleaner:
cd cmd/$(BINARY) ; \
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY)
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY);\
cp $(BINARY) ../../


gleaner.exe:
cd cmd/$(BINARY) ; \
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY).exe
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY).exe;\
cp $(BINARY).exe ../../

gleaner.darwin:
cd cmd/$(BINARY) ; \
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY)_darwin
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY)_darwin;\
cp $(BINARY)_darwin ../../

gleaner.m2:
cd cmd/$(BINARY) ; \
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY)_m2
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARY)_m2;\
cp $(BINARY)_m2 ../../

glcon:
cd cmd/$(BINARYIO) ; \
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO)
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO);\
cp $(BINARYIO) ../../

glcon.exe:
cd cmd/$(BINARYIO) ; \
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO).exe
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO).exe;\
cp $(BINARYIO).exe ../../

glcon.darwin:
cd cmd/$(BINARYIO) ; \
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO)_darwin
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO)_darwin ;\
cp $(BINARYIO)_darwin ../../

glcon.m2:
cd cmd/$(BINARYIO) ; \
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO)_m2
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 env go build -ldflags "-X main.VERSION=$(MAINVERSION)" -o $(BINARYIO)_m2;\
cp $(BINARYIO)_m2 ../../

releases: gleaner gleaner.exe gleaner.darwin gleaner.m2 glcon glcon.exe glcon.darwin glcon.m2

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.0.7-development
v3.0.8-fix129
4 changes: 2 additions & 2 deletions cmd/glcon/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package main

import (
"fmt"
"github.com/gleanerio/gleaner/pkg/cli"
log "github.com/sirupsen/logrus"
)

var VERSION string

func main() {
fmt.Println("version: ", VERSION)
log.Info("version: ", VERSION)
cli.Execute()
}
Loading

0 comments on commit 5049528

Please sign in to comment.