Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved all source code into src dir. #32

Merged
merged 3 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions notex.txt

This file was deleted.

File renamed without changes.
7 changes: 1 addition & 6 deletions Class/Groups.ts → src/Class/Groups.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { Group } from "../types/Group";
import { arraysHaveSameValues } from "../utils/array";

interface Group {
id: number;
path: string[];
studentIds: string[];
}

class Groups {
private groups: Group[] = [];

Expand Down
File renamed without changes.
18 changes: 8 additions & 10 deletions alg/TimeDistribution.ts → src/alg/TimeDistribution.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { DirectedGraph, GraphNode } from "../Class/Graph";
import Project from "../types/Project";
import Student from "../types/Student";
import Item from "../types/Item";
import PollQuestion from "../types/Polls";

import createGraph from "./TimeDistribution/CreateGraph";
import { Group, Groups } from "../Class/Groups";
import { PriorityQueue } from "../Class/PriorityQueue";
import { Path } from "../types/Path";
import { findPathsForEachGroup } from "./TimeDistribution/FindPaths";
import PollQuestion from "../types/Polls";
import Student from "../types/Student";
import createGraph from "./TimeDistribution/CreateGraph";
import { distributeGroupsToPaths } from "./TimeDistribution/DistributeGroups";
import { allocateGroupsToItems } from "./TimeDistribution/AllocateGroupsToItems";
import { findPathsForEachGroup } from "./TimeDistribution/FindPaths";
import { getVotingIds } from "./TimeDistribution/Utils";
import { allocateGroupsToItems } from "./TimeDistribution/AllocateGroupsToItems";
import Item from "../types/Item";
import Project from "../types/Project";
import { Path } from "../types/Path";

function buildGroupsWithSamePaths(
polls: PollQuestion[],
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion data/Projects.ts → src/data/Projects.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Project } from "../test/data";
import { Project } from "../../test/data";

const berlin: Project = {
_id: "projectId1",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions src/types/Group.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export interface Group {
id: number;
path: string[];
studentIds: string[];
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test/Groups.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Groups, Group } from "../Class/Groups";
import { Groups, Group } from "../src/Class/Groups";

describe("Groups class", () => {
let groups: Groups;
Expand Down
8 changes: 4 additions & 4 deletions test/data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import PollQuestion from "../types/Polls";
import Student from "../types/Student";
import Item from "../types/Item";
import Project from "./../types/Project";
import PollQuestion from "../src/types/Polls";
import Student from "../src/types/Student";
import Item from "../src/types/Item";
import Project from "../src/types/Project";

const items: Item[] = [
{
Expand Down
2 changes: 1 addition & 1 deletion test/graph.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DirectedGraph, GraphNode } from "../Class/Graph"; // Replace with your actual file path
import { DirectedGraph } from "../src/Class/Graph"; // Replace with your actual file path

describe("DirectedGraph", () => {
it("should add nodes correctly", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/pq.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PriorityQueue } from "../Class/PriorityQueue";
import { PriorityQueue } from "../src/Class/PriorityQueue";

describe("PriorityQueue", () => {
it("should enqueue elements with proper priority and dequeue in correct order", () => {
Expand Down
5 changes: 3 additions & 2 deletions test/timeDistribution.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { getVotingIds, main } from "../alg/TimeDistribution";
import { main } from "../src/alg/TimeDistribution";
import {
findItemsByStudentId,
getDefaultIds,
} from "../alg/TimeDistribution/Utils";
getVotingIds,
} from "../src/alg/TimeDistribution/Utils";
import { items, polls, students, project } from "./data";

describe("Time Distribution Algorithm", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/array.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { arraysHaveSameValues } from "../../utils/array";
import { arraysHaveSameValues } from "../../src/utils/array";

describe("arraysHaveSameValues", () => {
it("should return true for arrays with the same values", () => {
Expand Down