Skip to content

Commit 2bc94c0

Browse files
committed
dirdiff -> uniondiff
1 parent 01a4d20 commit 2bc94c0

25 files changed

+104
-104
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*
2-
!dirdiff
2+
!uniondiff
33
!tests
44
!requirements*
55
!setup.cfg

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: dirdiff
1+
name: uniondiff
22
on:
33
push:
44
branches:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ test-basic
66
.coverage
77
*.pypi-token.gpg
88
dist
9-
dirdiff.egg-info
9+
*.egg-info

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM python:3.8
22

3-
ENV PYTHONPATH=/dirdiff
4-
WORKDIR /dirdiff
3+
ENV PYTHONPATH=/uniondiff
4+
WORKDIR /uniondiff
55

66
COPY requirements* ./
77

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PYTHON ?= python3
33
PLATFORM ?= linux/amd64
44
PROFILE ?= dev
55
IMAGE_BUILDER ?= docker
6-
IMAGE_NAME ?= msg555/dirdiff
6+
IMAGE_NAME ?= msg555/uniondiff
77

88
all: format lint test docs
99

@@ -16,25 +16,25 @@ format-check:
1616
$(PYTHON) -m isort --profile=black --check .
1717

1818
pylint:
19-
$(PYTHON) -m pylint dirdiff tests
19+
$(PYTHON) -m pylint uniondiff tests
2020

2121
typecheck:
22-
$(PYTHON) -m mypy dirdiff tests
22+
$(PYTHON) -m mypy uniondiff tests
2323

2424
lint: format-check pylint typecheck
2525

2626
test:
2727
ifeq ($(OS),Windows_NT)
28-
$(PYTHON) -m pytest -sv --cov=dirdiff -m 'not cap and not unix' tests
28+
$(PYTHON) -m pytest -sv --cov=uniondiff -m 'not cap and not unix' tests
2929
else
30-
$(PYTHON) -m pytest -sv --cov=dirdiff -m 'not cap' tests
30+
$(PYTHON) -m pytest -sv --cov=uniondiff -m 'not cap' tests
3131
endif
3232

3333
test-all:
3434
ifeq ($(OS),Windows_NT)
35-
$(PYTHON) -m pytest -sv --cov=dirdiff -m 'not unix' tests
35+
$(PYTHON) -m pytest -sv --cov=uniondiff -m 'not unix' tests
3636
else
37-
$(PYTHON) -m pytest -sv --cov=dirdiff -m '' tests
37+
$(PYTHON) -m pytest -sv --cov=uniondiff -m '' tests
3838
endif
3939

4040
build:
@@ -47,7 +47,7 @@ image:
4747
$(IMAGE_BUILDER) build -t $(IMAGE_NAME) .
4848

4949
image-%: image
50-
docker run --rm -v "$${PWD}:/dirdiff" $(IMAGE_NAME) make $*
50+
docker run --rm -v "$${PWD}:/uniondiff" $(IMAGE_NAME) make $*
5151

5252
pypi-test: build
5353
TWINE_USERNAME=__token__ TWINE_PASSWORD="$(shell gpg -d test.pypi-token.gpg)" \

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
# dirdiff - Directory difference calculator
1+
# uniondiff - Directory difference calculator
22

3-
*dirdiff* is a simple tool for calculating the directory difference between two
4-
directories or archives. Dirdiff performs the calculation below:
3+
*uniondiff* is a simple tool for calculating the directory difference between two
4+
directories or archives. *uniondiff* performs the calculation below:
55

66
```
77
upper = merged - lower
88
```
99

