Giter Club home page Giter Club logo

wadebug's Introduction

WhatsApp Business API Setup Debugger

User Guide: https://developers.facebook.com/docs/whatsapp/guides/wadebug

WADebug is a command-line tool to help find any potential issues with WhatsApp Business API setup, and to make requesting for help from WhatsApp support more effective.

To run, simply type wadebug on command-ine and check the diagnostic. It will guide on some problems and provide guidance if you need additional support.

Usage

To execute all actions: $ wadebug

To execute one specific action $ wadebug partial check_network

Installation

For users:

$ pip3 install wadebug

For developers:

This tool uses tox to test both Python 2.7 and 3.6. tox will create virtual environments to run tests for both. Install tox on your system's Python. All other dependencies with go into virtualenvs.

  1. Install tox on your system using pip pip install tox, you may need to run the command in sudo
  2. After installing tox, run tox in the root directory. Tests should run and pass.
  3. Run source .tox/py3/bin/activate to enable one of the virtualenvs. Dependencies will be installed automatically.
  4. Run pip install --editable . to enable wadebug in all directories that would reflect your changes.
  5. Run wadebug with environment variable WADEBUG_DEV_MODE=True to enable full stacktrace. The variable is set to False by default.

Testing

To execute all unit tests, from project's root folder directory run:

$ tox

Warning: do NOT run tox from a virtualenv as it will fail.

tox will run tests in Python 2 and 3.

To run tests in Python 3 for faster feedback, run either $ pytest from within the virtualenv or $ tox -epy3 out of it.

To run tests in a particular module: source .tox/py3/bin/activate # to enable virtualenv on Bash $ pytest wadebug/wa_actions/tests/test_check_webapp_port.py -v

(-v turns on verbose mode, which shows every test case in the module)

Dependencies

More details can be found at setup.py file.

Architecture

The module wa_actions.implementations is the heart of the tool. Each action is a Python class with one static method called _run. This method describes the action to perform.

The idea is that a developer can implement a new action to investigate a potential problem with the deployment without knowing anything about wadebug architecture.

Three sample actions can be seem on wadebug/wa_actions/implementations/dummy_action.py to understand how they are created. On wadebug/wa_actions/implementations/check_webapp_port.py the implementation of a real action can be found.

License

WADebug is MIT licensed.

wadebug's People

Contributors

alanhhwong avatar facebook-github-bot avatar mengyiyuan avatar p2sun avatar zpao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.