Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

Latest commit

 

History

History
97 lines (61 loc) · 3.55 KB

CONTRIBUTING.rst

File metadata and controls

97 lines (61 loc) · 3.55 KB

Contributing

First off, thanks for taking the time to contribute!

Contributions are welcome by anybody and everybody. We are not kidding! Looking for help ? Join us on Slack by requesting an invite.

The rest of this document will be guidelines to contributing to the project. Remember that these are just guidelines, not rules. Use common sense as much as possible.

Pull Request Guidelines

Before you submit a pull request, check that it meets these guidelines:

  1. The pull request should include tests (if necessary). If you have any questions about how to write tests then ask the community.
  2. If the pull request adds functionality update the docs where appropriate.
  3. Use a good commit message.

Types of Contributions

Report Bugs

The best way to report a bug is to file an issue.

Please include:

  • Your operating system name and version.
  • Any details about your local setup that might be helpful in troubleshooting.
  • Detailed steps to reproduce the bug.

Fix Bugs & Features

Look through the github issues for bugs or features request. Anything tagged with "help-wanted" is open to whoever wants to implement it.

Write Documentation

Sirbot-pyslackers could always use more documentation and examples, whether as docstring or guide for setting things up.

Submit Feedback

The best way to submit feedback is to file an issue.

If you are proposing a feature:

  • Explain in detail how it would work.
  • Keep the scope as narrow as possible, to make it easier to implement.
  • Remember that this is a volunteer-driven project, and that contributions are welcome :)

Get started

Sirbot is build using pipenv for dependencies management and deployed as docker container. Some custom pipenv command are setup to ease the development workflow.

Before starting make sure docker and pipenv is installed.

Environment setup

Some environment variable are needed for Sirbot to operate. An example file is provided (docker/example.env). To overwrite it and set your own instance variable create a sirbot.env file in the docker directory.

Setup a development slack team

To test the bot it is required to create a development slack team and an app that use workspace token. To create a team click here and to create a workspace app click here.

Deploy a development bot

To deploy a development version of the bot on your own machine use the pipenv run up command. It will start a docker stack composed of:

  • The bot container
  • A postgresql database
  • An ngrok instance

Connect to http://localhost:4040 to access the ngrok management interface and find your url.

After making some modification rebuild and restart the bot container using the same pipenv run up command.

To shutdown all started containers use the pipenv run down command.

Code style testing

To run the CI tests use the pipenv run tests command. It will build a new docker image and run tests on it.