• Stars
    star
    155
  • Rank 240,864 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created about 4 years ago
  • Updated 9 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
193,522
star
2

Java

All Algorithms implemented in Java
Java
58,698
star
3

JavaScript

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

C-Plus-Plus

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

Rust

All Algorithms implemented in Rust
Rust
22,144
star
6

C

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

Go

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

C-Sharp

All algorithms implemented in C#.
C#
7,097
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.
3,019
star
10

Dart

All Algorithms implemented in Dart
Dart
1,865
star
11

PHP

All Algorithms implemented in PHP
PHP
1,803
star
12

Kotlin

All Algorithms implemented in Kotlin
Kotlin
1,362
star
13

TypeScript

Algorithms and Data Structures implemented in TypeScript for beginners, following best practices.
TypeScript
1,328
star
14

Ruby

All algorithms implemented in Ruby
Ruby
1,145
star
15

Scala

All Algorithms implemented in Scala
Scala
1,066
star
16

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
869
star
17

R

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

website

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

Jupyter

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

Swift

All Algorithms implemented in Swift
Swift
457
star
21

Julia

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

Haskell

Haskell
374
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
367
star
24

Solidity

Algorithms and data structures implemented in Solidity
Solidity
327
star
25

Lua

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

Elixir

Elixir
228
star
27

F-Sharp

All Algorithms implemented in F#
F#
206
star
28

website-old

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

.github

Default configuration for @TheAlgorithms repositories
183
star
30

AArch64_Assembly

All Algorithms implemented in AArch64 Assembly
Assembly
136
star
31

Zig

Collection of Algorithms implemented in Zig.
Zig
125
star
32

OCaml

Algorithms Implemented in OCaml
OCaml
91
star
33

Clojure

All Algorithms implemented in Clojure
Clojure
87
star
34

Nim

Collection of various algorithms implemented in Nim for educational purposes.
Nim
79
star
35

scripts

Scripts used across all The Algorithms repositories
Python
76
star
36

Elm

All Algorithms implemented in Elm
Elm
64
star
37

Fortran

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

Google-Summer-of-Code

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

Mojo

All algorithms implemented in Mojo. (The first open-sourced Mojo repository on GitHub)
Mojo
26
star
40

Jule

Algorithms and data structures implemented in the Jule programming language.
17
star
41

Zig-delete

All Algorithms implemented in Zig
12
star
42

SessionGuard.js

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

Personalised-Discounts

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

SessionGuard-Core

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

EcomEntity

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