GithubHelp home page GithubHelp logo

bazel-for-human-beings's Introduction

Bazel For Human Beings

Bazel lightweight plugin for PyCharm

Bazel4HumanBeingsLogo

Usage

TL;DR

Configure the bazel path in Preferences -> Bazel For Human Beings Configuration

Add new Bazel For Human Beings run configuration with the bazel rule or simply right click on a code file and Bazel For Human Beings will find the correct bazel rule for you

That's it now you can run bazel tasks from inside PyCharm!

In Depth

Bazel Executable path

Configure the bazel executable path in Preferences -> Bazel For Human Beings Configuration

Bazel4HumanBeingsLogo

As you can see above, there are two text boxes, one for the bazel query, and one for the bazel run.

Bazel for Human Beings is using bazel query command in order to get metadata on your run - for example derive the bazel rule type automatically, or suggest bazel rule based on the python file.

In this screen you can specify different bazel executable for the query commands and different one for the run, build and test commands. The main purpose of this separation is to enable the usage of third party bazel run wrappers like Dazel;

Bazel for Human Beings Run Configuration

After you install the plugin, you will receive new run configuration option: Bazel For Human Beings.

Create New Run Configuration

Select it to create new Bazel For Human Beings run configuration.

New Run Configuration

In the bazel execution path text box, enter the path to your rule.

The next text box is optional, and let you pass comma separated list of parameters to the bazel run command.

Save the run configuration, and you are good to go!

Create Run Configuration from context menu

We are human beings, and we don't remember the bazel rule path for each and every task. Not to worry, Bazel for Human Beings creates new run configuration for you!

Simply right click on your code file, and select "Create Bazel ..." and the run configuration will be created for you!

Create New Run Configuration From Context Menu

You can also user the "Run 'Bazel: ..." in order to create new run configuration and execute it.

Execute your Bazel For Human Beings Configuration

After you create new run configuration, now its the time to execute it - select your configuration and click run. You probably noticed that you haven't selected the bazel action, That's because Bazel For Human Beings automatically derive the bazel action required for this python bazel rule.

So just run the configuration and Bazel For Human Beings will show you the test browser, if this is test action, or simple console window for build, and run.

Test Results Example

Build

Using gradle jar task

Version Support

PyCharm 2018.2

bazel-for-human-beings's People

Contributors

thanetz 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.