The project is broken into 7 separate pieces:
- API ← You are here
- Database
- Hiscore scraper
- Machine Learning (ML)
- Discord Bot
- Twitter Bot
- Website
- Plugin
The API (core files) links all components with the database.
To request a new feature or report a bug you should open an issue on github. This way we can track new and interesting features recommended by users and developers of the plugin.
If you would like to join our community, get involved in development, join our clan, participate in events, and more -- you can join us on our discord!
Yes. We're always welcoming new talent to the team. Many new faces like to join our discord to have a bit of guidance, however if that's not your cup of tea -- we've listed all of the steps necessary to start a development environment, and to help contribute to banning bots, below:
This guide will take you through the necessary steps to start contributing to the server side components. This will include the following repositories:
You can find other relevant repositories in our organization's github.
- Docker
- Github desktop
- Git windows, Git unix will also work.
- An integrated development environment (IDE).
- We recommend VSCode, but any IDE will work.
pre-commit is used to format your commit before committing it.
pre-commit --version
pre-commit install
pre-commit runs automatically when you commit, but if it doesn't work.
pre-commit run --all-files
- Open a terminal
cmd
- Navigate
cd
to where you want to save our code. - The command below will Create a folder
bot-detector
with two sub foldersremote
&local
& download the remote repositories in theremote
folder.- To add the repositories in github desktop, select
File
on the top left than clickAdd local repository
, and navigate to the cloned repositories.
- To add the repositories in github desktop, select
Windows
mkdir bot-detector\remote bot-detector\local && cd bot-detector\remote
git clone https://github.com/Bot-detector/Bot-Detector-Core-Files.git
git clone https://github.com/Bot-detector/bot-detector-mysql.git
Linux
mkdir -p bot-detector/{remote,local}
git clone https://github.com/Bot-detector/Bot-Detector-Core-Files.git
git clone https://github.com/Bot-detector/bot-detector-mysql.git
- Now you can start the project, the command below will create the necessary docker containers, the first time might take a couple minutes. Make sure docker desktop is running!
cd Bot-Detector-Core-Files
docker-compose up --build
- In the terminal you will now see
/usr/sbin/mysqld: ready for connections.
this means the database is ready. - Test the api's:
- Core api:
http://localhost:5000/
- Core api:
adding /docs at the end will give return the swagger documentation for the components /docs
Features, and bugs are documented as issues in each repository. The project owners, review these, and select some as part of a github project.
Changes to the project will have to submitted through the process of Merge Requests. Github has good documentation outlining this process and how it works, but to summarize it here briefly:
- Go to our repository and click
Fork
. - Clone your newly created repository to your local machine (into the
bot-detector\local
folder) - Make your local changes. Test. Commit. And push to your own repo
- Open a Merge Request
- Make sure you are working in your fork. This will be a copy of the repository.
- In github desktop, in the top left, you can click
Current repository
, select the repository under your name.
- In github desktop, in the top left, you can click
- Create a branch, with a relative name, related to the issue.
- In github desktop, on the top click
branch
orcurrent branch
thannew branch
.
- In github desktop, on the top click
- Publish your branch.
- In github desktop, blue button on the middle of your screen
Publish branch
- In github desktop, blue button on the middle of your screen
- Create your commits (changes).
- Small commits, defined scope are preferred.
- Commit messages are desired.
- Push your commits.
- Create a Pull Request (PR)
- In github desktop, blue button on the middle of your screen
Create Pull Request
- This will open your browser, make sure the base repository:
Bot-detector/
and base:develop
- In github desktop, blue button on the middle of your screen
Code must be well-understood by those willing to review it. Please add comments where necessary, if you find that the method used may be difficult to decipher in the future.
Code must be linted prior to merging. We use black
.
Tests must be written where applicable.
- File:
snake_case
- Class:
camelCase
- Function:
snake_case
- Variable:
snake_case
- Table:
camelCase
- Route:
kebab-case
We have automated workflows setup for assigning approvers based on their knowledge in each repository - this person will be the owner of Issue/Merge Request. If we have not seen your pull request in a 24 hour period, please notify us via our our discord or on github.