Prepare reports on environments and report the differences between two environments.
First and foremost, envreport produces a report on an environment in a diffable format.
Inspired by pyenvdiff, which appears to have gone unmaintained.
The main goal is to help folks answer the question "It worked here, it didn't work there. WHY? WHAT'S DIFFERENT?!"
Design goals:
- collect information about an environment, so that it can be easily compared with another
- be compatible, easily distributable (a single Python script, require only standard library for relatively old Python)
- be modular, so additional sources of information can be added, as needed
- always produce something, even if data collection fails
To use this, you can pip install
it, or place the script somewhere and run it:
python3 envreport.py
For example, download envreport.py and run it to get a report of a docker image (condaforge/miniforge3
in the example below):
cat envreport.py | docker run --rm -i condaforge/miniforge3 python3 > miniforge3.md
The above doesn't require placing any files in the image or container.
You can even run it e.g. in a running pod on kubernetes, as long as it has Python 3.6:
cat envreport.py | kubectl exec -i hub-5cfd767f85-q6wxs -- python3 > hub.md
You can use %envreport
in IPython:
%load_ext envreport
%envreport
The convenient one liner (if you trust me):
curl https://raw.githubusercontent.com/minrk/envreport/HEAD/envreport.py | python3
Remember, piping files from the Internet to your shell is trusting the maintainers and hosts of the repo to protect it from malicious code.
But then again, so is pip install
, really.