Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #51 from appdevgbb/gk/50-invoke-hf-inference-endpo…
Browse files Browse the repository at this point in the history
…int-to-generate-product-image

PR 1/3 image-gen via SD model in HF
  • Loading branch information
thegovind authored Jan 11, 2023
2 parents bd6e20c + 358679c commit 68a866a
Show file tree
Hide file tree
Showing 94 changed files with 281 additions and 257 deletions.
2 changes: 1 addition & 1 deletion accounting-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>2.7.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.microsoft.gbb.rasa</groupId>
<groupId>com.microsoft.gbb.reddog</groupId>
<artifactId>accounting-service</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>accounting-service</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice;
package com.microsoft.gbb.reddog.accountingservice;

import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories;
import org.springframework.boot.SpringApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.config;
package com.microsoft.gbb.reddog.accountingservice.config;

import com.azure.cosmos.CosmosClientBuilder;
import com.azure.cosmos.DirectConnectionConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.gbb.rasa.makelineservice.config;
package com.microsoft.gbb.reddog.accountingservice.config;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.config;
package com.microsoft.gbb.reddog.accountingservice.config;

import org.apache.kafka.clients.admin.AdminClientConfig;
import org.apache.kafka.clients.admin.NewTopic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.config;
package com.microsoft.gbb.reddog.accountingservice.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.microsoft.gbb.rasa.accountingservice.controller;
package com.microsoft.gbb.reddog.accountingservice.controller;

import com.microsoft.gbb.rasa.accountingservice.dto.ChartKeyValue;
import com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.rasa.accountingservice.service.AccountingService;
import com.microsoft.gbb.reddog.accountingservice.dto.ChartKeyValue;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.reddog.accountingservice.service.AccountingService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.dto;
package com.microsoft.gbb.reddog.accountingservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.dto;
package com.microsoft.gbb.reddog.accountingservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.dto;
package com.microsoft.gbb.reddog.accountingservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.dto;
package com.microsoft.gbb.reddog.accountingservice.dto;

import com.azure.spring.data.cosmos.core.mapping.Container;
import com.azure.spring.data.cosmos.core.mapping.PartitionKey;
Expand All @@ -7,7 +7,6 @@
import lombok.*;
import org.springframework.data.annotation.Id;

import java.time.Instant;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.dto;
package com.microsoft.gbb.reddog.accountingservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.dto;
package com.microsoft.gbb.reddog.accountingservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.exception;
package com.microsoft.gbb.reddog.accountingservice.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.server.ResponseStatusException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.mapper;
package com.microsoft.gbb.reddog.accountingservice.mapper;

import java.util.List;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package com.microsoft.gbb.reddog.accountingservice.mapper;

import com.microsoft.gbb.reddog.accountingservice.dto.OrderItemSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.model.OrderItemSummary;
import org.mapstruct.Mapper;

