Skip to content

Commit

Permalink
Fixes #11, add gRPC to/from DB type converter
Browse files Browse the repository at this point in the history
  • Loading branch information
dhirajsb committed Sep 27, 2023
1 parent 675a709 commit 1e45ffa
Show file tree
Hide file tree
Showing 5 changed files with 832 additions and 4 deletions.
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,25 @@ internal/ml_metadata/proto/%.pb.go: api/grpc/ml_metadata/proto/%.proto
.PHONY: gen/grpc
gen/grpc: internal/ml_metadata/proto/metadata_store.pb.go internal/ml_metadata/proto/metadata_store_service.pb.go

internal/converter/generated/converter.go: internal/converter/*.go
goverter -packageName generated -output ./internal/converter/generated/converter.go github.com/opendatahub-io/model-registry/internal/converter/

.PHONY: gen/converter
gen/converter: gen/grpc gen/graph internal/converter/generated/converter.go

.PHONY: gen/graph
gen/graph: internal/model/graph/models_gen.go

internal/model/graph/models_gen.go: api/graphql/*.graphqls gqlgen.yml
go run github.com/99designs/gqlgen generate
gqlgen generate

.PHONY: vet
vet:
go vet ./...

.PHONY: clean
clean:
rm -Rf ./model-registry internal/ml_metadata/proto/*.go internal/model/graph/models_gen.go
rm -Rf ./model-registry internal/ml_metadata/proto/*.go internal/model/graph/models_gen.go internal/converter/generated/converter.go

bin/go-enum:
GOBIN=$(PROJECT_BIN) go install github.com/searKing/golang/tools/[email protected]
Expand Down Expand Up @@ -58,7 +64,7 @@ build: gen vet lint
go build

.PHONY: gen
gen: gen/grpc gen/graph
gen: deps gen/grpc gen/graph gen/converter
go generate ./...

.PHONY: lint
Expand Down
1 change: 0 additions & 1 deletion cmd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ func loadLibraries(dbConn *gorm.DB) error {
}
glog.Infof("created/updated %d ArtifactTypes, %d ContextTypes and %d ExecutionTypes from library file %s",
len(response.ArtifactTypeIds), len(response.ContextTypeIds), len(response.ExecutionTypeIds), path)
return nil
}
return nil
}
Expand Down
Loading

0 comments on commit 1e45ffa

Please sign in to comment.