Skip to main content

PyPI PyPI - License Documentation Tests Run on Ubuntu Python Versions Tests Run on Macos Python Versions Tests Run on Windows Python Versions Github Repo

treecomp

Overview

A CLI and Python API to recursively compare directory trees and output a unified diff. Supports ignoring and targeting file and folder patterns with .gitignore-style syntax. Plays well with other tools: pipe output to dunk for pretty diffs and use -f json to output to JSON for use with jq and other tools.

Getting Started

The recommended way to install treecomp is with pipx, though it can also be installed with pip.

pipx install flexlate

Or, if you don't have/don't want to install pipx:

pip install flexlate

The unidiff output from this tool is best viewed using dunk, which can also be installed via pipx/pip.

pipx install dunk

Compare two file trees recursively and output unified diffs.

treecomp my_folder_1 my_folder_2 | dunk

It supports ignoring and targeting patterns with .gitignore-style syntax. It also has a strongly-typed Python API.

See examples in the documentation.

Development Status

This project is currently in early-stage development. There may be breaking changes often. While the major version is 0, minor version upgrades will often have breaking changes.

Developing

First ensure that you have pipx installed, if not, install it with pip install pipx.

Then clone the repo and run npm install and pipenv sync. Run pipenv shell to use the virtual environment. Make your changes and then run nox to run formatting, linting, and tests.

Develop documentation by running nox -s docs to start up a dev server.

To run tests only, run nox -s test. You can pass additional arguments to pytest by adding them after --, e.g. nox -s test -- -k test_something.

Author

Created by Nick DeRobertis. MIT License.

Links

See the documentation here.

Metadata

Release files for treecomp 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for treecomp 1.0.0
File Size Uploaded
treecomp-1.0.0.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for treecomp 1.0.0
File Interpreter ABI Platform
treecomp-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / treecomp-1.0.0.tar.gz

Download URL treecomp-1.0.0.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e59f42d81eed5d5fe74d45b2c6220370f1f49fe79d037ecbc9c464776f83cfc4
BLAKE2b-256 checksum
How to use checksums
10efd1b41502b9ebb91cda0bc697195f83bcbc62d07456dcbf1fc6b22c86f8e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / treecomp-1.0.0-py3-none-any.whl

Download URL treecomp-1.0.0-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d76c9ad6b2f20e24a67a9dd784ee24e37157601ff0f02281259c49abfe2cb08a
BLAKE2b-256 checksum
How to use checksums
61f5aefbf555e878109938dc65970e849d92ebb69a315fb9f0912fbae8c465c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page