Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
23db052
first commit
IronMax03 Apr 26, 2025
52ee4ac
Merge pull request #1 from IronMax03/enhancement/improve-workflow
IronMax03 Apr 26, 2025
358b8bc
example of change
IronMax03 Apr 26, 2025
af22686
helloWorld
IronMax03 Apr 26, 2025
51494c6
test
IronMax03 Apr 26, 2025
7ebd7e7
Merge pull request #2 from IronMax03/enhancement/improve-workflow
IronMax03 Apr 26, 2025
61e2353
update tester
IronMax03 Apr 27, 2025
ea40cd5
update requirement.txt
IronMax03 Apr 27, 2025
b8d83fc
test
IronMax03 Apr 27, 2025
ce53978
test
IronMax03 Apr 27, 2025
59797a3
clean file structure
IronMax03 Apr 27, 2025
6efdeab
update
IronMax03 Apr 27, 2025
031bb0f
using 1 docker file for issue renaming
IronMax03 Apr 27, 2025
7cbb52f
fix
IronMax03 Apr 27, 2025
4280607
fix
IronMax03 Apr 27, 2025
4fd1e16
fix
IronMax03 Apr 27, 2025
2cf1017
changing issue bug report template
IronMax03 Apr 28, 2025
922fe9c
fix bug_repport.yaml
IronMax03 Apr 28, 2025
a5a3396
naming fix
IronMax03 Apr 28, 2025
8db5250
changing triggers of Issue Automatic Renaming
IronMax03 Apr 28, 2025
faf4a2d
fix typo inside CONTRIBUTING.md
IronMax03 Apr 28, 2025
1d3037c
small improvements in code-tester.yaml
IronMax03 Apr 30, 2025
ed6785f
other small improvements in code-tester.yaml
IronMax03 Apr 30, 2025
d9f4f40
fixing actions/checkout@v3
IronMax03 Apr 30, 2025
b365c56
fixing trigger in code-tester.yaml
IronMax03 Apr 30, 2025
c74ebe4
small fix
IronMax03 Apr 30, 2025
66e1a21
Adding Style Check to Code Tester
IronMax03 Apr 30, 2025
948dc0c
test
IronMax03 Apr 30, 2025
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
15 changes: 9 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_repport.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Bug Report
description: File a bug report.
title: 'Enter a short title that describes the issue' # Placeholder for the user to edit
title: 'Enter a short title that describes the issue'
labels: [bug]

body:
- type: dropdown
attributes:
label: Severity
label: Type
options:
- 🔥 Blocker
- 🛑 Major
- ⚠️ Minor
- ❓ Not sure
- 🧮 Algorithm Implementation
- 🛠 CI/Tooling Issue
- 📘 Algorithm Documentation
- 🖋 General Documentation
- 🧪 Test Failure or Adding Testcase
- ❓ Other / Not Sure

default: 0
validations:
required: true
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/auto-fill-algo-name.yaml

This file was deleted.

53 changes: 0 additions & 53 deletions .github/workflows/auto-fill-bug-title.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/code-tester.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Code Tester

on: [pull_request]

jobs:
checks:
runs-on: ubuntu-latest

steps:
- name: Download Repo In Docker
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'

- name: Install dependencies
run: |
pip install rich
pip install ruff
pip install pytest

- name: Run tests
run: pytest tests --collect-only

- name: Style Check
run: ruff check
81 changes: 81 additions & 0 deletions .github/workflows/issue-Automatic-renaming.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Issue Automatic Renaming

on:
issues:
types: [opened, edited]

permissions:
issues: write

jobs:
rename-issue:
runs-on: ubuntu-latest
steps:
- name: Rename for New Algo Issues
uses: actions/github-script@v7
if: contains(github.event.issue.body, '### Algo_Name')
with:
script: |
const issueBody = context.payload.issue.body;
console.log("Issue Body:\n", issueBody);

const match = /### Algo_Name\s*\n+(.+?)(\n+###|\n*$)/s.exec(issueBody);
if (!match) {
console.log("🚫 Could not find algo name in Markdown.");
return;
}

const algoName = match[1].trim();
const issueNumber = context.issue.number;
const newTitle = `✨ Implement ${algoName}`;

console.log(`🔧 Updating issue title to: ${newTitle}`);

await github.rest.issues.update({
...context.repo,
issue_number: issueNumber,
title: newTitle
});

- name: Rename for Bug Report Issues
uses: actions/github-script@v7
if: contains(github.event.issue.body, '### Type')
with:
script: |
const body = context.payload.issue.body;
console.log("Issue Body:\n", body);

const typeMatch = /### Type\s+(.+?)\s*(###|$)/s.exec(body);
const Type = typeMatch ? typeMatch[1].trim() : null;

if (!Type) {
console.log("🚫 Could not find Type in Markdown.");
return;
}

const typeMap = {
"🧮 Algorithm Implementation": "🧮",
"🛠 CI/Tooling Issue": "🛠",
"📘 Algorithm Documentation": "📘",
"🖋 General Documentation": "🖋",
"🧪 Test Failure or Adding Testcase": "🧪",
"❓ Other / Not Sure": "❓",
};
const typeIcon = typeMap[Type] || "❓";

const rawTitle = context.payload.issue.title;
if (rawTitle.startsWith("🔥") || rawTitle.startsWith("🛑") || rawTitle.startsWith("⚠️") || rawTitle.startsWith("❓")) {
console.log("✅ Title already formatted correctly.");
return;
}