1010
This tool acts as the inverse [union mount](https://en.wikipedia.org/wiki/Union_mount)
1111
file systems. Whereas typically you combine a *lower* and *upper* directory to
12-
produce a *merged* directory, *dirdiff* takes as input the *merged* directory
12+
produce a *merged* directory, *uniondiff* takes as input the *merged* directory
1313
and subtracts out the *lower* directory to produce the *upper* directory. In
1414
particular, the resulting output can be mounted as the *upper* directory
1515
along with the *lower* to produce the original *merged* directory.
1616

17-
*dirdiff* is intended for use with low level file system tools (e.g. container
17+
*uniondiff* is intended for use with low level file system tools (e.g. container
1818
systems) or for simply storing diffs of directories. Note that this tool *does
1919
not* store compact diffs of individual files; a file will appear in full in the
2020
diff iff its content or metadata has changed between the *merged* and *lower*
2121
operands.
2222

2323
## Installation
2424

25-
*dirdiff* can be installed through *pip*. This installs both the `dirdiff`
26-
CLI utility and the *dirdiff* Python library.
25+
*uniondiff* can be installed through *pip*. This installs both the `uniondiff`
26+
CLI utility and the *uniondiff* Python library.
2727

2828
```sh
2929
pip install tplbuild
3030
```
3131

32-
*dirdiff* is supported and tested on Python 3.8-3.10
32+
*uniondiff* is supported and tested on Python 3.8-3.10
3333

3434
## Examples
3535

3636
Compute the directory difference between the directory "data-day10" and
3737
"data-day9". By default the output will be written as a tar file.
3838

3939
```sh
40-
dirdiff data-day10 data-day9 > diff.tar
40+
uniondiff data-day10 data-day9 > diff.tar
4141
```
4242

43-
Dirdiff can also write directly to the file system. Note that it will ignore
43+
*uniondiff* can also write directly to the file system. Note that it will ignore
4444
ownership changes unless you also pass the `--preserve-owners` flag.
4545

4646
```sh
47-
dirdiff data-day10 data-day9 --output-type file -o diff
47+
uniondiff data-day10 data-day9 --output-type file -o diff
4848
```
4949

5050
You can also use tar archives as the input paths.
5151

5252
```sh
53-
dirdiff data-day10.tar data-day9.tgz > diff.tar
53+
uniondiff data-day10.tar data-day9.tgz > diff.tar
5454
```
5555

5656
## Contributing
5757

58-
If you want to contribute to *dirdiff*, you can do so by creating a pull request.
58+
If you want to contribute to *uniondiff*, you can do so by creating a pull request.
5959
lease make sure to include a detailed description of the changes you're proposing.

setup.cfg

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[metadata]
2-
name = dirdiff
3-
version = attr: dirdiff._version.__version__
2+
name = uniondiff
3+
version = attr: uniondiff._version.__version__
44
author = Mark Gordon
55
author_email = [email protected]
66
description = Directory difference CLI tool
77
long_description = file: README.md
88
long_description_content_type = text/markdown
9-
url = http://github.com/msg555/dirdiff/
9+
url = http://github.com/msg555/uniondiff/
1010
classifiers =
1111
Programming Language :: Python
1212
Programming Language :: Python :: 3
@@ -18,14 +18,14 @@ classifiers =
1818

1919
[options]
2020
packages =
21-
dirdiff
21+
uniondiff
2222
python_requires = >=3.8
2323
include-package-data = True
2424

2525
[options.package_data]
26-
dirdiff =
26+
uniondiff =
2727
py.typed
2828

2929
[options.entry_points]
3030
console_scripts =
31-
dirdiff = dirdiff.cli:main
31+
uniondiff = uniondiff.cli:main

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from dirdiff.output_file import OutputBackendFile
5+
from uniondiff.output_file import OutputBackendFile
66

77

88
@pytest.fixture

tests/test_e2e.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import tarfile
44
import tempfile
55

6-
from dirdiff.cli import main
6+
from uniondiff.cli import main
77

88

99
def tar_summarize(tf: tarfile.TarFile):

tests/test_io_file.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import pytest
66

7-
from dirdiff.filelib import DirectoryManager, StatInfo
8-
from dirdiff.osshim import major, makedev, minor
7+
from uniondiff.filelib import DirectoryManager, StatInfo
8+
from uniondiff.osshim import major, makedev, minor
99

1010
# pylint: disable=redefined-outer-name
1111

@@ -60,7 +60,7 @@ def test_file_write_dir(file_backend):
6060
def test_file_write_reg(file_backend):
6161
"""Test writing a regular file than reading the regular file"""
6262
mode = 0o644 | stat.S_IFREG
63-
data = b"Hello dirdiff!"
63+
data = b"Hello uniondiff!"
6464
file_name = "my-file"
6565

6666
st = stat_with_defaults(mode=mode, size=len(data))
@@ -83,7 +83,7 @@ def test_file_write_reg(file_backend):
8383
def test_file_write_link(file_backend):
8484
"""Test writing a file and a symlink pointing to it then reading the same"""
8585
mode = 0o644 | stat.S_IFREG
86-
data = b"Hello dirdiff!"
86+
data = b"Hello uniondiff!"
8787
file_name = "my-file"
8888

8989
st = stat_with_defaults(mode=mode, size=len(data))
@@ -155,7 +155,7 @@ def test_file_write_device(ftype, file_backend):
155155
def test_file_write_chown(file_backend_preserve):
156156
"""Test ownership preservation with a regular file"""
157157
mode = 0o644 | stat.S_IFREG
158-
data = b"Hello dirdiff!"
158+
data = b"Hello uniondiff!"
159159
file_name = "my-file"
160160
uid = 123
161161
gid = 543

0 commit comments

Comments
 (0)