Skip to content

Commit e620673

Browse files
committed
Merge branch 'dev-2023S2' into dev
Dev pretty out of date + github hosting broken anyway
2 parents da6ec86 + 50a229d commit e620673

File tree

130 files changed

+13834
-1574
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+13834
-1574
lines changed

.github/workflows/234Tree.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 2-3-4 Tree Algorithm CI
2+
3+
on:
4+
push:
5+
branches: [ feature/no-ref/234-tree-algorithm ]
6+
paths-ignore:
7+
- 'doc/**' # Ignore all files and subdirectories under "doc/"
8+
- 'docs/**' # Ignore all files and subdirectories under "docs/"
9+
pull_request:
10+
branches: [ feature/no-ref/234-tree-algorithm ]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout 🛎️
17+
uses: actions/[email protected]
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install and Test 🔧
22+
run: |
23+
npm install
24+
npm run test-234t

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: CI
66
# events but only for the dev branch
77
on:
88
push:
9-
branches: [ dev ]
9+
branches: [ dev-2023S2 ]
1010
paths-ignore:
1111
- 'doc/**' # Ignore all files and subdirectories under "doc/"
1212
- 'docs/**' # Ignore all files and subdirectories under "docs/"

.github/workflows/unionFind.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Union-Find Algorithm CI
2+
3+
on:
4+
push:
5+
branches: [ feature/no-ref/union-find-algorithm ]
6+
paths-ignore:
7+
- 'doc/**' # Ignore all files and subdirectories under "doc/"
8+
- 'docs/**' # Ignore all files and subdirectories under "docs/"
9+
pull_request:
10+
branches: [ feature/no-ref/union-find-algorithm ]
11+
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout 🛎️
17+
uses: actions/[email protected]
18+
with:
19+
persist-credentials: false
20+
21+
- name: Install and Test 🔧
22+
run: |
23+
npm install
24+
npm run test-uf

.gitignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
# IDES
3-
/.idea
4-
/.vs
5-
/.vscode
6-
71
# dependencies
82
/node_modules
93
/.pnp
104
.pnp.js
11-
package-lock.json
125

136
# testing
147
/coverage

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"davidanson.vscode-markdownlint",
4+
"dbaeumer.vscode-eslint",
5+
"gruntfuggly.todo-tree"
6+
]
7+
}

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "chrome",
6+
"request": "launch",
7+
"name": "Launch Chrome against localhost",
8+
"url": "http://localhost:3000",
9+
"webRoot": "${workspaceFolder}"
10+
}
11+
]
12+
}

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"cspell.enabled": false,
3+
"editor.formatOnSave": true,
4+
}

