Skip to main content

Compare development environments

Project description

diffenv

Output and compare all facets of development environments.

Overview

diffenv gathers and compares runtime environment metadata. A standard way of capturing a complete picture of a development environment.

output

Simplified example

$ diffenv
python:
  python-version: Python 3.7.3
shell:
  envvars:
    EDITOR: sublw  
    GIT_EDITOR: subl -w
    API_ENDPOINT: http://api.lvh.me:4000
    PRISMA_ENDPOINT: http://prisma:4466
os:
  timezone: 0200
  version: Darwin 18.7.0 x86_64

Full example output.

Use cases

  • Add environment data to bug reports in a standardized format. Example
  • Diagnose what subtle difference is making things fail on your coworker's machine.
  • Compare your current environment against past recorded state when things still worked.

Installation

python3 -m pip install diffenv

Currently diffenv only supports Python 3.

Use

To output your current development environment to stderr:

diffenv

To compare your environment with @werg:

diffenv -c https://raw.githubusercontent.com/error-central/diffenv/master/examples/gabe_env.yaml

To share your environment with a coworker for comparison:

diffenv --share

For a complete list of command line options run:

diffenv --help

Customization

diffenv can be customized for a user or for a repo. Customizations are put in a directory named .diffenv in the user's home directory or the git repos top directory.

Custom Facets

Custom facets for a git repo should be saved in .diffenv/facets/<yourfacet>

The facet file itself needs to be excutable (chmod +x <yourfacet>).

Configuration

You can limit which facets are run with a yaml file saved in .diffenv/config.yaml

See example_config.yaml for more information.

Contributing to diffenv

Development install

If you are developing locally, do not install as above, and instead run the following in the repo root directory:

# depending on your setup you may have to prefix sudo to this command
pip install --editable .

Now diffenv will always point to your local repo, including any changes.

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

diffenv-0.2.1.tar.gz (8.3 kB view hashes)

Uploaded Source

Built Distribution

diffenv-0.2.1-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

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