Skip to content

Commit

Permalink
Merge pull request #849 from singnet/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
anandrgitnirman authored Sep 22, 2022
2 parents 1540771 + f3cc0cc commit 1bec11f
Show file tree
Hide file tree
Showing 53 changed files with 3,076 additions and 26,094 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
push:
branches:
- master
- development

name: Sonar Analysis Workflow
jobs:
sonarQubeTrigger:
name: SonarQube Trigger
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: SonarQube Scan
uses: kitabisa/sonarqube-action@master
with:
host: ${{ secrets.SONAR_HOST }}
login: ${{ secrets.SONAR_TOKEN }}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ src/assets/images/ThirdPartyServices/*
#storybook
storybook-static/

#workflows
.github/

# macbook files
.DS_Store

Expand Down
26,063 changes: 0 additions & 26,063 deletions package-lock.json

This file was deleted.

4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.projectKey=marketplace-dapp
sonar.projectName=marketplace-dapp
sonar.projectVersion=0.0.1
sonar.sources=.
23 changes: 23 additions & 0 deletions src/Redux/actionCreators/ServiceDetailsActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { LoaderContent } from "../../utility/constants/LoaderContent";
export const UPDATE_SERVICE_DETAILS = "UPDATE_SERVICE_DETAILS";
export const RESET_SERVICE_DETAILS = "RESET_SERVICE_DETAILS";
export const UPDATE_FREE_CALLS_INFO = "UPDATE_FREE_CALLS_INFO";
export const UPDATE_TRAINING_DETAILS = "UPDATE_TRAINING_DETAILS";

const resetServiceDetails = dispatch => {
dispatch({ type: RESET_SERVICE_DETAILS });
Expand Down Expand Up @@ -53,6 +54,28 @@ const fetchMeteringDataSuccess = usageData => dispatch => {
});
};

const fetchTrainingModelSuccess = serviceTrainingData => dispatch => {
dispatch({ type: UPDATE_TRAINING_DETAILS, payload: serviceTrainingData });
};

const fetchServiceTrainingDataAPI = async(orgId, serviceId)=>{
try{
const dataForUrl = await fetchServiceDetailsAPI(orgId, serviceId);
const url = `${dataForUrl.data.groups[0].endpoints[0].endpoint}/servicemethoddetails`;
const response = await fetch(url);
return response.json();
}
catch(error){
return {};
}
};

export const fetchTrainingModel = (orgId, serviceId) => async dispatch =>{
const serviceTrainingData = await fetchServiceTrainingDataAPI(orgId, serviceId);
dispatch(fetchTrainingModelSuccess(serviceTrainingData));

};

const meteringAPI = (token, orgId, serviceId, groupId, userId) => {
const apiName = APIEndpoints.USER.name;
const apiPath = APIPaths.FREE_CALL_USAGE;
Expand Down
4 changes: 4 additions & 0 deletions src/Redux/reducers/ServiceDetailsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import map from "lodash/map";
const InitialServiceDetails = {
details: {},
freeCallsUsed: "",
detailsTraining: {},
};

const serviceDetailsReducer = (state = InitialServiceDetails, action) => {
Expand All @@ -20,6 +21,9 @@ const serviceDetailsReducer = (state = InitialServiceDetails, action) => {
case serviceDetailsActions.UPDATE_FREE_CALLS_INFO: {
return { ...state, freeCallsUsed: action.payload };
}
case serviceDetailsActions.UPDATE_TRAINING_DETAILS: {
return { ...state, detailsTraining: action.payload };
}
default: {
return state;
}
Expand Down
Binary file added src/assets/images/Metamask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/assets/images/fileDownload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/images/models_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/assets/images/transaction_icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/assets/thirdPartyServices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const FBProphetForecastService = lazy(() => import("./snet/fbprophet-forecast"))
const CovidDetection = lazy(() => import("./rejuve/covid-detection"));
const BinaryClassification = lazy(() => import("./nunet-org/binary-classification"));
const UclnlpService = lazy(() => import("./nunet-org/uclnlp-service"));
//const FakeNewsScoreService = lazy(() => import("./nunet-org/fake-news-score-service"));
const FakeNewsScoreService = lazy(() => import("./nunet-org/fake_news_score_service"));
//ADD_CONSTANTS_HERE

class ThirdPartyCustomUIComponents {
Expand Down Expand Up @@ -160,7 +160,7 @@ addSnetCustomUI("fbprophet-forecast", FBProphetForecastService);
addRejuveCustomUI("covid-detection", CovidDetection);
addNunetCustomUI("binary-classification-service", BinaryClassification);
addNunetCustomUI("uclnlp-service", UclnlpService);
//addNunetCustomUI("fake-news-score-service", FakeNewsScoreService);
addNunetCustomUI("fake-news-score-service", FakeNewsScoreService);

//TODO remove before deploying to mainnet
addOrg2CustomUI("freecall", ExampleService);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
syntax = "proto3";

message InputFNS {
string headline = 1;
string body = 2;
string call_id = 3;
string tracer_info = 4;
}

message Score {
string stance = 1;
double agree = 2;
double disagree = 3;
double discuss = 4;
double unrelated = 5;
}

message Resp {
string response =1;
}

service FakeNewsScore {
rpc fn_score_calc(InputFNS) returns (Resp) {}
}


//TODO: warning -- upstream code change (SNET)
Loading

0 comments on commit 1bec11f

Please sign in to comment.