CONTRIBUTING.md

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
# Contributing to AIA
2+
3+
Hi there! 👋 We're thrilled that you'd like to contribute to AIA.
4+
5+
## Contents
6+
7+
- [Contributing to AIA](#contributing-to-aia)
8+
- [Contents](#contents)
9+
- [Directory structure](#directory-structure)
10+
- [Development setup](#development-setup)
11+
- [Requirements](#requirements)
12+
- [Node.js](#nodejs)
13+
- [Python](#python)
14+
- [Actual AIA setup](#actual-aia-setup)
15+
- [Start](#start)
16+
- [Development cycle](#development-cycle)
17+
- [Test suite](#test-suite)
18+
- [Create new algorithms](#create-new-algorithms)
19+
- [Report a bug](#report-a-bug)
20+
- [Propose a change](#propose-a-change)
21+
22+
## Directory structure
23+
24+
AIA is purely frontend code written in React.
25+
26+
The most important directories:
27+
28+
- [`/src/algorithms`](/src/algorithms) - Where the algorithms are implemented
29+
- [`/src/components`](/src/components) - Where the React components are implemented
30+
- [`/src/pseudocode`](/src/pseudocode) - How the pseudocodes are parsed
31+
32+
## Development setup
33+
34+
### Requirements
35+
36+
#### Node.js
37+
38+
[Node.js](https://nodejs.org/en/) version 18.17.1 or newer is required for development purposes.
39+
40+
#### Python
41+
42+
[Python](https://www.python.org/) version 3.9.6 or newer is required for development purposes.
43+
44+
### Actual AIA setup
45+
46+
> **IMPORTANT**: All the steps below have to get executed at least once to get the development setup up and running!
47+
48+
Now that everything AIA requires to run is installed, the actual AIA code can be
49+
checked out and set up:
50+
51+
1. [Fork](https://guides.github.com/activities/forking/#fork) the AIA repository.
52+
53+
2. Clone your forked repository:
54+
55+
```bash
56+
git clone https://github.com/<your_github_username>/algorithms-in-action.github.io.git
57+
```
58+
59+
3. Go into repository folder:
60+
61+
```bash
62+
cd algorithms-in-action.github.io
63+
```
64+
65+
4. Add the original AIA repository as `upstream` to your forked repository:
66+
67+
```bash
68+
git remote add upstream https://github.com/algorithms-in-action/algorithms-in-action.github.io.git
69+
```
70+
71+
5. Install all dependencies:
72+
73+
```bash
74+
npm install
75+
```
76+
77+
### Start
78+
79+
To start AIA execute:
80+
81+
```bash
82+
npm start
83+
```
84+
85+
## Development cycle
86+
87+
While iterating on AIA code, you can run the following commands:
88+
89+
1. Start AIA:
90+
91+
```bash
92+
npm start
93+
```
94+
95+
2. Hack, hack, hack
96+
3. Check if everything still runs in production mode:
97+
98+
```bash
99+
npm run build
100+
npm install -g serve
101+
serve -s build
102+
```
103+
104+
4. Create tests
105+
5. Run all [tests](#test-suite):
106+
107+
```bash
108+
npm test
109+
```
110+
111+
6. Commit code and [create a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)
112+
113+
### Test suite
114+
115+
The tests can be started via:
116+
117+
```bash
118+
npm test
119+
```
120+
121+
If you run into any trouble, please check the available [npm scripts](package.json) and the [Jest documentation](https://jestjs.io/docs/getting-started).
122+
123+
## Create new algorithms
124+
125+
Follow the instructions in the [algorithms README](/src/algorithms/README.md).
126+
127+
## Report a bug
128+
129+
If you'd like to report a bug, please [open an issue](https://github.com/algorithms-in-action/algorithms-in-action.github.io/issues).
130+
131+
## Propose a change
132+
133+
If you'd like to propose a change, please [open a pull request](https://github.com/algorithms-in-action/algorithms-in-action.github.io/pulls).

README-multiwaytree.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Algorithms in Action
2+
3+
This is most recent version modified by the students from Semester 2 2023 COMP30022 IT Project.
4+
5+
* This is a fork of the main repository. Please track most stable running model.
6+
* The current up-to-date development branch is feature/no-ref/union-find-algorithm.
7+
8+
## Organisation of folders
9+
10+
* src/\
11+
Source code of the web app.
12+
* ui/\
13+
Contains all the images and graphics used for the project.
14+
15+
* Project documentation - (private) <https://www.notion.so/Algorithms-in-Action-9b48dc2c17ee4dd39c82b956c981693e>
16+
* Discord channel - (private) <https://discord.com/channels/1079696215136018472/1133180081771139082>
17+
* Demo of the app (Current Team release) - <https://aia.davidsha.me/>
18+
* Demo of the app (Current Stable release of all teams work) - <https://algorithms-in-action.github.io/>
19+
* Current working repository: <https://github.com/d4vidsha/algorithms-in-action.github.io>
20+
21+
## Deployment
22+
23+
Algorithms in Action is written in JavaScript, using the React framework. To work on it locally, you will need to install Node.js on your machine. Node.js is a JavaScript runtime that will allow us to view the website locally. NPM (Node package manager) is installed alongside when Node is installed. It is a multipurpose tool that will install 3rd party dependencies, start the app, and run test suites.
24+
25+
### First-time Setup
26+
27+
Ensure you have python 3.9.x, node version 18.x and npm version 9.x or higher
28+
29+
To verify, type the following commands in your terminal/ command prompt -
30+
31+
`node --version`
32+
33+
`npm --version`
34+
35+
Navigate to the root directory of the project and run `npm install` to install all the dependencies in package.json
36+
37+
### Running a local development server
38+
39+
Navigate to the root directory of the project and run `npm start` this will start the development server on your local machine on port 3000. The application will be launched automatically in your default browser at <http://localhost:3000>
40+
41+
## Demo
42+
43+
We currently have an accessible link to the application, link has shows as above.
44+
45+
This [link](https://algorithms-in-action.github.io/) above includes changes made by teams at the end of each sprint and is accessible to anyone who has the link. The version of the algorithm in action web application in the above link tracks the changes made to the `dev` branch in the Github repository. When a pull request is submitted, approved, and merged into the `dev` branch from respective team branches, the application will be redeployed with the updated changes.
46+
47+
This [link](https://aia.davidsha.me/) is showing current team's work. It's a fast-tracking branch of alpha release which may be unstable. It has tracked with `feature/no-ref/union-find-algorithm` branch in the GitHub repository.
48+
49+
## Union-Find Algorithm Team
50+
51+
### Development
52+
53+
The main/master branch for this team is `feature/no-ref/234-tree-algorithm`. All official changes made by the Union-Find Algorithm team will be made in this branch.
54+
55+
#### Changelog
56+
57+
Below we make notes on the dev process for the Union-Find Algorithm team.
58+
59+
* [x] After rebasing with the new changes made by the intern, an additional package `run-scripts-os` was added to `package.json` to fix the issue of the app not running on Windows machines.
60+
* [x] Create new Union-Find algorithm.
61+
* [x] Create new 2-3-4 Tree algorithm.

0 commit comments

Comments
 (0)