@Mapper(componentModel = "spring")
public interface OrderItemSummaryMapper extends EntityMapper<OrderItemSummaryDto, OrderItemSummary> {
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.microsoft.gbb.rasa.orderservice.mapper;
package com.microsoft.gbb.reddog.accountingservice.mapper;

import com.microsoft.gbb.rasa.orderservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.orderservice.entities.OrderSummary;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.model.OrderSummary;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.microsoft.gbb.rasa.accountingservice.messaging;
package com.microsoft.gbb.reddog.accountingservice.messaging;

import com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.kafka.core.KafkaTemplate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.model;
package com.microsoft.gbb.reddog.accountingservice.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.model;
package com.microsoft.gbb.reddog.accountingservice.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.microsoft.gbb.rasa.accountingservice.repositories;
package com.microsoft.gbb.reddog.accountingservice.repositories;

import com.azure.spring.data.cosmos.repository.CosmosRepository;
import com.azure.spring.data.cosmos.repository.Query;
import com.microsoft.gbb.rasa.accountingservice.dto.ChartKeyValue;
import com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.reddog.accountingservice.dto.ChartKeyValue;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.dto.OrdersTimeSeries;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.microsoft.gbb.rasa.accountingservice.service;
package com.microsoft.gbb.reddog.accountingservice.service;

import com.microsoft.gbb.rasa.accountingservice.dto.ChartKeyValue;
import com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.rasa.accountingservice.repositories.OrderSummaryRepository;
import com.microsoft.gbb.reddog.accountingservice.dto.ChartKeyValue;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.reddog.accountingservice.repositories.OrderSummaryRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down
8 changes: 4 additions & 4 deletions accounting-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spring:
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto
mapping: ordersummary:com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto
sasl:
mechanism: ${KAFKASASLMECHANISM:PLAIN}
jaas:
Expand All @@ -28,9 +28,9 @@ cosmos:
uri: ${AZURECOSMOSDBURI}
eureka:
client:
register-with-eureka: true
fetch-registry: true
enabled: true
register-with-eureka: false
fetch-registry: false
enabled: false
server:
port: '8087'
topic:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.microsoft.gbb.rasa.accountingservice.controller;
package com.microsoft.gbb.reddog.accountingservice.controller;

import com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.accountingservice.service.AccountingService;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.service.AccountingService;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package com.microsoft.gbb.rasa.accountingservice.service;
package com.microsoft.gbb.reddog.accountingservice.service;

import com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.rasa.accountingservice.dto.TimeSeries;
import com.microsoft.gbb.rasa.accountingservice.repositories.OrderSummaryRepository;
import com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.accountingservice.dto.OrdersTimeSeries;
import com.microsoft.gbb.reddog.accountingservice.dto.TimeSeries;
import com.microsoft.gbb.reddog.accountingservice.repositories.OrderSummaryRepository;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spring:
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.rasa.accountingservice.dto.OrderSummaryDto
mapping: ordersummary:com.microsoft.gbb.reddog.accountingservice.dto.OrderSummaryDto
sasl:
mechanism: ${KAFKASASLMECHANISM:PLAIN}
jaas:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ spring:
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.rasa.makelineservice.dto.OrderSummaryDto
mapping: ordersummary:com.microsoft.gbb.reddog.makelineservice.dto.OrderSummaryDto
consumer:
group-id: ${KAFKA_CONSUMER_GROUP_ID:makelineservice}
auto-offset-reset: latest
properties:
spring:
json:
trusted.packages: "*"
type.mapping: ordersummary:com.microsoft.gbb.rasa.makelineservice.dto.OrderSummaryDto
type.mapping: ordersummary:com.microsoft.gbb.reddog.makelineservice.dto.OrderSummaryDto
sasl:
jaas:
config: ${KAFKASASLJAASCONFIG}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spring:
spring:
json:
type:
mapping: ordersummary:com.microsoft.gbb.rasa.orderservice.dto.OrderSummaryDto
mapping: ordersummary:com.microsoft.gbb.reddog.orderservice.dto.OrderSummaryDto
bootstrap-servers: ${KAFKABOOTSTRAPSERVERS:localhost:9092}
security:
protocol: ${KAFKASECURITYPROTOCOL:PLAINTEXT}
Expand Down
2 changes: 1 addition & 1 deletion ancillary/local-eureka-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>2.7.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.microsoft.gbb.rasa</groupId>
<groupId>com.microsoft.gbb.reddog</groupId>
<artifactId>local-eureka-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>local-eureka-server</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.localeurekaserver;
package com.microsoft.gbb.reddog.localeurekaserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.localeurekaserver;
package com.microsoft.gbb.reddog.localeurekaserver;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
Expand Down
6 changes: 3 additions & 3 deletions loyalty-service/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ spring:
value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
eureka:
client:
register-with-eureka: true
fetch-registry: true
enabled: true
register-with-eureka: false
fetch-registry: false
enabled: false
management:
endpoints:
web:
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package com.microsoft.gbb.rasa.makelineservice;
package com.microsoft.gbb.reddog.makelineservice;

import com.azure.spring.data.cosmos.repository.config.EnableCosmosRepositories;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.redis.repository.configuration.EnableRedisRepositories;

@SpringBootApplication
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.config;
package com.microsoft.gbb.reddog.makelineservice.config;

import com.azure.cosmos.CosmosClientBuilder;
import com.azure.cosmos.DirectConnectionConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.microsoft.gbb.rasa.accountingservice.config;
package com.microsoft.gbb.reddog.makelineservice.config;

import lombok.Getter;
import lombok.Setter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.config;
package com.microsoft.gbb.reddog.makelineservice.config;

import org.apache.kafka.clients.admin.AdminClientConfig;
import org.apache.kafka.clients.admin.NewTopic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.microsoft.gbb.rasa.makelineservice.config;
package com.microsoft.gbb.reddog.makelineservice.config;

import com.microsoft.gbb.rasa.makelineservice.model.OrderSummary;
import com.microsoft.gbb.reddog.makelineservice.model.OrderSummary;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.config;
package com.microsoft.gbb.reddog.makelineservice.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.microsoft.gbb.rasa.makelineservice.controller;
package com.microsoft.gbb.reddog.makelineservice.controller;

import com.microsoft.gbb.rasa.makelineservice.dto.OrderSummaryDto;
import com.microsoft.gbb.rasa.makelineservice.exception.SaveOrderException;
import com.microsoft.gbb.rasa.makelineservice.service.MakelineService;
import com.microsoft.gbb.reddog.makelineservice.dto.OrderSummaryDto;
import com.microsoft.gbb.reddog.makelineservice.exception.SaveOrderException;
import com.microsoft.gbb.reddog.makelineservice.service.MakelineService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.dto;
package com.microsoft.gbb.reddog.makelineservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.dto;
package com.microsoft.gbb.reddog.makelineservice.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.accountingservice.dto;
package com.microsoft.gbb.reddog.makelineservice.dto;

import com.azure.spring.data.cosmos.core.mapping.Container;
import com.azure.spring.data.cosmos.core.mapping.PartitionKey;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.microsoft.gbb.rasa.makelineservice.exception;
package com.microsoft.gbb.reddog.makelineservice.exception;

import org.springframework.http.HttpStatus;
import org.springframework.web.server.ResponseStatusException;
Expand Down
Loading

0 comments on commit 68a866a

Please sign in to comment.