• Stars
    star
    147
  • Rank 242,568 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 3 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A bot for TheAlgorithms/Python repository.

algorithms-keeper

CI codecov code style: black Checked with mypy

A bot for TheAlgorithms/Python repository. This bot is based on this tutorial and also inspired by the ones working for the CPython repository which are miss-islington, bedevere and the-knights-who-say-ni. This bot is basically a GitHub app which can be installed in any repository using this link.

NOTE: This bot is highly configured for TheAlgorithms/Python repository. DO NOT INSTALL the bot without reading what it actually does.

What the bot does:

Greet the user for installing the app

Open an issue with the message greeting the user who either installed the app or added a new repository to the installed app and then close the issue.

Add or remove label(s) to pull requests

  • To indicate that some tests are failing for this pull request if it is not present and remove it when all the tests are passing. It does nothing if the tests are already passing. NOTE: This check will be skipped if the pull request is in draft mode.
  • To indicate the stage the pull request is currently at. This is a cycle of two labels which indicates the two stages: The pull request requires a review/re-review, or a maintainer has requested changes for the pull request.
  • To indicate whether the pull request contains merge conflicts or not.

The pull request stages can be best described in a graphviz diagram whose code is in the pull requests module.

Close invalid pull requests

A pull request is considered invalid if:

  • It doesn't contain any description.
  • The user has not ticked any of the checkboxes in the provided pull request template.
  • The file extension is invalid. For now only PRs with extensionless files are closed.

NOTE: These checks will be skipped for any member or owner of the organization and also for the pull request which is in draft mode.

Close additional pull requests by user

A user will be allowed a fix number of pull requests at a time which will be indicated by the MAX_PR_BY_USER constant. This is done to avoid spam pull requests. This can be disabled by updating the constant value to 0: MAX_PR_BY_USER = 0.

NOTE: These checks will be skipped for any member or owner of the organization and also for the pull request which is in draft mode.

Check all Python files in a pull request

All the Python files will be checked for tests [doctest/unittest/pytest], type hints and descriptive class/function/parameter names. Labels will be added and/or removed according to the latest commit in a pull request. The bot will post the review with all the details regarding the missing requirements.

NOTE: These checks will be skipped if the pull request is in draft mode and if the pull request is invalid.

Commands

Some actions of the bot can be triggered using commands:

  • @algorithms-keeper review to trigger the checks for only added pull request files.
  • @algorithms-keeper review-all to trigger the checks for all the pull request files, including the modified files. As we cannot post review comments on lines not part of the diff, this command only modify the labels accordingly.

NOTE: Commands are in BETA and valid only if it is commented on a pull request and only by either a member or owner of the organization.

Logging

Logging is done using the standard library logging module. All the API calls made by the bot are being logged at INFO level and aiohttp.log.access_logger is logging the POST requests made by GitHub for delivering the payload. Other minor events relevant to the repository is also being logged along with using the using Sentry. The logs can be viewed best using the following command (requires Heroku CLI):

heroku logs -a algorithms-keeper -t

More Repositories

1

Python

All Algorithms implemented in Python
Python
179,656
star
2

Java

All Algorithms implemented in Java
Java
56,425
star
3

JavaScript

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.
JavaScript
30,898
star
4

C-Plus-Plus

Collection of various algorithms in mathematics, machine learning, computer science and physics implemented in C++ for educational purposes.
C++
29,076
star
5

Rust

All Algorithms implemented in Rust
Rust
19,757
star
6

C

Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.
C
17,989
star
7

Go

Algorithms and Data Structures implemented in Go for beginners, following best practices.
Go
14,406
star
8

C-Sharp

All algorithms implemented in C#.
C#
6,265
star
9

Algorithms-Explanation

Popular algorithms explained in simple language with examples and links to their implementation in various programming languages and other required resources.
2,836
star
10

Dart

All Algorithms implemented in Dart
Dart
1,686
star
11

PHP

All Algorithms implemented in PHP
PHP
1,597
star
12

Kotlin

All Algorithms implemented in Kotlin
Kotlin
1,282
star
13

Ruby

All algorithms implemented in Ruby
Ruby
1,090
star
14

Scala

All Algorithms implemented in Scala
Scala
1,044
star
15

TypeScript

Algorithms and Data Structures implemented in TypeScript for beginners, following best practices.
TypeScript
960
star
16

website

The Algorithms website providing GitHub's largest open-source algorithm library.
TypeScript
777
star
17

R

Collection of various algorithms implemented in R.
R
770
star
18

Jupyter

The repository contains script and notebook related to Statistics, Machine learning, Neural network, Deep learning, NLP, Numerical methods, and Automation.
Jupyter Notebook
743
star
19

TheAlgorithms.github.io

This website is deprecated. The new website is https://the-algorithms.com. You can see the old website by going to https://thealgorithms.github.io/index-old.html
HTML
705
star
20

Swift

All Algorithms implemented in Swift
Swift
426
star
21

Julia

Algorithms implemented in the Julia programming language. We're collaborating with the Humans of Julia community!
Julia
409
star
22

Haskell

Haskell
362
star
23

MATLAB-Octave

This repository contains algorithms written in MATLAB/Octave. Developing algorithms in the MATLAB environment empowers you to explore and refine ideas, and enables you test and verify your algorithm.
MATLAB
355
star
24

Solidity

Algorithms and data structures implemented in Solidity
Solidity
315
star
25

Lua

Algorithms and Data Structures implemented in the Lua programming language
Lua
220
star
26

Elixir

Elixir
215
star
27

F-Sharp

All Algorithms implemented in F#
F#
197
star
28

website-old

This website is no longer maintained. Please see https://github.com/TheAlgorithms/website
HTML
193
star
29

.github

Default configuration for @TheAlgorithms repositories
161
star
30

AArch64_Assembly

All Algorithms implemented in AArch64 Assembly
Assembly
129
star
31

OCaml

Algorithms Implemented in OCaml
OCaml
93
star
32

Zig

Collection of Algorithms implemented in Zig.
Zig
92
star
33

Clojure

All Algorithms implemented in Clojure
Clojure
82
star
34

scripts

Scripts used across all The Algorithms repositories
Python
71
star
35

Nim

Collection of various algorithms implemented in Nim for educational purposes.
Nim
65
star
36

Elm

All Algorithms implemented in Elm
Elm
61
star
37

Fortran

All Algorithms implemented in Fortran. Making Fortran Great Again!
Fortran
28
star
38

Google-Summer-of-Code

Organization resources for Google Summer of Code '23
27
star
39

Jule

Algorithms and data structures implemented in the Jule programming language.
15
star
40

Mojo

All algorithms implemented in Mojo!
15
star
41

Zig-delete

All Algorithms implemented in Zig
11
star
42

SessionGuard.js

https://github.com/TheAlgorithms/Google-Summer-of-Code/blob/main/project_ideas/AnomalousSessionRecorder.md
6
star
43

SessionGuard-Core

https://github.com/TheAlgorithms/Google-Summer-of-Code/blob/main/project_ideas/AnomalousSessionRecorder.md
2
star
44

Personalised-Discounts

https://github.com/TheAlgorithms/Google-Summer-of-Code/blob/main/project_ideas/PersonalisedDiscounts.md
1
star
45

EcomEntity

https://github.com/TheAlgorithms/Google-Summer-of-Code/blob/main/project_ideas/NamedEntityRecognitionForEcommerceSearchQueries.md
1
star