From 375a6a03181c0f2dbad8678a7abfbf45e8836613 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 6 Sep 2026 21:55:00 +0200 Subject: [PATCH 1/5] Skill: New pull request for TheAlgorithms/Python @priya-sundaram-dev, please review and suggest any changes. We want to make sure that the keeper does not close new PRs as invalid. --- .github/skills/new-pull-request/SKILL.md | 47 ++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/skills/new-pull-request/SKILL.md diff --git a/.github/skills/new-pull-request/SKILL.md b/.github/skills/new-pull-request/SKILL.md new file mode 100644 index 000000000000..152c73399ec3 --- /dev/null +++ b/.github/skills/new-pull-request/SKILL.md @@ -0,0 +1,47 @@ +# Skill: New pull request for TheAlgorithms/Python + +Create a new pull request using the rules already written in +[`CONTRIBUTING.md`](../../../CONTRIBUTING.md). The goal is that creating a new +pull request (human or AI) can run the same way every time, and that produces a +clear, kind, tested, type-hinted, mergeable contribution. + +## How to run this skill + +Make sure that the local `master` branch is synced with `upstream/master` and +then create a new branch for the pull request. Pull request changes must not +be on the `master` branch. + +Never modify the `uv.lock` file because the `algorithms-keeper` bot will close +the pull request as invalid. Even a repo maintainer cannot undo this. + +Always have one checked Markdown checkbox in the pull request commit body, or the +`algorithms-keeper` bot will close the pull request as invalid. Any repo +maintainer can undo this if you @mention them on the closed pull request. + +### 1. Before contributing / Is this an algorithm? + +- [ ] The change adds, fixes, or documents **one algorithm** — not multiple, and + not both code and doctest changes in the same PR. +- [ ] It is a genuine algorithm or data structure (see the *What is an Algorithm?* + section), not a script, snippet, how-to-use for an existing API, or exercise + dump. +- [ ] It is **not already in the repository** (search the existing directories). +- [ ] **No earlier open PR** already does the same thing — link it if one exists. +- [ ] Properly attributed — no plagiarism; prior sources credited. + +### 2. Coding Style + +- [ ] `from __future__ import annotations` is not needed because this repo only uses + the latest version of CPython. +- [ ] File and directory names are lowercase, use underscores, and land inside an + existing directory. +- [ ] Public functions/classes have **type hints**. +- [ ] Public functions have **doctests that actually pass**. +- [ ] Descriptive variable and function names (no single letters where a word helps). +- [ ] Code is formatted and lint-clean (`ruff`, `pre-commit`). + +### 3. Other Requirements for Submissions + +- [ ] At least one **Wikipedia (or equivalent) URL** documenting the algorithm. +- [ ] Docstring explains what the function does and its parameters/returns. +- [ ] No unnecessary third-party dependencies. From 34a80067a3536f1e5272118224fca433aeb98f1f Mon Sep 17 00:00:00 2001 From: cclauss Date: Sun, 6 Sep 2026 19:55:19 +0000 Subject: [PATCH 2/5] updating DIRECTORY.md --- DIRECTORY.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/DIRECTORY.md b/DIRECTORY.md index 55af355f7fc0..2b344f964ad6 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -669,7 +669,9 @@ * Forecasting * [Run](machine_learning/forecasting/run.py) * [Frequent Pattern Growth](machine_learning/frequent_pattern_growth.py) + * [Gaussian Naive Bayes](machine_learning/gaussian_naive_bayes.py) * [Gradient Boosting Classifier](machine_learning/gradient_boosting_classifier.py) + * [Gradient Boosting Regressor](machine_learning/gradient_boosting_regressor.py) * [Gradient Descent](machine_learning/gradient_descent.py) * [K Means Clust](machine_learning/k_means_clust.py) * [K Nearest Neighbours](machine_learning/k_nearest_neighbours.py) @@ -685,6 +687,8 @@ * [Multilayer Perceptron Classifier](machine_learning/multilayer_perceptron_classifier.py) * [Polynomial Regression](machine_learning/polynomial_regression.py) * [Principle Component Analysis](machine_learning/principle_component_analysis.py) + * [Random Forest Classifier](machine_learning/random_forest_classifier.py) + * [Random Forest Regressor](machine_learning/random_forest_regressor.py) * [Scoring Functions](machine_learning/scoring_functions.py) * [Self Organizing Map](machine_learning/self_organizing_map.py) * [Sequential Minimum Optimization](machine_learning/sequential_minimum_optimization.py) @@ -923,6 +927,7 @@ * [Back Propagation Neural Network](neural_network/back_propagation_neural_network.py) * [Convolution Neural Network](neural_network/convolution_neural_network.py) * [Input Data](neural_network/input_data.py) + * [Perceptron](neural_network/perceptron.py) * [Simple Neural Network](neural_network/simple_neural_network.py) * [Two Hidden Layers Neural Network](neural_network/two_hidden_layers_neural_network.py) @@ -975,6 +980,7 @@ * [Lorentz Transformation Four Vector](physics/lorentz_transformation_four_vector.py) * [Malus Law](physics/malus_law.py) * [Mass Energy Equivalence](physics/mass_energy_equivalence.py) + * [Maxwells Equations](physics/maxwells_equations.py) * [Mirror Formulae](physics/mirror_formulae.py) * [N Body Simulation](physics/n_body_simulation.py) * [Newtons Law Of Gravitation](physics/newtons_law_of_gravitation.py) From 55bed0f0a75a976b117079e2eff0010a38aebed7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 6 Sep 2026 22:04:41 +0200 Subject: [PATCH 3/5] Update pull request instructions in SKILL.md Clarified instructions for creating a new pull request and emphasized the importance of branch naming. --- .github/skills/new-pull-request/SKILL.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/skills/new-pull-request/SKILL.md b/.github/skills/new-pull-request/SKILL.md index 152c73399ec3..571d358f49b6 100644 --- a/.github/skills/new-pull-request/SKILL.md +++ b/.github/skills/new-pull-request/SKILL.md @@ -7,9 +7,11 @@ clear, kind, tested, type-hinted, mergeable contribution. ## How to run this skill -Make sure that the local `master` branch is synced with `upstream/master` and -then create a new branch for the pull request. Pull request changes must not -be on the `master` branch. +Make sure that the local `master` branch is synced with `upstream/master` before +creating a new pull request. + +Create a new clearly named branch for the pull request. Pull request changes must +not be made or submitted on the `master` branch. Never modify the `uv.lock` file because the `algorithms-keeper` bot will close the pull request as invalid. Even a repo maintainer cannot undo this. From 5046258ac4edabd8c4bf144421750f38aa4a4c31 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sun, 6 Sep 2026 22:12:12 +0200 Subject: [PATCH 4/5] Clarify Markdown checkbox requirement for PRs Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/skills/new-pull-request/SKILL.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/skills/new-pull-request/SKILL.md b/.github/skills/new-pull-request/SKILL.md index 571d358f49b6..1b23fe5eb713 100644 --- a/.github/skills/new-pull-request/SKILL.md +++ b/.github/skills/new-pull-request/SKILL.md @@ -16,9 +16,8 @@ not be made or submitted on the `master` branch. Never modify the `uv.lock` file because the `algorithms-keeper` bot will close the pull request as invalid. Even a repo maintainer cannot undo this. -Always have one checked Markdown checkbox in the pull request commit body, or the -`algorithms-keeper` bot will close the pull request as invalid. Any repo -maintainer can undo this if you @mention them on the closed pull request. +Always check at least one Markdown checkbox in the pull request description (the "Describe your change" section), or the +`algorithms-keeper` bot will close the pull request as invalid. Any repo maintainer can undo this if you @mention them on the closed pull request. ### 1. Before contributing / Is this an algorithm? From 2a1a471e08a5ebced56208a684480fa9c775e39b Mon Sep 17 00:00:00 2001 From: priya-sundaram-dev Date: Sun, 6 Sep 2026 21:22:01 +0000 Subject: [PATCH 5/5] Skill: fix uv.lock wording; add DIRECTORY.md/README.md auto-gen note (#15216) - Clarify that uv.lock is regenerated by the uv-lock pre-commit hook when a legitimate dependency is added; only hand-edits/reverts break the keeper. - Add a checklist item: DIRECTORY.md and README.md are bot-generated, don't hand-edit them. --- .github/skills/new-pull-request/SKILL.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/skills/new-pull-request/SKILL.md b/.github/skills/new-pull-request/SKILL.md index 1b23fe5eb713..a1588d2635a6 100644 --- a/.github/skills/new-pull-request/SKILL.md +++ b/.github/skills/new-pull-request/SKILL.md @@ -13,8 +13,10 @@ creating a new pull request. Create a new clearly named branch for the pull request. Pull request changes must not be made or submitted on the `master` branch. -Never modify the `uv.lock` file because the `algorithms-keeper` bot will close -the pull request as invalid. Even a repo maintainer cannot undo this. +Never hand-edit or revert the `uv.lock` file. If you add a legitimate +dependency, let the `uv-lock` pre-commit hook regenerate it — do not touch it by +hand. A hand-modified `uv.lock` makes the `algorithms-keeper` bot close the pull +request as invalid, and even a repo maintainer cannot undo that. Always check at least one Markdown checkbox in the pull request description (the "Describe your change" section), or the `algorithms-keeper` bot will close the pull request as invalid. Any repo maintainer can undo this if you @mention them on the closed pull request. @@ -40,6 +42,8 @@ Always check at least one Markdown checkbox in the pull request description (the - [ ] Public functions have **doctests that actually pass**. - [ ] Descriptive variable and function names (no single letters where a word helps). - [ ] Code is formatted and lint-clean (`ruff`, `pre-commit`). +- [ ] `DIRECTORY.md` and `README.md` are **not hand-edited** — the + `algorithms-keeper` bot regenerates them automatically after merge. ### 3. Other Requirements for Submissions