const issueNumber = context.issue.number;
const updatedTitle = `⚠️ - ${typeIcon} [Bug]: ${rawTitle}`;

console.log(`🔧 Updating issue title to: ${updatedTitle}`);

await github.rest.issues.update({
...context.repo,
issue_number: issueNumber,
title: updatedTitle
});
100 changes: 52 additions & 48 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,18 @@ We welcome all kinds of contributions—whether you're fixing bugs, improving do

## ✅ What you can contribute

- Report bug
- Add a new algorithm or data structure
- Improve or correct existing implementations
- Write or update documentation
- Add test cases or enhance test coverage
- Fix typos or bugs
- Fix typos

## Guidelines
## How to contribut

- **Coding Standards:**
Follow clean and consistent coding practices. Use meaningful variable and function names.
Every change in the repository should be merged throught [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests). All commit execute [Ruff](https://docs.astral.sh/ruff/) to insure the some level of coding standart.

- **Document Your Code:**
Ensure all functions have clear and concise comments/description.

- **Test Your Changes:**
While we understand that fully testing this library may be challenging, ensure your code works as intended before submitting. Focus on edge cases and confirm that your changes integrate smoothly with existing functionality.

- **Be Respectful**:
Engage in discussions respectfully and constructively.

- **Follow The File Structure Templates**: Each Algorithm should have its own file in **scr** with: A README based on the template and the python file. Parallel to that you should create another file inside tests with a python file torun the tests and a YAML file to store the tests cases.

## Before Contributing
### Before Contributing

Before making the first commit of the session, you should set up the **pre-commit** framework and activate the **virtual environment**. This has to be done for each new session.

Expand All @@ -43,6 +32,52 @@ Before making the first commit of the session, you should set up the **pre-commi
pre-commit install
```

### Implementing a new algorithm

Before implementing a new algorithm. The Python virtual environment should include [rich](https://pypi.org/project/rich/) and [pytest](https://pypi.org/project/pytest/). In order to do it, run the commend below.

```bash
pip install -r requirements.txt
```

Every algorithm implementation should have a dedicated **issue**. This issue should be build with the **Implement Algorithm** issue form. If no issue exist for the specific algorithm to be implemented create one. Every file inside the new repository and the **test file** should follow the file structure inside [File Structure](#📁-file-structure) section.

All algorithm should be accompanied with a **README.md** file. This file should follow the template in the [Algorithm README.md](#algorithm-readme) section.

Every algorithm should be tested using [pytest](https://docs.pytest.org/en/stable/).

## 🐛 Bug Report

To report a bug, simply create a new issue using the **Bug Report** form and fill out all sections.
The form is straightforward, but if you’d like a bit more guidance, follow the steps below. 👇

### 📝 Steps to Report a Bug

1. **Enter a clear, short title**
Use a short, clear title that describes the issue.

> Example: `Crash when clicking the login button`

2. **What type of issue is this? (Bug Type)**
- 🧮 Algorithm Implementation - The logic or output of an algorithm is incorrect.
- 🛠 CI/Tooling Issue - Problems with continuous integration or scripts.
- 📘 Algorithm Documentation - Missing or incorrect explanations/comments for an algorithm.
- 🖋 General Documentation - Typos, formatting, or missing information inside documentation that is not related to an algorithm.
- 🧪 Test Failure or Adding Testcase - Broken tests or missing edge case coverage.
- ❓ Other / Not Sure - You’re unsure how bad it is or some other kind of issue.

3. **In the Steps to Reproduce & What Happens section:**

- List step-by-step instructions to trigger the bug
- Describe what actually happens

4. **Describe what you expected to happen(Expected Behavior):**
In the Expected Behavior section, explain what you thought would happen instead.

5. **Create the issue:**
Once you create the issue, our system will automatically format the title.
This formatting takes about 4 seconds.

## 📁 File Structure

When adding a new algorithm, follow this structure:
Expand Down Expand Up @@ -75,7 +110,7 @@ AlgoHub/

```

### Algorithm README.md
### Algorithm README

The README.md inside the **New_Algorithm** folder should follow the following template.

Expand Down Expand Up @@ -153,34 +188,3 @@ The README.md inside the **New_Data_Structure** folder should follow the followi
- **Search**:

```

## 🐛 Bug Report

To report a bug, simply create a new issue using the **Bug Report** form and fill out all sections.
The form is straightforward, but if you’d like a bit more guidance, follow the steps below. 👇

### 📝 Steps to Report a Bug

1. **Enter a clear, short title**
Use a short, clear title that describes the issue.

> Example: `Crash when clicking the login button`

2. **Choose how serious the issue is (severity):**

- 🔥 Blocker – Completely breaks core functionality
- 🛑 Major – Important features aren’t working
- ⚠️ Minor – Small issues or annoyances
- ❓ Not sure – You’re unsure how bad it is

3. **In the Steps to Reproduce & What Happens section:**

- List step-by-step instructions to trigger the bug
- Describe what actually happens

4. **Describe what you expected to happen(Expected Behavior):**
In the Expected Behavior section, explain what you thought would happen instead.

5. **Create the issue:**
Once you create the issue, our system will automatically format the title.
This formatting takes about 4 seconds.