Python Diff
Project description
pyff: Python Diff
The purpose of Python Diff (pyff
) is to compare two versions of a Python module
and detect syntactical and semantical differences between them. Currently pyff
is a very early-stage, experimental toy project, so please do not expect miracles.
Usage
You can install pyff
, preferably to a virtual environment, using the setup.py
file.
$ python -m venv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ python setup.py install
(...)
This installs the pyff
executable that accepts two Python files as positional
arguments:
$ pyff tests/examples/01-run.old tests/examples/01-run.new
Added import of new names ArgumentParser, Action from new package argparse
New class ParsePlayerAction with 0 public methods
Function main changed implementation, newly uses external names ArgumentParser
Programmatical interface in the form of pyff.api
or something similar is on
the roadmap.
Development
Currently, pyff
is quite trivial, but one of my goals while working on it was
to try use various Python development support tools, sometimes quite
excessively: pytest is used for testing (along with few
plugins) and Pylint for static analysis. The code of
pyff
is annotated with Python type hints and mypy is
used to check them. There are shell helpers in helpers/helpers.sh
that make
executing all checks easier:
$ pip install -r requirements-tests.txt
$ . helpers/helpers.sh
$ ft # Fast Test: run all tests without coverage, pylint and mypy check
$ st # Slow Test: run all tests with coverage, pylint and mypy
Future
Currently, the high-level roadmap looks somewhat like this:
- Finish the
pyff
command and provide basic set of smart comparisons. - Provide programmatical API (allow
import pyff.api
) providing machine-readable difference artifact. - Build a Git-aware comparison tools that will be able to compare Git revisions (instead of single files)
- Build a PR-commenting GitHub bot that should provide human readable, natural language "summaries" to submitted Python project PRs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pythondiff-0.6.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76c9617cc2e30c086dbf3dfc343b7c0605c629298e24d34e51c99ec1cd471208 |
|
MD5 | 93d246edaa7ee7cebadfd4bab7a02646 |
|
BLAKE2b-256 | 6bb5f639084af66087d8fc103666213c5c07a8a5a7d800a0d8c0627fd06c4869 |