From 2d5d8d789f8e083fa0be739a371f930cf682dc6c Mon Sep 17 00:00:00 2001 From: Andres Montero Date: Mon, 9 Feb 2026 15:41:05 +0100 Subject: [PATCH 1/7] Modified sorting logic (closes #125) --- website/rs_tiers.html | 43 ++++++++++++------------------------------- 1 file changed, 12 insertions(+), 31 deletions(-) diff --git a/website/rs_tiers.html b/website/rs_tiers.html index 1fefb7f..112cea6 100644 --- a/website/rs_tiers.html +++ b/website/rs_tiers.html @@ -225,10 +225,8 @@

Relevance of Indicators for RS Tiers

let originalData = []; const tierOrder = ["crucial", "recommended", "good to have", "not relevant"]; - let currentSort = { - column: null, - index: -1 - }; + let activeSortColumn = null; + async function fetchCSVFile(csvPath) { const overlay = document.getElementById("table-loading-overlay"); @@ -322,39 +320,22 @@

Relevance of Indicators for RS Tiers

} function sortByTier(column) { - if (currentSort.column !== column) { - currentSort.column = column; - currentSort.index = -1; - } - - const presentValues = tierOrder.filter(value => - allData.some(item => - (item[column] || "").toLowerCase() === value - ) - ); - - if (presentValues.length === 0) { - return; - } - - currentSort.index++; - - if (currentSort.index >= presentValues.length) { - currentSort.column = null; - currentSort.index = -1; + if (activeSortColumn === column) { + activeSortColumn = null; updateTableFromCSV(originalData); return; } - const priority = presentValues[currentSort.index]; + activeSortColumn = column; - const sorted = [...allData].sort((a, b) => { - const aVal = (a[column] || "").toLowerCase(); - const bVal = (b[column] || "").toLowerCase(); + const orderIndex = value => { + const normalized = (value || "").toLowerCase(); + const idx = tierOrder.indexOf(normalized); + return idx === -1 ? tierOrder.length : idx; + }; - if (aVal === priority && bVal !== priority) return -1; - if (bVal === priority && aVal !== priority) return 1; - return 0; + const sorted = [...allData].sort((a, b) => { + return orderIndex(a[column]) - orderIndex(b[column]); }); updateTableFromCSV(sorted); From ffe822e07b3ad7fc8a4dc7ebe320dc3c983cbf65 Mon Sep 17 00:00:00 2001 From: Andres Montero Date: Tue, 10 Mar 2026 16:11:51 +0100 Subject: [PATCH 2/7] Added new indicator cyclomatic_complexity --- indicators/cyclomatic_complexity.json | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 indicators/cyclomatic_complexity.json diff --git a/indicators/cyclomatic_complexity.json b/indicators/cyclomatic_complexity.json new file mode 100644 index 0000000..93b1781 --- /dev/null +++ b/indicators/cyclomatic_complexity.json @@ -0,0 +1,41 @@ +{ + "@context": "https://w3id.org/everse/rsqi#", + "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity", + "@type": "SoftwareQualityIndicator", + "name": "Cyclomatic complexity follow community conventions", + "abbreviation": "cyclomatic_complexity", + "identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity" }, + "description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.", + "status": "Active", + "keywords": [ + "maintainability", "complexity, code" + ], + "version": "1.0.0", + "author": { + "@type": "schema:Person", + "name": "Daniel Garijo" + }, + "contact": [ + { + "@type": "schema:Person", + "name": "Daniel Garijo" + }, + { + "@type": "schema:Person", + "name": "Andres Montero" + } + ], + "source": [ + { + "identifier": "https://zenodo.org/records/10647227", + "url": "https://zenodo.org/records/10647227", + "name": "Task Force Sub Group 3 - Review of Software Quality Attributes and Characteristics" + }, + { + "url": "https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=11216562&tag=1", + "name": "Socially-Informed Jupyter Notebook Quality: A Role- and Lifecycle-Aware Metrics Framework" + } + ], + "qualityDimension": { "@id": "https://w3id.org/everse/i/dimensions/maintainability" }, + "created": "10-03-2026" +} From b5e6469136103e85aae5b2ae6e4f63dcc8915bdc Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Tue, 10 Mar 2026 17:03:37 +0100 Subject: [PATCH 3/7] Update indicators/cyclomatic_complexity.json --- indicators/cyclomatic_complexity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indicators/cyclomatic_complexity.json b/indicators/cyclomatic_complexity.json index 93b1781..18bf352 100644 --- a/indicators/cyclomatic_complexity.json +++ b/indicators/cyclomatic_complexity.json @@ -5,7 +5,7 @@ "name": "Cyclomatic complexity follow community conventions", "abbreviation": "cyclomatic_complexity", "identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity" }, - "description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.", + "description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods should follow the conventions established by the community responsible for maintaining the tool. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.", "status": "Active", "keywords": [ "maintainability", "complexity, code" From 8258d1c0d03da39d8c661fdf286db524c51abd24 Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Tue, 10 Mar 2026 17:03:45 +0100 Subject: [PATCH 4/7] Update indicators/cyclomatic_complexity.json --- indicators/cyclomatic_complexity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indicators/cyclomatic_complexity.json b/indicators/cyclomatic_complexity.json index 18bf352..b0b0869 100644 --- a/indicators/cyclomatic_complexity.json +++ b/indicators/cyclomatic_complexity.json @@ -2,7 +2,7 @@ "@context": "https://w3id.org/everse/rsqi#", "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity", "@type": "SoftwareQualityIndicator", - "name": "Cyclomatic complexity follow community conventions", + "name": "Cyclomatic complexity follows community conventions", "abbreviation": "cyclomatic_complexity", "identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity" }, "description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods should follow the conventions established by the community responsible for maintaining the tool. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.", From 1468cc2bcf0a8dd95c12e8bdd0da0ab5215c88c0 Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Tue, 10 Mar 2026 17:03:52 +0100 Subject: [PATCH 5/7] Update indicators/cyclomatic_complexity.json --- indicators/cyclomatic_complexity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indicators/cyclomatic_complexity.json b/indicators/cyclomatic_complexity.json index b0b0869..774c241 100644 --- a/indicators/cyclomatic_complexity.json +++ b/indicators/cyclomatic_complexity.json @@ -1,6 +1,6 @@ { "@context": "https://w3id.org/everse/rsqi#", - "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity", + "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity_ok", "@type": "SoftwareQualityIndicator", "name": "Cyclomatic complexity follows community conventions", "abbreviation": "cyclomatic_complexity", From 470482b965205ad8d5fa217db482fb627a05e791 Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Tue, 10 Mar 2026 17:04:01 +0100 Subject: [PATCH 6/7] Update indicators/cyclomatic_complexity.json --- indicators/cyclomatic_complexity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indicators/cyclomatic_complexity.json b/indicators/cyclomatic_complexity.json index 774c241..ac1a27a 100644 --- a/indicators/cyclomatic_complexity.json +++ b/indicators/cyclomatic_complexity.json @@ -3,7 +3,7 @@ "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity_ok", "@type": "SoftwareQualityIndicator", "name": "Cyclomatic complexity follows community conventions", - "abbreviation": "cyclomatic_complexity", + "abbreviation": "cyclomatic_complexity_ok", "identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity" }, "description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods should follow the conventions established by the community responsible for maintaining the tool. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.", "status": "Active", From 02da3042f0abdc63d4c208d0f7484bb4d5286d07 Mon Sep 17 00:00:00 2001 From: Daniel Garijo Date: Tue, 10 Mar 2026 17:05:12 +0100 Subject: [PATCH 7/7] Update indicators/cyclomatic_complexity.json --- indicators/cyclomatic_complexity.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indicators/cyclomatic_complexity.json b/indicators/cyclomatic_complexity.json index ac1a27a..64e1c16 100644 --- a/indicators/cyclomatic_complexity.json +++ b/indicators/cyclomatic_complexity.json @@ -4,7 +4,7 @@ "@type": "SoftwareQualityIndicator", "name": "Cyclomatic complexity follows community conventions", "abbreviation": "cyclomatic_complexity_ok", - "identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity" }, + "identifier": { "@id": "https://w3id.org/everse/i/indicators/cyclomatic_complexity_ok" }, "description": "Cyclomatic complexity (i.e., the number of linearly independent paths through a program’s source code) of the whole software component or modules/components/classes/functions/methods should follow the conventions established by the community responsible for maintaining the tool. Cyclomatic complexity is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow requires more tests to achieve good code coverage and is less maintainable.", "status": "Active", "keywords": [