Bryan Weber
Writing Code Resume

Creating A tasks.json File for VS Code

Published Mon 24 January 2022 in personal

by Bryan Weber

VS Code has a super useful feature called tasks. These allow you to define and chain arbitrary shell commands or programs together and run them from the VS Code UI. This idea has effectively unlimited potential, but one use I came up with today is to automatically generate an HTML coverage report after running pytest. This is super useful when writing tests to address code coverage, since you can have the tests open in VS Code and the HTML report open in a browser. When you run the task after saving your tests, you only need to refresh the browser tab to see updated results.

Read more...

Other articles

Real Python Articles

Sat 21 August 2021

I’ve written a few more articles on Real Python since my last post:

Real Python Articles

Sat 28 December 2019

For about a year, I’ve been writing for a website called Real Python. They publish tutorials and video courses...

Writing Task Plugins for Nikola

Sat 22 December 2018

Nikola is an awesome static website generator built in Python. I recently used it to develop the new website...

Controlling plugin task execution order in Nikola

Thu 20 December 2018

When writing a plugin for Nikola, it may be useful to have a task that has to run another task. For instance,...

How to build a package installer on OS X for the Cantera MATLAB interface

Fri 01 January 2016

To make it easier to install certain portions of Cantera onto Macs, rather than having to install XCode and...

How to set up an encrypted .netrc file with GPG for GitHub 2FA access

Fri 01 January 2016

Enabling 2 factor authentication on GitHub is a good way to protect your data, but unfortunately, it means you...

Previous Next page
  • Page 1 / 7

Social

  • GitHub
  • LinkedIn

License

  • CC BY-SA 3.0
Bulrush theme for Pelican HTML 5 CSS 3 Made with Bulma