Skip to content
This repository has been archived by the owner on Sep 24, 2019. It is now read-only.

Latest commit

 

History

History
88 lines (56 loc) · 4.64 KB

CONTRIBUTING.md

File metadata and controls

88 lines (56 loc) · 4.64 KB

Contributing to dotaUpdatesBot

Greetings fellow Dota2, Telegram or Python enthusiast:tada: It's great to have you here, I could really use your help!

The following is a set of guidelines for contributing to dotaUpdatesBot which is a self-hosted Telegram bot that runs publicly as @announcebot. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Table Of Contents

The team

The developer team is basically just the owner of the project (and his alt account) but there have been quite a few contributions in github already. One of them could be you!

Where can I ask a question?

Note: Please don't file an issue to ask a question.

You can reach me in reddit for any questions that you might have, my username is /u/karaflix

How to contribute

Non-code contribution

The easiest way to contribute is to report a bug or submit a feature request. To do that you can use githubs issue system which only requires a github account. Please make your bug reports as simple and as clear as possible. There is only one of me and I have very limited time for this project. Likewise, any extreme suggestions will be probably ignored, or at least postponed for much, much later.

Code contribution

The hot stuff. So, in order to make a code contribution, please follow these steps:

  • Either choose or create a new issue describing what your contribution will do. If you create a new issue, make it simple but self-explanatory.
  • Fork the project's master branch
  • Do your thing
  • Test your thing
  • Test your thing again
  • Submit a PR for the development branch

If you are new to python, issues labeled with easy are a good starting point.

How to test your code

At this point, I will assume you are familiar with basic Python requirements and development. Most of what is needed is provided at the README file. Please consult it if you need any more info.

Note: If you believe these instruction are incomplete, please create an issue with the problem you encountered but wasn't explained in either this file or the README, and I will try to include it

The first step is to create your own bot. After installing telegram (alternatively, you can use the web version) message the BotFather. He will help you create a new bot and will give you the corresponding BOT TOKEN. Use that in the settings.py file.

Depending on your changes, you may also need to create a Dota2 API token (requires a steam account) and familiarize yourself with the Dota2 API wrapper. Use the token in the settings.py file.

Automated Linter

The project is automatically monitored by Codacy. After a PR is submitted, a review will be posted marking the PR as good or bad. Please spare the time to fix any issues it may suggest.

Styling guide

Git Commit Messages

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests

Python Styleguide

The project, finaly, adheres to the PEP8 guidelines (mostly) except for line length, which I don't really care but will accept as a PR if someone goes into the trouble for it. The most important thing is to use 4 spaces instead of tabs.

Also, if there is a lightweight library, that does the task adequately, it is better to use that instead of writing your own function.

Any functionality that adds to main.py should be written in utils.py, so that main.py only includes bot commands.


Finally, I would like to thank you for reading this, even if you don't end up submitting anything. Interest in this project is the only thing that keeps it alive. I appreciate your time.