Skip to content

Commit 26160be

Browse files
authored
Sprint2 (#18)
* First round of algorithms implemented * Test cases for algorithms. Heapsort implementation changed to a more reliable one * Closes #10 - Implemented 10 sorting algorithms in the system * Fixed parameters to ignore external libraries from testing suite * Refactoring initial load to accommodate data store service * Initial iteration of algorithm runner * Removed console messages. Fixed TS compilation error * updated sonar properties to ignore external libraries code * Algorithms running synchronously * Closes #8 - Algorithm set runs correctly and returns values to the user without blocking the UI * Unit tests for settings service created. #9 * update out of date dependencies * Fixes #16 * Implemented settings page * updated code coverage route for sonar * Fixed sonarqube code smells report * Fixed route on sonarqube code coverage report * typo on karma setup
1 parent fa25546 commit 26160be

Some content is hidden

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

48 files changed

+2972
-520
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ speed-measure-plugin.json
2222
*.launch
2323
.settings/
2424
*.sublime-workspace
25+
.wakatime-project
2526

2627
# IDE - VSCode
2728
.vscode/*

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "chrome",
9+
"request": "launch",
10+
"name": "Launch Chrome against localhost",
11+
"url": "http://localhost:4200/chart",
12+
"webRoot": "${workspaceFolder}"
13+
}
14+
]
15+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"workbench.colorCustomizations": {}
3+
}

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Algorithm Benchmarks
22

3-
[![Build Status](https://travis-ci.com/Narshe1412/Code-Institute-User-Centric-Algorithms.svg?branch=master)](https://travis-ci.com/Narshe1412/Code-Institute-User-Centric-Algorithms)
3+
[![Build Status](https://travis-ci.com/Narshe1412/Code-Institute-User-Centric-Algorithms.svg?branch=master)](https://travis-ci.com/Narshe1412/Code-Institute-User-Centric-Algorithms) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Narshe1412_Code-Institute-User-Centric-Algorithms&metric=alert_status)](https://sonarcloud.io/dashboard?id=Narshe1412_Code-Institute-User-Centric-Algorithms)
44

55
As a programmer you need to always leverage between several possible different solutions the one that would be most efficient. One common problem is the sorting, inserting or accessing data. To solve this problem, along programming history, several algorithms have been created. This project attempts to help a fellow programmer to choose which algorithm shall be used by providing a benchmarking operationg and plotting the results in a variety of graphs.
66

@@ -105,3 +105,8 @@ In addition, if it is not obvious, you should also describe how to run your code
105105
- https://dev.to/wangonya/sorting-algorithms-with-javascript-part-1-4aca
106106
- https://dev.to/wangonya/sorting-algorithms-with-javascript-part-2-3g51
107107
- http://bigocheatsheet.com/
108+
- https://www.w3resource.com/javascript-exercises/searching-and-sorting-algorithm/searching-and-sorting-algorithm-exercise-6.php
109+
- https://github.com/arnorhs/js-introsort
110+
- https://stackoverflow.com/a/52236574/5866637
111+
- https://github.com/LXSMNSYC/TimSort
112+
- https://stackoverflow.com/a/2450976/5866637

angular.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3-
"version": 1,
3+
"version": 1.2,
44
"newProjectRoot": "projects",
55
"projects": {
66
"Code-Institute-User-Centric-Algorithms": {
@@ -84,7 +84,8 @@
8484
"karmaConfig": "karma.conf.js",
8585
"assets": ["src/favicon.ico", "src/assets"],
8686
"styles": ["src/styles.scss"],
87-
"scripts": []
87+
"scripts": [],
88+
"codeCoverageExclude": ["src/app/services/algorithm-implementations/timsort/**"]
8889
}
8990
},
9091
"lint": {

karma.conf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Karma configuration file, see link for more information
22
// https://karma-runner.github.io/1.0/config/configuration-file.html
33

4-
module.exports = function (config) {
4+
module.exports = function(config) {
55
config.set({
66
basePath: '',
77
frameworks: ['jasmine', '@angular-devkit/build-angular'],
@@ -16,7 +16,7 @@ module.exports = function (config) {
1616
clearContext: false // leave Jasmine Spec Runner output visible in browser
1717
},
1818
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, './coverage/Code-Institute-User-Centric-Algorithms'),
19+
dir: require('path').join(__dirname, './coverage'),
2020
reports: ['html', 'lcovonly', 'text-summary'],
2121
fixWebpackSourcePaths: true
2222
},

0 commit comments

Comments
 (0)