treex-cli 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {treex_cli-0.2.2 → treex_cli-0.2.3}/Cargo.lock +15 -15
- {treex_cli-0.2.2 → treex_cli-0.2.3}/Cargo.toml +1 -1
- {treex_cli-0.2.2 → treex_cli-0.2.3}/PKG-INFO +3 -3
- {treex_cli-0.2.2 → treex_cli-0.2.3}/README.md +2 -2
- {treex_cli-0.2.2 → treex_cli-0.2.3}/pyproject.toml +1 -1
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex/treex.py +5 -2
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex_cli.egg-info/PKG-INFO +3 -3
- {treex_cli-0.2.2 → treex_cli-0.2.3}/tests/test_treex.py +6 -6
- {treex_cli-0.2.2 → treex_cli-0.2.3}/LICENSE +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/MANIFEST.in +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/rust/lib.rs +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/setup.cfg +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex/__init__.py +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex_cli.egg-info/SOURCES.txt +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex_cli.egg-info/dependency_links.txt +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex_cli.egg-info/entry_points.txt +0 -0
- {treex_cli-0.2.2 → treex_cli-0.2.3}/src/treex_cli.egg-info/top_level.txt +0 -0
|
@@ -352,9 +352,9 @@ dependencies = [
|
|
|
352
352
|
|
|
353
353
|
[[package]]
|
|
354
354
|
name = "gix-config"
|
|
355
|
-
version = "0.62.
|
|
355
|
+
version = "0.62.2"
|
|
356
356
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
357
|
-
checksum = "
|
|
357
|
+
checksum = "3e11ccf82e9630c4e7befbae07cbe90e79de61dc73a34448c2dec70a13da9ebf"
|
|
358
358
|
dependencies = [
|
|
359
359
|
"bstr",
|
|
360
360
|
"gix-config-value",
|
|
@@ -496,9 +496,9 @@ dependencies = [
|
|
|
496
496
|
|
|
497
497
|
[[package]]
|
|
498
498
|
name = "gix-hashtable"
|
|
499
|
-
version = "0.18.
|
|
499
|
+
version = "0.18.1"
|
|
500
500
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
501
|
-
checksum = "
|
|
501
|
+
checksum = "2f66822aee11ccb28d6a2e63b587254e578fb52a138bd5806b58d8560125592b"
|
|
502
502
|
dependencies = [
|
|
503
503
|
"gix-hash",
|
|
504
504
|
"hashbrown 0.17.1",
|
|
@@ -507,9 +507,9 @@ dependencies = [
|
|
|
507
507
|
|
|
508
508
|
[[package]]
|
|
509
509
|
name = "gix-ignore"
|
|
510
|
-
version = "0.24.
|
|
510
|
+
version = "0.24.1"
|
|
511
511
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
512
|
-
checksum = "
|
|
512
|
+
checksum = "968f12fe42896873504f46127cd5bf0f9a34fc1479a781f43cf94b5d8d760a15"
|
|
513
513
|
dependencies = [
|
|
514
514
|
"bstr",
|
|
515
515
|
"gix-glob",
|
|
@@ -660,9 +660,9 @@ dependencies = [
|
|
|
660
660
|
|
|
661
661
|
[[package]]
|
|
662
662
|
name = "gix-parallel"
|
|
663
|
-
version = "0.50.
|
|
663
|
+
version = "0.50.1"
|
|
664
664
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
665
|
-
checksum = "
|
|
665
|
+
checksum = "58e7e10f8343e05f6ad8651f97dffa1caca1531bb274bfc8e3050e80e3ed5946"
|
|
666
666
|
dependencies = [
|
|
667
667
|
"crossbeam-channel",
|
|
668
668
|
"gix-trace",
|
|
@@ -777,9 +777,9 @@ dependencies = [
|
|
|
777
777
|
|
|
778
778
|
[[package]]
|
|
779
779
|
name = "gix-sec"
|
|
780
|
-
version = "0.16.
|
|
780
|
+
version = "0.16.1"
|
|
781
781
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
782
|
-
checksum = "
|
|
782
|
+
checksum = "9598d1f35baec7038c2d278bfcc18f1d8951f41dcc3f51ab6175661dfe5a6137"
|
|
783
783
|
dependencies = [
|
|
784
784
|
"bitflags 2.13.2",
|
|
785
785
|
"gix-path",
|
|
@@ -869,9 +869,9 @@ dependencies = [
|
|
|
869
869
|
|
|
870
870
|
[[package]]
|
|
871
871
|
name = "gix-utils"
|
|
872
|
-
version = "0.5.
|
|
872
|
+
version = "0.5.2"
|
|
873
873
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
874
|
-
checksum = "
|
|
874
|
+
checksum = "11a9446060447e9ec58f5d333b98bed53389dfa10de5d8dd46fc76d01dfc2954"
|
|
875
875
|
dependencies = [
|
|
876
876
|
"bstr",
|
|
877
877
|
"bytes",
|
|
@@ -1332,9 +1332,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
|
|
1332
1332
|
|
|
1333
1333
|
[[package]]
|
|
1334
1334
|
name = "smallvec"
|
|
1335
|
-
version = "1.16.
|
|
1335
|
+
version = "1.16.4"
|
|
1336
1336
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1337
|
-
checksum = "
|
|
1337
|
+
checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8"
|
|
1338
1338
|
|
|
1339
1339
|
[[package]]
|
|
1340
1340
|
name = "stable_deref_trait"
|
|
@@ -1411,7 +1411,7 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
|
|
|
1411
1411
|
|
|
1412
1412
|
[[package]]
|
|
1413
1413
|
name = "treex-native"
|
|
1414
|
-
version = "0.2.
|
|
1414
|
+
version = "0.2.3"
|
|
1415
1415
|
dependencies = [
|
|
1416
1416
|
"gix",
|
|
1417
1417
|
"pyo3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: treex-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Command-line directory tree utility with metadata and Git ignore support
|
|
5
5
|
Author: Corey Goldberg
|
|
6
6
|
Maintainer: Corey Goldberg
|
|
@@ -110,8 +110,8 @@ Prebuilt wheels are available for common platforms. See
|
|
|
110
110
|
## Git ignore support
|
|
111
111
|
|
|
112
112
|
`treex` uses [Gitoxide][gitoxide-home] (`gix`), a native Rust implementation of
|
|
113
|
-
Git
|
|
114
|
-
|
|
113
|
+
Git, to evaluate `.gitignore` rules without invoking the Git executable. Git
|
|
114
|
+
does not need to be installed for ignore matching to work.
|
|
115
115
|
|
|
116
116
|
When the specified directory is inside a Git working tree, `treex` respects
|
|
117
117
|
applicable `.gitignore` rules by default. Outside a Git working tree, Git ignore
|
|
@@ -87,8 +87,8 @@ Prebuilt wheels are available for common platforms. See
|
|
|
87
87
|
## Git ignore support
|
|
88
88
|
|
|
89
89
|
`treex` uses [Gitoxide][gitoxide-home] (`gix`), a native Rust implementation of
|
|
90
|
-
Git
|
|
91
|
-
|
|
90
|
+
Git, to evaluate `.gitignore` rules without invoking the Git executable. Git
|
|
91
|
+
does not need to be installed for ignore matching to work.
|
|
92
92
|
|
|
93
93
|
When the specified directory is inside a Git working tree, `treex` respects
|
|
94
94
|
applicable `.gitignore` rules by default. Outside a Git working tree, Git ignore
|
|
@@ -29,6 +29,9 @@ except PackageNotFoundError:
|
|
|
29
29
|
__version__ = "unknown"
|
|
30
30
|
|
|
31
31
|
|
|
32
|
+
PROG = "treex"
|
|
33
|
+
|
|
34
|
+
|
|
32
35
|
class GitIgnore:
|
|
33
36
|
"""Apply Git ignore rules using Gitoxide when inside a repository."""
|
|
34
37
|
|
|
@@ -455,7 +458,7 @@ def parse_args(argv=None):
|
|
|
455
458
|
parser = argparse.ArgumentParser(
|
|
456
459
|
description="List directory contents as a tree "
|
|
457
460
|
"with file and directory metadata.",
|
|
458
|
-
usage="
|
|
461
|
+
usage=f"{PROG} [OPTIONS] [directory]",
|
|
459
462
|
formatter_class=formatter,
|
|
460
463
|
)
|
|
461
464
|
parser.add_argument(
|
|
@@ -469,7 +472,7 @@ def parse_args(argv=None):
|
|
|
469
472
|
"-V",
|
|
470
473
|
"--version",
|
|
471
474
|
action="version",
|
|
472
|
-
version=f"
|
|
475
|
+
version=f"{PROG} {__version__}",
|
|
473
476
|
help="show version information and exit",
|
|
474
477
|
)
|
|
475
478
|
parser.add_argument(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: treex-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Command-line directory tree utility with metadata and Git ignore support
|
|
5
5
|
Author: Corey Goldberg
|
|
6
6
|
Maintainer: Corey Goldberg
|
|
@@ -110,8 +110,8 @@ Prebuilt wheels are available for common platforms. See
|
|
|
110
110
|
## Git ignore support
|
|
111
111
|
|
|
112
112
|
`treex` uses [Gitoxide][gitoxide-home] (`gix`), a native Rust implementation of
|
|
113
|
-
Git
|
|
114
|
-
|
|
113
|
+
Git, to evaluate `.gitignore` rules without invoking the Git executable. Git
|
|
114
|
+
does not need to be installed for ignore matching to work.
|
|
115
115
|
|
|
116
116
|
When the specified directory is inside a Git working tree, `treex` respects
|
|
117
117
|
applicable `.gitignore` rules by default. Outside a Git working tree, Git ignore
|
|
@@ -1019,7 +1019,7 @@ class TestArgumentParsing:
|
|
|
1019
1019
|
treex.parse_args([option])
|
|
1020
1020
|
assert exc_info.value.code == 0
|
|
1021
1021
|
output = capsys.readouterr().out
|
|
1022
|
-
assert output.splitlines()[0] == "usage: treex [OPTIONS] [directory]"
|
|
1022
|
+
assert output.splitlines()[0] == f"usage: {treex.PROG} [OPTIONS] [directory]"
|
|
1023
1023
|
|
|
1024
1024
|
@pytest.mark.parametrize("option", ["-V", "--version"])
|
|
1025
1025
|
def test_version(self, option, capsys):
|
|
@@ -1027,7 +1027,7 @@ class TestArgumentParsing:
|
|
|
1027
1027
|
treex.parse_args([option])
|
|
1028
1028
|
assert exc_info.value.code == 0
|
|
1029
1029
|
output = capsys.readouterr().out
|
|
1030
|
-
assert output.strip() == f"treex {treex.__version__}"
|
|
1030
|
+
assert output.strip() == f"{treex.PROG} {treex.__version__}"
|
|
1031
1031
|
|
|
1032
1032
|
@pytest.mark.parametrize("option", ["-a", "--all"])
|
|
1033
1033
|
def test_all(self, option):
|
|
@@ -1164,7 +1164,7 @@ class TestArgumentParsing:
|
|
|
1164
1164
|
class TestMain:
|
|
1165
1165
|
def test_success(self, tmp_path, capsys):
|
|
1166
1166
|
(tmp_path / "file.txt").write_text("hello", encoding="utf-8")
|
|
1167
|
-
with patch.object(sys, "argv", [
|
|
1167
|
+
with patch.object(sys, "argv", [treex.PROG, str(tmp_path)]):
|
|
1168
1168
|
assert treex.main() == 0
|
|
1169
1169
|
output = capsys.readouterr().out
|
|
1170
1170
|
assert str(tmp_path) in output
|
|
@@ -1176,7 +1176,7 @@ class TestMain:
|
|
|
1176
1176
|
directory = tmp_path / "dir"
|
|
1177
1177
|
directory.mkdir()
|
|
1178
1178
|
(tmp_path / "file.txt").write_text("hello", encoding="utf-8")
|
|
1179
|
-
with patch.object(sys, "argv", [
|
|
1179
|
+
with patch.object(sys, "argv", [treex.PROG, "--dirs", str(tmp_path)]):
|
|
1180
1180
|
assert treex.main() == 0
|
|
1181
1181
|
output = capsys.readouterr().out
|
|
1182
1182
|
assert str(tmp_path) in output
|
|
@@ -1188,13 +1188,13 @@ class TestMain:
|
|
|
1188
1188
|
def test_not_a_directory(self, tmp_path, capsys):
|
|
1189
1189
|
path = tmp_path / "file.txt"
|
|
1190
1190
|
path.write_text("hello", encoding="utf-8")
|
|
1191
|
-
with patch.object(sys, "argv", [
|
|
1191
|
+
with patch.object(sys, "argv", [treex.PROG, str(path)]):
|
|
1192
1192
|
assert treex.main() == 1
|
|
1193
1193
|
assert f"Not a directory: {path}" in capsys.readouterr().err
|
|
1194
1194
|
|
|
1195
1195
|
def test_keyboard_interrupt(self, tmp_path, capsys):
|
|
1196
1196
|
with (
|
|
1197
|
-
patch.object(sys, "argv", [
|
|
1197
|
+
patch.object(sys, "argv", [treex.PROG, str(tmp_path)]),
|
|
1198
1198
|
patch.object(treex, "print_tree", side_effect=KeyboardInterrupt),
|
|
1199
1199
|
):
|
|
1200
1200
|
assert treex.main() == 130
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|