Skip to content

Commit

Permalink
various
Browse files Browse the repository at this point in the history
  • Loading branch information
nuuuwan committed Jul 30, 2024
1 parent 1886b80 commit 1f83558
Show file tree
Hide file tree
Showing 12 changed files with 320 additions and 549 deletions.
2 changes: 1 addition & 1 deletion .eslintcache

Large diffs are not rendered by default.

Binary file removed public/images/parties/logo_Ind.png
Binary file not shown.
2 changes: 1 addition & 1 deletion src/nonview/constants/VERSION.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Auto-generated by javascript_version.py
export const DATETIME_STR = "2024-07-30 18:04:50";
export const DATETIME_STR = "2024-07-30 19:47:00";
export const VERSION_DATETIME = new Date(DATETIME_STR);

const VERSION = { DATETIME_STR, VERSION_DATETIME };
Expand Down
95 changes: 1 addition & 94 deletions src/nonview/core/Candidate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import IDX from "../../nonview/base/IDX";
import { CANDIDATE_D_LIST } from "../../nonview/data/CANDIDATE_D_LIST";

export default class Candidate {
constructor(id, firstName, lastName, twtrHandle, imgFile, party) {
Expand Down Expand Up @@ -30,100 +31,6 @@ export default class Candidate {
}
}

const CANDIDATE_D_LIST = [
{
id: "RW",
firstName: "Ranil",
lastName: "Wickramasinghe",
twtrHandle: "RW_UNP",
imgFile: "1244.jpg",
party: "UNP",
},
{
id: "SP",
firstName: "Sajith",
lastName: "Premadasa",
twtrHandle: "SajithPremadasa",
imgFile: "140.jpg",
party: "SJB",
},
{
id: "SF",
firstName: "Sarath",
lastName: "Fonseka",
twtrHandle: "GeneralFonseka",
imgFile: "3135.jpg",
party: "Ind",
},
{
id: "MAS",
firstName: "Mathiaparanan Abraham",
lastName: "Sumanthiran",
twtrHandle: "MASumanthiran",
imgFile: "3194.jpg",
party: "ITAK",
},

{
id: "AKD",
firstName: "Anura Kumara",
lastName: "Disanayake",
twtrHandle: "AnuraDisanayake",
imgFile: "112.jpg",
party: "NPP",
},

// Added 2024
{
id: "WR",
firstName: "Wijeyadasa",
lastName: "Rajapakshe",
twtrHandle: "WijeRajapakshe",
imgFile: "1521.jpg",
party: "SLFP",
},
{
id: "JR",
firstName: "Janaka",
lastName: "Ratnayake",
twtrHandle: "",
imgFile: "JR.jpg",
party: "Ind",
},
{
id: "SK",
firstName: "Sarath",
lastName: "Keerthirathna",
twtrHandle: "SK.jpg",
imgFile: "",
party: "Ind",
},
{
id: "OH",
firstName: "Oshala",
lastName: "Herath",
twtrHandle: "@OshalaHerath",
imgFile: "",
party: "NIF",
},
{
id: "ASPL",
firstName: "ASP",
lastName: "Liyanage",
twtrHandle: "",
imgFile: "ASPL.png",
party: "SLLP",
},
{
id: "NB",
firstName: "Nuwan",
lastName: "Bopage",
twtrHandle: "",
imgFile: "NB.png",
party: "PSA",
},
];

export const CANDIDATE_LIST = CANDIDATE_D_LIST.map((d) =>
Candidate.fromDict(d)
);
Expand Down
4 changes: 2 additions & 2 deletions src/nonview/core/GroundTruth.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ATTR_IDX_NUUUWAN } from "../../nonview/core/GroundTruthRawData";
import { CRITERION_TO_CANDIDATE_TO_SCORE } from "../../nonview/data/CRITERION_TO_CANDIDATE_TO_SCORE";

import MathX from "../../nonview/base/MathX";
const ATTR_IDX_IDX = Object({
"@nuuuwan": ATTR_IDX_NUUUWAN,
"@nuuuwan": CRITERION_TO_CANDIDATE_TO_SCORE,
});

export default class GroundTruth {
Expand Down
126 changes: 0 additions & 126 deletions src/nonview/core/GroundTruthRawData.js

This file was deleted.

11 changes: 1 addition & 10 deletions src/nonview/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@
import Candidate from "./Candidate";
import Criterion from "./Criterion";
import GroundTruth from "./GroundTruth";
import GroundTruthRawData from "./GroundTruthRawData";
import Party from "./Party";
import Version from "./Version";
import Weight from "./Weight";

export {
Candidate,
Criterion,
GroundTruth,
GroundTruthRawData,
Party,
Version,
Weight,
};
export { Candidate, Criterion, GroundTruth, Party, Version, Weight };
Loading

0 comments on commit 1f83558

Please sign in to comment.