Skip to main content

Lightweight, YAML-driven, text based, generic irc Bot framework

Project description

MewBot

Contributor Covenant

All Contributors

Linting

Quality Gate Status

MewBot is an automation framework intended to simplify building cross-platform text/chat-bots. The design is intended to be modular with configuration separated from code, allowing users and developers to build out custom logic and behaviours with minimal coding experience.

Status

WARNING: This project is still in the very early stages.

Some basic bots can be built and run, but we currently consider all parts of the framework to be unstable.

Packages and Modules

The codebase represents both the base API used to build components for the bot, as well as an implementation of the runtime to actually execute a bot. As such, it is built and published as a group of packages.

Package Modules Description
mewbot mewbot Tools to load a bot, and run that bot.
mewbot-core mewbot.core Base interfaces for all modules
mewbot-api mewbot.api.v1 Development libraries + component registry system. This is the package that all 3rd party libraries should depend on for their interfaces.
mewbot-io mewbot.io.* The bindings to connect MewBot to a given service.
mewbot-test mewbot.tests Utilities for writing tests for MewBot modules.

module dependency graph

These packages are generated by some trickery in setup.py.

Each package also defines its own requirements list. Installing requirements-dev.txt will include all of these automatically.

Development

Contributions to the project are made via GitHub pull requests, which will enforce the code style and linting requirements of this project.

Setting up project for local development

The recommended way to set this project up is using python 3.10 (or higher) with a standard venv setup. The project uses a "src-dir" layout; for Python to be able to locate the modules, you will need to set up the PYTHONPATH environment variable with at least the src/ directory.

For convenience in POSIX-like systems, an importable script ./tools/path is provided that will return the appropriate path.

The following example will get you started in POSIX-like shells (sh, bash, zsh, etc.).

# Get the source code
git clone git@github.com:mewler/mewbot
cd mewbot

# Set up the virtual environment
python3 -m venv venv
printf '. ./tools/path\n' >>venv/bin/activate

# Activate the virtual environment
source venv/bin/activate

# Install all dependencies (including development dependencies)
pip install -r requirements-dev.txt

# Run a demo!
python3 -m examples examples/trivial_socket.yaml

Running the tests and linters

You can run the linters via the convenience script ./tools/lint or with python -m mewbot.tools.lint This runs the auto-formatter black, two opinionated linting tools in flake8 and pylint, and the mypy type checker in strict mode.

You can run the test framework using the convenience script ./tools/test or with python -m mewbot.tools.test. Locally this will default to running all tests in parallel for fast testing. You can add the flag --cov to enable coverage, which will output coverage information both to the terminal and store details of code coverage as webpages in coverage/.

More information on the linters and tests can be found in the contributor documentation.

CREDENTIALS WARNING

Please note.

If you use you credentials for a service with mewbot, you do so at your own risk. Some services ban accounts if they are used with bots which they determine to be harmful. This can happen at any time and without warning.

Thus we CANNOT be held responsible if you use your account credentials - whether to generate a bot token or directly - with a mewbot bot which subsequently causes your account to be banned.

This is your responsbility. Not ours.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mewbot-test-0.0.3.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

mewbot_test-0.0.3-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file mewbot-test-0.0.3.tar.gz.

File metadata

  • Download URL: mewbot-test-0.0.3.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mewbot-test-0.0.3.tar.gz
Algorithm Hash digest
SHA256 205f0e8759ebb56f2237e5970bff34975ca76b9421105b3492d9ea26af211a95
MD5 0e6e54cd25f7ab247fe019adad8449c7
BLAKE2b-256 f875d5fc155d1a8b1398f5c8df60e2d76a71b6460cf2e8334629bdbc47d03a2b

See more details on using hashes here.

File details

Details for the file mewbot_test-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mewbot_test-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mewbot_test-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 86d3ccb61820d4db9b6dd9c3fff7c555838b307c80cbbb9367477cb9a2df9590
MD5 606f099f802055c78b9d8e78ab830c6e
BLAKE2b-256 4a6291e6f0932fd3126b86fd90891fa32415ad44626e4b0cf1503b40919d1686

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page