treex-cli 0.2.1__tar.gz → 0.2.2__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.1 → treex_cli-0.2.2}/Cargo.lock +85 -85
- {treex_cli-0.2.1 → treex_cli-0.2.2}/Cargo.toml +2 -2
- {treex_cli-0.2.1 → treex_cli-0.2.2}/PKG-INFO +1 -1
- {treex_cli-0.2.1 → treex_cli-0.2.2}/pyproject.toml +8 -8
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex_cli.egg-info/PKG-INFO +1 -1
- {treex_cli-0.2.1 → treex_cli-0.2.2}/tests/test_treex.py +120 -210
- {treex_cli-0.2.1 → treex_cli-0.2.2}/LICENSE +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/MANIFEST.in +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/README.md +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/rust/lib.rs +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/setup.cfg +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex/__init__.py +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex/treex.py +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex_cli.egg-info/SOURCES.txt +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex_cli.egg-info/dependency_links.txt +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex_cli.egg-info/entry_points.txt +0 -0
- {treex_cli-0.2.1 → treex_cli-0.2.2}/src/treex_cli.egg-info/top_level.txt +0 -0
|
@@ -232,9 +232,9 @@ dependencies = [
|
|
|
232
232
|
|
|
233
233
|
[[package]]
|
|
234
234
|
name = "gix"
|
|
235
|
-
version = "0.
|
|
235
|
+
version = "0.90.0"
|
|
236
236
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
-
checksum = "
|
|
237
|
+
checksum = "b92b20c1560511a9014b16e29db2f3c6f0580d4fe289b70f41131277b065a3b0"
|
|
238
238
|
dependencies = [
|
|
239
239
|
"gix-actor",
|
|
240
240
|
"gix-commitgraph",
|
|
@@ -279,9 +279,9 @@ dependencies = [
|
|
|
279
279
|
|
|
280
280
|
[[package]]
|
|
281
281
|
name = "gix-actor"
|
|
282
|
-
version = "0.44.
|
|
282
|
+
version = "0.44.1"
|
|
283
283
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
284
|
-
checksum = "
|
|
284
|
+
checksum = "78243d3371019288a40a75ba1a58de2815c32591fc87b9f7cb01918bce364ca8"
|
|
285
285
|
dependencies = [
|
|
286
286
|
"bstr",
|
|
287
287
|
"gix-date",
|
|
@@ -290,9 +290,9 @@ dependencies = [
|
|
|
290
290
|
|
|
291
291
|
[[package]]
|
|
292
292
|
name = "gix-attributes"
|
|
293
|
-
version = "0.37.
|
|
293
|
+
version = "0.37.1"
|
|
294
294
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
295
|
-
checksum = "
|
|
295
|
+
checksum = "6b9947d93a94d41ddde66ac655674269121cbebaf6cdee30d8d0e7dbe85edb4c"
|
|
296
296
|
dependencies = [
|
|
297
297
|
"bstr",
|
|
298
298
|
"gix-error",
|
|
@@ -307,27 +307,27 @@ dependencies = [
|
|
|
307
307
|
|
|
308
308
|
[[package]]
|
|
309
309
|
name = "gix-bitmap"
|
|
310
|
-
version = "0.6.
|
|
310
|
+
version = "0.6.1"
|
|
311
311
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
312
|
-
checksum = "
|
|
312
|
+
checksum = "422cd23418fd80e9e965595323975d72abd6364a66ff8f0daade5c105a7f35d2"
|
|
313
313
|
dependencies = [
|
|
314
314
|
"gix-error",
|
|
315
315
|
]
|
|
316
316
|
|
|
317
317
|
[[package]]
|
|
318
318
|
name = "gix-chunk"
|
|
319
|
-
version = "0.10.
|
|
319
|
+
version = "0.10.1"
|
|
320
320
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
321
|
-
checksum = "
|
|
321
|
+
checksum = "dc6a775aba54f0d65698126cc4214b6bf8ddb208312e4ef4240dfe34b0697b87"
|
|
322
322
|
dependencies = [
|
|
323
323
|
"gix-error",
|
|
324
324
|
]
|
|
325
325
|
|
|
326
326
|
[[package]]
|
|
327
327
|
name = "gix-command"
|
|
328
|
-
version = "0.12.
|
|
328
|
+
version = "0.12.1"
|
|
329
329
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
330
|
-
checksum = "
|
|
330
|
+
checksum = "df63215f103299169e239dfe76f5cfa4a3d6d4adf69a01774085e3e0423cba34"
|
|
331
331
|
dependencies = [
|
|
332
332
|
"bstr",
|
|
333
333
|
"gix-error",
|
|
@@ -338,9 +338,9 @@ dependencies = [
|
|
|
338
338
|
|
|
339
339
|
[[package]]
|
|
340
340
|
name = "gix-commitgraph"
|
|
341
|
-
version = "0.
|
|
341
|
+
version = "0.42.0"
|
|
342
342
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
343
|
-
checksum = "
|
|
343
|
+
checksum = "60b53b700d2a506cf98075099df1fcc0558265cbb47fd86bc6d03c231e4bd72a"
|
|
344
344
|
dependencies = [
|
|
345
345
|
"bstr",
|
|
346
346
|
"gix-chunk",
|
|
@@ -352,9 +352,9 @@ dependencies = [
|
|
|
352
352
|
|
|
353
353
|
[[package]]
|
|
354
354
|
name = "gix-config"
|
|
355
|
-
version = "0.62.
|
|
355
|
+
version = "0.62.1"
|
|
356
356
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
357
|
-
checksum = "
|
|
357
|
+
checksum = "2d8de82251a43c9f845458cd64e565f7350ce446bb786348f79d80dc5089806e"
|
|
358
358
|
dependencies = [
|
|
359
359
|
"bstr",
|
|
360
360
|
"gix-config-value",
|
|
@@ -372,9 +372,9 @@ dependencies = [
|
|
|
372
372
|
|
|
373
373
|
[[package]]
|
|
374
374
|
name = "gix-config-value"
|
|
375
|
-
version = "0.21.
|
|
375
|
+
version = "0.21.1"
|
|
376
376
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
377
|
-
checksum = "
|
|
377
|
+
checksum = "6cdada8bd9c97dc6522505c08226d9c88f0a1286f2c06b9e1bf51c3bf7ad7b2b"
|
|
378
378
|
dependencies = [
|
|
379
379
|
"bitflags 2.13.2",
|
|
380
380
|
"bstr",
|
|
@@ -386,9 +386,9 @@ dependencies = [
|
|
|
386
386
|
|
|
387
387
|
[[package]]
|
|
388
388
|
name = "gix-date"
|
|
389
|
-
version = "0.18.
|
|
389
|
+
version = "0.18.1"
|
|
390
390
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
391
|
-
checksum = "
|
|
391
|
+
checksum = "4c538190012dbb536df54734ec38cc1109270c73f2f76585c011dd5b0c9f087c"
|
|
392
392
|
dependencies = [
|
|
393
393
|
"bstr",
|
|
394
394
|
"gix-error",
|
|
@@ -398,9 +398,9 @@ dependencies = [
|
|
|
398
398
|
|
|
399
399
|
[[package]]
|
|
400
400
|
name = "gix-diff"
|
|
401
|
-
version = "0.
|
|
401
|
+
version = "0.70.0"
|
|
402
402
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
403
|
-
checksum = "
|
|
403
|
+
checksum = "2c794988335792f85c3ca79c385c950b3a921a71ba3df361cb1f9e5b6bd4a6e4"
|
|
404
404
|
dependencies = [
|
|
405
405
|
"bstr",
|
|
406
406
|
"gix-error",
|
|
@@ -410,9 +410,9 @@ dependencies = [
|
|
|
410
410
|
|
|
411
411
|
[[package]]
|
|
412
412
|
name = "gix-discover"
|
|
413
|
-
version = "0.57.
|
|
413
|
+
version = "0.57.1"
|
|
414
414
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
415
|
-
checksum = "
|
|
415
|
+
checksum = "4a0875f4e5408713fcf92265973cc38bf9dc5a93384ce218beba0572b7785a03"
|
|
416
416
|
dependencies = [
|
|
417
417
|
"bstr",
|
|
418
418
|
"dunce",
|
|
@@ -425,18 +425,18 @@ dependencies = [
|
|
|
425
425
|
|
|
426
426
|
[[package]]
|
|
427
427
|
name = "gix-error"
|
|
428
|
-
version = "0.5.
|
|
428
|
+
version = "0.5.2"
|
|
429
429
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
430
|
-
checksum = "
|
|
430
|
+
checksum = "d87ff4b3f3daf01234d38d176b0ec00e92de514cc0e3fb8a8898c5cb7ccd22bb"
|
|
431
431
|
dependencies = [
|
|
432
432
|
"bstr",
|
|
433
433
|
]
|
|
434
434
|
|
|
435
435
|
[[package]]
|
|
436
436
|
name = "gix-filter"
|
|
437
|
-
version = "0.36.
|
|
437
|
+
version = "0.36.1"
|
|
438
438
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
439
|
-
checksum = "
|
|
439
|
+
checksum = "f8df8d50fda4684c6ec366f75e4082ab6fc3d437d3deec30ff88462710b68d17"
|
|
440
440
|
dependencies = [
|
|
441
441
|
"bstr",
|
|
442
442
|
"encoding_rs",
|
|
@@ -455,9 +455,9 @@ dependencies = [
|
|
|
455
455
|
|
|
456
456
|
[[package]]
|
|
457
457
|
name = "gix-fs"
|
|
458
|
-
version = "0.24.
|
|
458
|
+
version = "0.24.1"
|
|
459
459
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
460
|
-
checksum = "
|
|
460
|
+
checksum = "808f23d897ddfe847d9b7206bda947901885be623bdf96b226a2dccf87f018c7"
|
|
461
461
|
dependencies = [
|
|
462
462
|
"bstr",
|
|
463
463
|
"gix-error",
|
|
@@ -470,9 +470,9 @@ dependencies = [
|
|
|
470
470
|
|
|
471
471
|
[[package]]
|
|
472
472
|
name = "gix-glob"
|
|
473
|
-
version = "0.29.
|
|
473
|
+
version = "0.29.1"
|
|
474
474
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
475
|
-
checksum = "
|
|
475
|
+
checksum = "7a12789fa68a150293ad8834d267b31044240532b5ccf2734d228fe985cba2be"
|
|
476
476
|
dependencies = [
|
|
477
477
|
"bitflags 2.13.2",
|
|
478
478
|
"bstr",
|
|
@@ -484,9 +484,9 @@ dependencies = [
|
|
|
484
484
|
|
|
485
485
|
[[package]]
|
|
486
486
|
name = "gix-hash"
|
|
487
|
-
version = "0.28.
|
|
487
|
+
version = "0.28.1"
|
|
488
488
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
489
|
-
checksum = "
|
|
489
|
+
checksum = "b4802ffb87e051795822bfdaa8ab9075b23e316684f7054e6ce4a246b2b76f4e"
|
|
490
490
|
dependencies = [
|
|
491
491
|
"faster-hex",
|
|
492
492
|
"gix-error",
|
|
@@ -520,9 +520,9 @@ dependencies = [
|
|
|
520
520
|
|
|
521
521
|
[[package]]
|
|
522
522
|
name = "gix-index"
|
|
523
|
-
version = "0.
|
|
523
|
+
version = "0.58.0"
|
|
524
524
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
525
|
-
checksum = "
|
|
525
|
+
checksum = "06bfc736774a623307eda890c918d308ef5acd37402bde2d6768fccb1f6ecb5d"
|
|
526
526
|
dependencies = [
|
|
527
527
|
"bitflags 2.13.2",
|
|
528
528
|
"bstr",
|
|
@@ -549,9 +549,9 @@ dependencies = [
|
|
|
549
549
|
|
|
550
550
|
[[package]]
|
|
551
551
|
name = "gix-lock"
|
|
552
|
-
version = "26.0.
|
|
552
|
+
version = "26.0.1"
|
|
553
553
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
554
|
-
checksum = "
|
|
554
|
+
checksum = "64783de116c477c5ea4a7f3b56e18ab363dabfdae2724291ea0587b642cadb3d"
|
|
555
555
|
dependencies = [
|
|
556
556
|
"gix-error",
|
|
557
557
|
"gix-fs",
|
|
@@ -572,9 +572,9 @@ dependencies = [
|
|
|
572
572
|
|
|
573
573
|
[[package]]
|
|
574
574
|
name = "gix-note"
|
|
575
|
-
version = "0.3.
|
|
575
|
+
version = "0.3.1"
|
|
576
576
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
577
|
-
checksum = "
|
|
577
|
+
checksum = "8473688f2262f4364f521b39ce2a5dbe94494f327fc19c945318d7aff580952e"
|
|
578
578
|
dependencies = [
|
|
579
579
|
"gix-error",
|
|
580
580
|
"gix-hash",
|
|
@@ -583,9 +583,9 @@ dependencies = [
|
|
|
583
583
|
|
|
584
584
|
[[package]]
|
|
585
585
|
name = "gix-object"
|
|
586
|
-
version = "0.66.
|
|
586
|
+
version = "0.66.1"
|
|
587
587
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
588
|
-
checksum = "
|
|
588
|
+
checksum = "beaf9086dd00b9d2a177ca3ae83210ce926cee7c0faa112e053851221cd8f94d"
|
|
589
589
|
dependencies = [
|
|
590
590
|
"bstr",
|
|
591
591
|
"gix-actor",
|
|
@@ -601,9 +601,9 @@ dependencies = [
|
|
|
601
601
|
|
|
602
602
|
[[package]]
|
|
603
603
|
name = "gix-odb"
|
|
604
|
-
version = "0.
|
|
604
|
+
version = "0.87.0"
|
|
605
605
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
606
|
-
checksum = "
|
|
606
|
+
checksum = "941b5b99fed282a5b05b54ea486c36c76b558afe151e6804c3acdd5c8f3c3459"
|
|
607
607
|
dependencies = [
|
|
608
608
|
"arc-swap",
|
|
609
609
|
"crc32fast",
|
|
@@ -626,9 +626,9 @@ dependencies = [
|
|
|
626
626
|
|
|
627
627
|
[[package]]
|
|
628
628
|
name = "gix-pack"
|
|
629
|
-
version = "0.
|
|
629
|
+
version = "0.77.0"
|
|
630
630
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
631
|
-
checksum = "
|
|
631
|
+
checksum = "e2ef461798b1e6cb652192c69dfc9658dfc1bab457ef812dd1ab85d75104cbef"
|
|
632
632
|
dependencies = [
|
|
633
633
|
"clru",
|
|
634
634
|
"crc32fast",
|
|
@@ -648,9 +648,9 @@ dependencies = [
|
|
|
648
648
|
|
|
649
649
|
[[package]]
|
|
650
650
|
name = "gix-packetline"
|
|
651
|
-
version = "0.24.
|
|
651
|
+
version = "0.24.1"
|
|
652
652
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
653
|
-
checksum = "
|
|
653
|
+
checksum = "8ebb59ef7aff9d435946a5e5c3d9cfb673be7665839fd72961c08c733a934fb7"
|
|
654
654
|
dependencies = [
|
|
655
655
|
"bstr",
|
|
656
656
|
"faster-hex",
|
|
@@ -672,9 +672,9 @@ dependencies = [
|
|
|
672
672
|
|
|
673
673
|
[[package]]
|
|
674
674
|
name = "gix-path"
|
|
675
|
-
version = "0.14.
|
|
675
|
+
version = "0.14.1"
|
|
676
676
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
677
|
-
checksum = "
|
|
677
|
+
checksum = "83976e926a485e6fb4b8d9a0d7a30c53c1f607b81b5d310f06f92fd8385bf16a"
|
|
678
678
|
dependencies = [
|
|
679
679
|
"bstr",
|
|
680
680
|
"gix-error",
|
|
@@ -684,9 +684,9 @@ dependencies = [
|
|
|
684
684
|
|
|
685
685
|
[[package]]
|
|
686
686
|
name = "gix-protocol"
|
|
687
|
-
version = "0.
|
|
687
|
+
version = "0.68.0"
|
|
688
688
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
689
|
-
checksum = "
|
|
689
|
+
checksum = "83677ebae6a1a09dc07f2435b5ebe68470dc51afb74052135e98fd7c11f85ba9"
|
|
690
690
|
dependencies = [
|
|
691
691
|
"bstr",
|
|
692
692
|
"gix-date",
|
|
@@ -702,9 +702,9 @@ dependencies = [
|
|
|
702
702
|
|
|
703
703
|
[[package]]
|
|
704
704
|
name = "gix-quote"
|
|
705
|
-
version = "0.10.
|
|
705
|
+
version = "0.10.1"
|
|
706
706
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
707
|
-
checksum = "
|
|
707
|
+
checksum = "2413e65271303e9b674ec4785d469df4c3c36e888dbd165e3035de0405c6d9d1"
|
|
708
708
|
dependencies = [
|
|
709
709
|
"bstr",
|
|
710
710
|
"gix-error",
|
|
@@ -713,9 +713,9 @@ dependencies = [
|
|
|
713
713
|
|
|
714
714
|
[[package]]
|
|
715
715
|
name = "gix-ref"
|
|
716
|
-
version = "0.69.
|
|
716
|
+
version = "0.69.1"
|
|
717
717
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
718
|
-
checksum = "
|
|
718
|
+
checksum = "68686e4697b9cd15d1b152ef51df870513210ed22938eacc13b3672b76035f13"
|
|
719
719
|
dependencies = [
|
|
720
720
|
"gix-actor",
|
|
721
721
|
"gix-error",
|
|
@@ -733,9 +733,9 @@ dependencies = [
|
|
|
733
733
|
|
|
734
734
|
[[package]]
|
|
735
735
|
name = "gix-refspec"
|
|
736
|
-
version = "0.47.
|
|
736
|
+
version = "0.47.1"
|
|
737
737
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
738
|
-
checksum = "
|
|
738
|
+
checksum = "2569309da6fdc230973cf5b846508154c0e813fda60f2b2da768cc5655ed312c"
|
|
739
739
|
dependencies = [
|
|
740
740
|
"bstr",
|
|
741
741
|
"gix-error",
|
|
@@ -746,9 +746,9 @@ dependencies = [
|
|
|
746
746
|
|
|
747
747
|
[[package]]
|
|
748
748
|
name = "gix-revision"
|
|
749
|
-
version = "0.
|
|
749
|
+
version = "0.52.0"
|
|
750
750
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
751
|
-
checksum = "
|
|
751
|
+
checksum = "241465fc73530f41d0a1c18320c5e291365b7c2c2a3dfd07afe2a5d6265085c8"
|
|
752
752
|
dependencies = [
|
|
753
753
|
"bstr",
|
|
754
754
|
"gix-commitgraph",
|
|
@@ -762,9 +762,9 @@ dependencies = [
|
|
|
762
762
|
|
|
763
763
|
[[package]]
|
|
764
764
|
name = "gix-revwalk"
|
|
765
|
-
version = "0.
|
|
765
|
+
version = "0.38.0"
|
|
766
766
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
767
|
-
checksum = "
|
|
767
|
+
checksum = "8b46edeacd25d9d3131941ae6bc91002bf7ba10e130393b7e9bc23d528625447"
|
|
768
768
|
dependencies = [
|
|
769
769
|
"gix-commitgraph",
|
|
770
770
|
"gix-date",
|
|
@@ -789,9 +789,9 @@ dependencies = [
|
|
|
789
789
|
|
|
790
790
|
[[package]]
|
|
791
791
|
name = "gix-shallow"
|
|
792
|
-
version = "0.15.
|
|
792
|
+
version = "0.15.1"
|
|
793
793
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
794
|
-
checksum = "
|
|
794
|
+
checksum = "1d805949578724b5164c90ec6d19567832ccaa5ba8a3fe26f7befc52007e2407"
|
|
795
795
|
dependencies = [
|
|
796
796
|
"bstr",
|
|
797
797
|
"gix-error",
|
|
@@ -802,9 +802,9 @@ dependencies = [
|
|
|
802
802
|
|
|
803
803
|
[[package]]
|
|
804
804
|
name = "gix-tempfile"
|
|
805
|
-
version = "26.0.
|
|
805
|
+
version = "26.0.1"
|
|
806
806
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
807
|
-
checksum = "
|
|
807
|
+
checksum = "b8fdb135a043d6106b59bc58d59a326b277e495ec26fb9e02a1e2b6354bf4b5a"
|
|
808
808
|
dependencies = [
|
|
809
809
|
"gix-fs",
|
|
810
810
|
"libc",
|
|
@@ -815,15 +815,15 @@ dependencies = [
|
|
|
815
815
|
|
|
816
816
|
[[package]]
|
|
817
817
|
name = "gix-trace"
|
|
818
|
-
version = "0.3.
|
|
818
|
+
version = "0.3.1"
|
|
819
819
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
820
|
-
checksum = "
|
|
820
|
+
checksum = "c477c029518d3f235c26db21ff7cccc1fa13c0c31b05c005a55b7affd4ffbd81"
|
|
821
821
|
|
|
822
822
|
[[package]]
|
|
823
823
|
name = "gix-transport"
|
|
824
|
-
version = "0.
|
|
824
|
+
version = "0.62.0"
|
|
825
825
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
826
|
-
checksum = "
|
|
826
|
+
checksum = "cdcd9cdfd8745aa38f926a4a380c13d76b200d7338de57fc492982cd5a6652ba"
|
|
827
827
|
dependencies = [
|
|
828
828
|
"bstr",
|
|
829
829
|
"gix-command",
|
|
@@ -839,9 +839,9 @@ dependencies = [
|
|
|
839
839
|
|
|
840
840
|
[[package]]
|
|
841
841
|
name = "gix-traverse"
|
|
842
|
-
version = "0.
|
|
842
|
+
version = "0.64.0"
|
|
843
843
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
844
|
-
checksum = "
|
|
844
|
+
checksum = "00171e00e91508300d0361072c4eb110ec0f1322d8b95ed36887231702a38ebc"
|
|
845
845
|
dependencies = [
|
|
846
846
|
"bitflags 2.13.2",
|
|
847
847
|
"gix-commitgraph",
|
|
@@ -856,9 +856,9 @@ dependencies = [
|
|
|
856
856
|
|
|
857
857
|
[[package]]
|
|
858
858
|
name = "gix-url"
|
|
859
|
-
version = "0.40.
|
|
859
|
+
version = "0.40.1"
|
|
860
860
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
861
|
-
checksum = "
|
|
861
|
+
checksum = "def12e1016b872f1094442882f627905c59bd73480435291a4958cf373a8f28d"
|
|
862
862
|
dependencies = [
|
|
863
863
|
"bstr",
|
|
864
864
|
"gix-error",
|
|
@@ -884,9 +884,9 @@ dependencies = [
|
|
|
884
884
|
|
|
885
885
|
[[package]]
|
|
886
886
|
name = "gix-validate"
|
|
887
|
-
version = "0.13.
|
|
887
|
+
version = "0.13.1"
|
|
888
888
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
889
|
-
checksum = "
|
|
889
|
+
checksum = "02b617c17754bf37ee7a9b48e33ffb806abecbbed779ba415199ac1480acf699"
|
|
890
890
|
dependencies = [
|
|
891
891
|
"bstr",
|
|
892
892
|
"gix-error",
|
|
@@ -894,9 +894,9 @@ dependencies = [
|
|
|
894
894
|
|
|
895
895
|
[[package]]
|
|
896
896
|
name = "gix-worktree"
|
|
897
|
-
version = "0.
|
|
897
|
+
version = "0.59.0"
|
|
898
898
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
899
|
-
checksum = "
|
|
899
|
+
checksum = "fe92aec0a25cf073394492a6ee2aa4d27632acde91a653d34de0e4da6afb485d"
|
|
900
900
|
dependencies = [
|
|
901
901
|
"bstr",
|
|
902
902
|
"gix-error",
|
|
@@ -911,9 +911,9 @@ dependencies = [
|
|
|
911
911
|
|
|
912
912
|
[[package]]
|
|
913
913
|
name = "gix-worktree-stream"
|
|
914
|
-
version = "0.
|
|
914
|
+
version = "0.39.0"
|
|
915
915
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
916
|
-
checksum = "
|
|
916
|
+
checksum = "3fe5d65793848ffb596f6c5596fd120b132038736525628227e2388ca454f64d"
|
|
917
917
|
dependencies = [
|
|
918
918
|
"gix-attributes",
|
|
919
919
|
"gix-error",
|
|
@@ -931,9 +931,9 @@ dependencies = [
|
|
|
931
931
|
|
|
932
932
|
[[package]]
|
|
933
933
|
name = "gix-zlib"
|
|
934
|
-
version = "0.
|
|
934
|
+
version = "0.4.0"
|
|
935
935
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
936
|
-
checksum = "
|
|
936
|
+
checksum = "7c5b29808570149d86f417184605111ede9dda5aa06015e9ea6da07f0c3ca41e"
|
|
937
937
|
dependencies = [
|
|
938
938
|
"gix-error",
|
|
939
939
|
"zlib-rs",
|
|
@@ -1081,9 +1081,9 @@ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
|
|
|
1081
1081
|
|
|
1082
1082
|
[[package]]
|
|
1083
1083
|
name = "memmap2"
|
|
1084
|
-
version = "0.9.
|
|
1084
|
+
version = "0.9.12"
|
|
1085
1085
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1086
|
-
checksum = "
|
|
1086
|
+
checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157"
|
|
1087
1087
|
dependencies = [
|
|
1088
1088
|
"libc",
|
|
1089
1089
|
]
|
|
@@ -1411,7 +1411,7 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
|
|
|
1411
1411
|
|
|
1412
1412
|
[[package]]
|
|
1413
1413
|
name = "treex-native"
|
|
1414
|
-
version = "0.2.
|
|
1414
|
+
version = "0.2.2"
|
|
1415
1415
|
dependencies = [
|
|
1416
1416
|
"gix",
|
|
1417
1417
|
"pyo3",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "treex-native"
|
|
3
|
-
version = "0.2.
|
|
3
|
+
version = "0.2.2"
|
|
4
4
|
edition = "2024"
|
|
5
5
|
|
|
6
6
|
[lib]
|
|
@@ -10,4 +10,4 @@ crate-type = ["cdylib"]
|
|
|
10
10
|
|
|
11
11
|
[dependencies]
|
|
12
12
|
pyo3 = { version = "0.30", features = ["extension-module", "abi3-py313"] }
|
|
13
|
-
gix = { version = "0.
|
|
13
|
+
gix = { version = "0.90", default-features = false, features = ["excludes", "index", "sha1"] }
|
|
@@ -4,14 +4,14 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "treex-cli"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description="Command-line directory tree utility with metadata and Git ignore support"
|
|
9
|
+
requires-python = ">= 3.13"
|
|
9
10
|
license = "MIT"
|
|
10
11
|
license-files = ["LICENSE"]
|
|
11
12
|
authors = [{name = "Corey Goldberg"}]
|
|
12
13
|
maintainers = [{name = "Corey Goldberg"}]
|
|
13
14
|
readme = "README.md"
|
|
14
|
-
requires-python = ">= 3.13"
|
|
15
15
|
keywords = [
|
|
16
16
|
"tree", "cli", "directories", "files",
|
|
17
17
|
"git", "gitignore", "gitoxide", "metadata",
|
|
@@ -37,16 +37,16 @@ repository = "https://github.com/cgoldberg/treex"
|
|
|
37
37
|
|
|
38
38
|
[dependency-groups]
|
|
39
39
|
build = [
|
|
40
|
-
"cibuildwheel==4.3.
|
|
40
|
+
"cibuildwheel==4.3.4",
|
|
41
41
|
]
|
|
42
42
|
lint = [
|
|
43
|
-
"ruff==0.17.
|
|
43
|
+
"ruff==0.17.2",
|
|
44
44
|
]
|
|
45
45
|
test = [
|
|
46
46
|
"pytest==9.1.1",
|
|
47
47
|
]
|
|
48
48
|
validate = [
|
|
49
|
-
"validate-pyproject[all]==0.
|
|
49
|
+
"validate-pyproject[all]==0.27",
|
|
50
50
|
]
|
|
51
51
|
|
|
52
52
|
[tool.setuptools]
|
|
@@ -85,9 +85,9 @@ target-version = "py313"
|
|
|
85
85
|
[tool.ruff.lint]
|
|
86
86
|
select = ["ALL"]
|
|
87
87
|
ignore = [
|
|
88
|
-
"ANN", "C901", "COM812", "D", "
|
|
89
|
-
"
|
|
90
|
-
"T201",
|
|
88
|
+
"ANN", "C901", "COM812", "D", "DTZ",
|
|
89
|
+
"EM101", "FBT", "PLR", "S603",
|
|
90
|
+
"S607", "T201", "TRY003"
|
|
91
91
|
]
|
|
92
92
|
fixable = ["ALL"]
|
|
93
93
|
|
|
@@ -563,28 +563,24 @@ class TestScanTree:
|
|
|
563
563
|
assert nodes == []
|
|
564
564
|
|
|
565
565
|
|
|
566
|
-
class
|
|
567
|
-
def
|
|
568
|
-
(tmp_path / "
|
|
569
|
-
(tmp_path / "
|
|
566
|
+
class TestPrintTreeStatistics:
|
|
567
|
+
def test_counts_files_and_directories(self, tmp_path):
|
|
568
|
+
(tmp_path / "dir").mkdir()
|
|
569
|
+
(tmp_path / "file.txt").write_bytes(b"hello")
|
|
570
|
+
stats = treex.print_tree(tmp_path, show_tree=False)
|
|
571
|
+
assert stats["directories"] == 1
|
|
572
|
+
assert stats["files"] == 1
|
|
573
|
+
assert stats["total_size"] == 5
|
|
574
|
+
|
|
575
|
+
def test_filtered_statistics_without_tree(self, tmp_path, capsys):
|
|
576
|
+
(tmp_path / "main.py").write_bytes(b"12345")
|
|
570
577
|
(tmp_path / "notes.txt").write_bytes(b"1234567")
|
|
571
578
|
stats = treex.print_tree(tmp_path, show_tree=False, include_pattern="*.py")
|
|
572
|
-
assert
|
|
573
|
-
assert stats["total_size"] == 8
|
|
574
|
-
|
|
575
|
-
def test_directory_size_reflects_filtered_files(self, tmp_path, capsys):
|
|
576
|
-
directory = tmp_path / "src"
|
|
577
|
-
directory.mkdir()
|
|
578
|
-
(directory / "main.py").write_bytes(b"12345")
|
|
579
|
-
(directory / "notes.txt").write_bytes(b"1234567890")
|
|
580
|
-
stats = treex.print_tree(tmp_path, include_pattern="*.py")
|
|
581
|
-
output = capsys.readouterr().out
|
|
582
|
-
src_line = next(line for line in output.splitlines() if "src" in line)
|
|
583
|
-
assert "5 B" in src_line
|
|
579
|
+
assert capsys.readouterr().out == ""
|
|
584
580
|
assert stats["files"] == 1
|
|
585
581
|
assert stats["total_size"] == 5
|
|
586
582
|
|
|
587
|
-
def
|
|
583
|
+
def test_filtered_statistics_without_files(self, tmp_path, capsys):
|
|
588
584
|
directory = tmp_path / "src"
|
|
589
585
|
directory.mkdir()
|
|
590
586
|
(directory / "main.py").write_bytes(b"12345")
|
|
@@ -598,204 +594,174 @@ class TestFilteredTreeStatistics:
|
|
|
598
594
|
assert stats["files"] == 1
|
|
599
595
|
assert stats["total_size"] == 5
|
|
600
596
|
|
|
601
|
-
def
|
|
597
|
+
def test_total_size_is_none_without_metadata(self, tmp_path):
|
|
602
598
|
(tmp_path / "main.py").write_bytes(b"12345")
|
|
603
599
|
(tmp_path / "notes.txt").write_bytes(b"1234567890")
|
|
604
600
|
stats = treex.print_tree(tmp_path, show_metadata=False, include_pattern="*.py")
|
|
605
|
-
output = capsys.readouterr().out
|
|
606
|
-
assert "main.py" in output
|
|
607
|
-
assert "notes.txt" not in output
|
|
608
|
-
assert "5 B" not in output
|
|
609
601
|
assert stats["files"] == 1
|
|
610
602
|
assert stats["total_size"] is None
|
|
611
603
|
|
|
612
|
-
def
|
|
613
|
-
(tmp_path / "
|
|
614
|
-
(tmp_path / "
|
|
604
|
+
def test_counts_only_matching_files(self, tmp_path):
|
|
605
|
+
(tmp_path / "one.py").write_bytes(b"123")
|
|
606
|
+
(tmp_path / "two.py").write_bytes(b"12345")
|
|
607
|
+
(tmp_path / "notes.txt").write_bytes(b"1234567")
|
|
615
608
|
stats = treex.print_tree(tmp_path, show_tree=False, include_pattern="*.py")
|
|
616
|
-
|
|
617
|
-
assert
|
|
609
|
+
assert stats["files"] == 2
|
|
610
|
+
assert stats["total_size"] == 8
|
|
611
|
+
|
|
612
|
+
def test_counts_nested_directories(self, tmp_path):
|
|
613
|
+
nested = tmp_path / "one" / "two"
|
|
614
|
+
nested.mkdir(parents=True)
|
|
615
|
+
(nested / "file.txt").write_bytes(b"hello")
|
|
616
|
+
stats = treex.print_tree(tmp_path, show_tree=False)
|
|
617
|
+
assert stats["directories"] == 2
|
|
618
|
+
assert stats["files"] == 1
|
|
619
|
+
assert stats["total_size"] == 5
|
|
620
|
+
|
|
621
|
+
def test_counts_files_hidden_from_output(self, tmp_path):
|
|
622
|
+
nested = tmp_path / "one" / "two"
|
|
623
|
+
nested.mkdir(parents=True)
|
|
624
|
+
(nested / "file.txt").write_bytes(b"hello")
|
|
625
|
+
stats = treex.print_tree(tmp_path, show_tree=False, show_files=False)
|
|
626
|
+
assert stats["directories"] == 2
|
|
627
|
+
assert stats["files"] == 1
|
|
628
|
+
assert stats["total_size"] == 5
|
|
629
|
+
|
|
630
|
+
def test_counts_files_matching_relative_path(self, tmp_path):
|
|
631
|
+
src = tmp_path / "src"
|
|
632
|
+
tests = tmp_path / "tests"
|
|
633
|
+
src.mkdir()
|
|
634
|
+
tests.mkdir()
|
|
635
|
+
(src / "app.py").write_bytes(b"hello")
|
|
636
|
+
(tests / "app.py").write_bytes(b"world")
|
|
637
|
+
stats = treex.print_tree(
|
|
638
|
+
tmp_path,
|
|
639
|
+
show_tree=False,
|
|
640
|
+
include_pattern="src/*.py",
|
|
641
|
+
)
|
|
618
642
|
assert stats["files"] == 1
|
|
619
643
|
assert stats["total_size"] == 5
|
|
620
644
|
|
|
645
|
+
def test_unmatched_regex_returns_zero_statistics(self, tmp_path):
|
|
646
|
+
(tmp_path / "app.py").write_bytes(b"hello")
|
|
647
|
+
stats = treex.print_tree(
|
|
648
|
+
tmp_path,
|
|
649
|
+
show_tree=False,
|
|
650
|
+
include_regex=re.compile(r"\.PY$"),
|
|
651
|
+
)
|
|
652
|
+
assert stats["files"] == 0
|
|
653
|
+
assert stats["total_size"] == 0
|
|
654
|
+
|
|
655
|
+
def test_combined_filters_respect_max_depth(self, tmp_path):
|
|
656
|
+
(tmp_path / "main.py").write_bytes(b"123")
|
|
657
|
+
(tmp_path / "test_main.py").write_bytes(b"12345")
|
|
658
|
+
nested = tmp_path / "src"
|
|
659
|
+
nested.mkdir()
|
|
660
|
+
(nested / "helper.py").write_bytes(b"1234567")
|
|
661
|
+
deeper = nested / "deeper"
|
|
662
|
+
deeper.mkdir()
|
|
663
|
+
(deeper / "deep.py").write_bytes(b"123456789")
|
|
664
|
+
stats = treex.print_tree(
|
|
665
|
+
tmp_path,
|
|
666
|
+
show_tree=False,
|
|
667
|
+
include_pattern="*.py",
|
|
668
|
+
exclude_pattern="test_*.py",
|
|
669
|
+
max_depth=2,
|
|
670
|
+
)
|
|
671
|
+
assert stats["files"] == 2
|
|
672
|
+
assert stats["total_size"] == 10
|
|
673
|
+
|
|
621
674
|
|
|
622
675
|
class TestPrintTree:
|
|
623
|
-
def
|
|
676
|
+
def test_prints_files_and_directories(self, tmp_path, capsys):
|
|
624
677
|
(tmp_path / "dir").mkdir()
|
|
625
678
|
(tmp_path / "file.txt").write_bytes(b"hello")
|
|
626
|
-
|
|
679
|
+
treex.print_tree(tmp_path)
|
|
627
680
|
output = capsys.readouterr().out
|
|
628
681
|
assert "dir" in output
|
|
629
682
|
assert "file.txt" in output
|
|
630
|
-
assert stats["directories"] == 1
|
|
631
|
-
assert stats["files"] == 1
|
|
632
|
-
assert stats["total_size"] == 5
|
|
633
683
|
|
|
634
|
-
def
|
|
684
|
+
def test_suppresses_tree_when_disabled(self, tmp_path, capsys):
|
|
635
685
|
(tmp_path / "file.txt").write_bytes(b"hello")
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
assert output == ""
|
|
639
|
-
assert stats["files"] == 1
|
|
640
|
-
assert stats["total_size"] == 5
|
|
686
|
+
treex.print_tree(tmp_path, show_tree=False)
|
|
687
|
+
assert capsys.readouterr().out == ""
|
|
641
688
|
|
|
642
|
-
def
|
|
689
|
+
def test_suppresses_metadata_when_disabled(self, tmp_path, capsys):
|
|
643
690
|
(tmp_path / "file.txt").write_bytes(b"hello")
|
|
644
|
-
|
|
691
|
+
treex.print_tree(tmp_path, show_metadata=False)
|
|
645
692
|
output = capsys.readouterr().out
|
|
646
693
|
assert output.strip().endswith("file.txt")
|
|
647
694
|
assert "5 B" not in output
|
|
648
|
-
assert stats["files"] == 1
|
|
649
|
-
assert stats["total_size"] is None
|
|
650
|
-
|
|
651
|
-
def test_suppress_files(self, tmp_path, capsys):
|
|
652
|
-
(tmp_path / "dir").mkdir()
|
|
653
|
-
(tmp_path / "file.txt").write_bytes(b"hello")
|
|
654
|
-
stats = treex.print_tree(tmp_path, show_files=False)
|
|
655
|
-
output = capsys.readouterr().out
|
|
656
|
-
assert "└── dir" in output
|
|
657
|
-
assert "file.txt" not in output
|
|
658
|
-
assert "0 B" in output
|
|
659
|
-
assert stats["directories"] == 1
|
|
660
|
-
assert stats["files"] == 1
|
|
661
|
-
assert stats["total_size"] == 5
|
|
662
695
|
|
|
663
|
-
def
|
|
696
|
+
def test_hides_files_but_keeps_directories(self, tmp_path, capsys):
|
|
664
697
|
nested = tmp_path / "one" / "two"
|
|
665
698
|
nested.mkdir(parents=True)
|
|
666
699
|
(nested / "file.txt").write_bytes(b"hello")
|
|
667
|
-
|
|
700
|
+
treex.print_tree(tmp_path, show_files=False)
|
|
668
701
|
output = capsys.readouterr().out
|
|
669
702
|
assert "└── one" in output
|
|
670
703
|
assert " └── two" in output
|
|
671
704
|
assert "file.txt" not in output
|
|
672
|
-
assert "5 B" in output
|
|
673
|
-
assert stats["directories"] == 2
|
|
674
|
-
assert stats["files"] == 1
|
|
675
|
-
assert stats["total_size"] == 5
|
|
676
705
|
|
|
677
|
-
def
|
|
706
|
+
def test_hides_files_and_metadata(self, tmp_path, capsys):
|
|
678
707
|
nested = tmp_path / "one" / "two"
|
|
679
708
|
nested.mkdir(parents=True)
|
|
680
709
|
(nested / "file.txt").write_bytes(b"hello")
|
|
681
|
-
|
|
710
|
+
treex.print_tree(tmp_path, show_metadata=False, show_files=False)
|
|
682
711
|
output = capsys.readouterr().out
|
|
683
712
|
assert "└── one" in output
|
|
684
713
|
assert " └── two" in output
|
|
685
714
|
assert "file.txt" not in output
|
|
686
715
|
assert "5 B" not in output
|
|
687
|
-
assert stats["directories"] == 2
|
|
688
|
-
assert stats["files"] == 1
|
|
689
|
-
assert stats["total_size"] is None
|
|
690
716
|
|
|
691
|
-
def
|
|
692
|
-
nested = tmp_path / "one" / "two"
|
|
693
|
-
nested.mkdir(parents=True)
|
|
694
|
-
(nested / "file.txt").write_bytes(b"hello")
|
|
695
|
-
stats = treex.print_tree(tmp_path)
|
|
696
|
-
output = capsys.readouterr().out
|
|
697
|
-
assert "one" in output
|
|
698
|
-
assert "two" in output
|
|
699
|
-
assert "file.txt" in output
|
|
700
|
-
assert "5 B" in output
|
|
701
|
-
assert stats["directories"] == 2
|
|
702
|
-
assert stats["files"] == 1
|
|
703
|
-
|
|
704
|
-
def test_include_matches_relative_path(self, tmp_path, capsys):
|
|
717
|
+
def test_include_glob_matches_relative_path(self, tmp_path, capsys):
|
|
705
718
|
src = tmp_path / "src"
|
|
706
719
|
tests = tmp_path / "tests"
|
|
707
720
|
src.mkdir()
|
|
708
721
|
tests.mkdir()
|
|
709
722
|
(src / "app.py").write_bytes(b"hello")
|
|
710
723
|
(tests / "app.py").write_bytes(b"world")
|
|
711
|
-
|
|
724
|
+
treex.print_tree(tmp_path, include_pattern="src/*.py")
|
|
712
725
|
output = capsys.readouterr().out
|
|
713
726
|
assert "src" in output
|
|
714
|
-
assert "app.py" in output
|
|
715
727
|
assert "tests" not in output
|
|
716
|
-
assert stats["files"] == 1
|
|
717
|
-
assert stats["total_size"] == 5
|
|
718
|
-
|
|
719
|
-
def test_exclude_matches_relative_path(self, tmp_path, capsys):
|
|
720
|
-
tests = tmp_path / "tests"
|
|
721
|
-
tests.mkdir()
|
|
722
|
-
(tmp_path / "app.py").write_bytes(b"hello")
|
|
723
|
-
(tests / "test_app.py").write_bytes(b"world")
|
|
724
|
-
stats = treex.print_tree(tmp_path, exclude_pattern="tests/*.py")
|
|
725
|
-
output = capsys.readouterr().out
|
|
726
|
-
assert "app.py" in output
|
|
727
|
-
assert "test_app.py" not in output
|
|
728
|
-
assert stats["files"] == 1
|
|
729
|
-
assert stats["total_size"] == 5
|
|
730
|
-
|
|
731
|
-
def test_include_matches_nested_relative_paths(self, tmp_path, capsys):
|
|
732
|
-
nested = tmp_path / "src" / "nested"
|
|
733
|
-
nested.mkdir(parents=True)
|
|
734
|
-
(tmp_path / "src" / "app.py").write_bytes(b"hello")
|
|
735
|
-
(nested / "helper.py").write_bytes(b"world")
|
|
736
|
-
(tmp_path / "other.py").write_bytes(b"!")
|
|
737
|
-
stats = treex.print_tree(tmp_path, include_pattern="src/*.py")
|
|
738
|
-
output = capsys.readouterr().out
|
|
739
728
|
assert "app.py" in output
|
|
740
|
-
assert "helper.py" in output
|
|
741
|
-
assert "other.py" not in output
|
|
742
|
-
assert stats["files"] == 2
|
|
743
|
-
assert stats["total_size"] == 10
|
|
744
729
|
|
|
745
|
-
def
|
|
730
|
+
def test_include_glob_matches_nested_files(self, tmp_path, capsys):
|
|
746
731
|
(tmp_path / "main.py").touch()
|
|
747
732
|
(tmp_path / "README.md").touch()
|
|
748
733
|
nested = tmp_path / "src"
|
|
749
734
|
nested.mkdir()
|
|
750
735
|
(nested / "helper.py").touch()
|
|
751
736
|
(nested / "config.json").touch()
|
|
752
|
-
|
|
737
|
+
treex.print_tree(tmp_path, include_pattern="*.py")
|
|
753
738
|
output = capsys.readouterr().out
|
|
754
739
|
assert "main.py" in output
|
|
755
740
|
assert "helper.py" in output
|
|
756
741
|
assert "README.md" not in output
|
|
757
742
|
assert "config.json" not in output
|
|
758
743
|
assert "src" in output
|
|
759
|
-
assert stats["files"] == 2
|
|
760
|
-
assert stats["directories"] == 1
|
|
761
744
|
|
|
762
|
-
def
|
|
745
|
+
def test_include_glob_is_case_sensitive(self, tmp_path, capsys):
|
|
763
746
|
(tmp_path / "lower.py").touch()
|
|
764
747
|
(tmp_path / "upper.PY").touch()
|
|
765
|
-
|
|
748
|
+
treex.print_tree(tmp_path, include_pattern="*.py")
|
|
766
749
|
output = capsys.readouterr().out
|
|
767
750
|
assert "lower.py" in output
|
|
768
751
|
assert "upper.PY" not in output
|
|
769
|
-
assert stats["files"] == 1
|
|
770
752
|
|
|
771
|
-
def
|
|
753
|
+
def test_exclude_glob_is_case_sensitive(self, tmp_path, capsys):
|
|
772
754
|
(tmp_path / "lower.py").touch()
|
|
773
755
|
(tmp_path / "upper.PY").touch()
|
|
774
|
-
|
|
756
|
+
treex.print_tree(tmp_path, exclude_pattern="*.py")
|
|
775
757
|
output = capsys.readouterr().out
|
|
776
758
|
assert "lower.py" not in output
|
|
777
759
|
assert "upper.PY" in output
|
|
778
|
-
assert stats["files"] == 1
|
|
779
|
-
|
|
780
|
-
def test_exclude_matches_filenames_recursively(self, tmp_path, capsys):
|
|
781
|
-
(tmp_path / "main.pyc").touch()
|
|
782
|
-
(tmp_path / "main.py").touch()
|
|
783
|
-
nested = tmp_path / "src"
|
|
784
|
-
nested.mkdir()
|
|
785
|
-
(nested / "helper.pyc").touch()
|
|
786
|
-
(nested / "helper.py").touch()
|
|
787
|
-
stats = treex.print_tree(tmp_path, exclude_pattern="*.pyc")
|
|
788
|
-
output = capsys.readouterr().out
|
|
789
|
-
assert "main.py" in output
|
|
790
|
-
assert "helper.py" in output
|
|
791
|
-
assert "main.pyc" not in output
|
|
792
|
-
assert "helper.pyc" not in output
|
|
793
|
-
assert stats["files"] == 2
|
|
794
760
|
|
|
795
|
-
def
|
|
761
|
+
def test_exclude_glob_overrides_include_glob(self, tmp_path, capsys):
|
|
796
762
|
(tmp_path / "app.py").write_bytes(b"hello")
|
|
797
763
|
(tmp_path / "test_app.py").write_bytes(b"world")
|
|
798
|
-
|
|
764
|
+
treex.print_tree(
|
|
799
765
|
tmp_path,
|
|
800
766
|
include_pattern="*.py",
|
|
801
767
|
exclude_pattern="test_*.py",
|
|
@@ -803,24 +769,20 @@ class TestPrintTree:
|
|
|
803
769
|
output = capsys.readouterr().out
|
|
804
770
|
assert "app.py" in output
|
|
805
771
|
assert "test_app.py" not in output
|
|
806
|
-
assert stats["files"] == 1
|
|
807
|
-
assert stats["total_size"] == 5
|
|
808
772
|
|
|
809
|
-
def
|
|
773
|
+
def test_hides_directories_without_matching_files(self, tmp_path, capsys):
|
|
810
774
|
matching = tmp_path / "matching"
|
|
811
775
|
matching.mkdir()
|
|
812
776
|
(matching / "main.py").touch()
|
|
813
777
|
nonmatching = tmp_path / "nonmatching"
|
|
814
778
|
nonmatching.mkdir()
|
|
815
779
|
(nonmatching / "notes.txt").touch()
|
|
816
|
-
|
|
780
|
+
treex.print_tree(tmp_path, include_pattern="*.py")
|
|
817
781
|
output = capsys.readouterr().out
|
|
818
782
|
assert "matching" in output
|
|
819
783
|
assert "main.py" in output
|
|
820
784
|
assert "nonmatching" not in output
|
|
821
785
|
assert "notes.txt" not in output
|
|
822
|
-
assert stats["directories"] == 1
|
|
823
|
-
assert stats["files"] == 1
|
|
824
786
|
|
|
825
787
|
def test_include_regex_matches_relative_path(self, tmp_path, capsys):
|
|
826
788
|
src = tmp_path / "src"
|
|
@@ -829,47 +791,39 @@ class TestPrintTree:
|
|
|
829
791
|
tests.mkdir()
|
|
830
792
|
(src / "app.py").write_bytes(b"hello")
|
|
831
793
|
(tests / "app.py").write_bytes(b"world")
|
|
832
|
-
|
|
794
|
+
treex.print_tree(tmp_path, include_regex=re.compile(r"^src/.*\.py$"))
|
|
833
795
|
output = capsys.readouterr().out
|
|
834
796
|
assert "src" in output
|
|
835
|
-
assert "app.py" in output
|
|
836
797
|
assert "tests" not in output
|
|
837
|
-
assert
|
|
838
|
-
assert stats["total_size"] == 5
|
|
798
|
+
assert "app.py" in output
|
|
839
799
|
|
|
840
800
|
def test_exclude_regex_matches_relative_path(self, tmp_path, capsys):
|
|
841
801
|
nested = tmp_path / "src" / "tests"
|
|
842
802
|
nested.mkdir(parents=True)
|
|
843
803
|
(tmp_path / "app.py").write_bytes(b"hello")
|
|
844
804
|
(nested / "test_app.py").write_bytes(b"world")
|
|
845
|
-
|
|
805
|
+
treex.print_tree(tmp_path, exclude_regex=re.compile(r"(^|/)tests/"))
|
|
846
806
|
output = capsys.readouterr().out
|
|
847
807
|
assert "app.py" in output
|
|
848
808
|
assert "test_app.py" not in output
|
|
849
|
-
assert stats["files"] == 1
|
|
850
|
-
assert stats["total_size"] == 5
|
|
851
809
|
|
|
852
810
|
def test_include_regex_is_case_sensitive(self, tmp_path, capsys):
|
|
853
811
|
(tmp_path / "app.py").write_bytes(b"hello")
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
assert "app.py" not in output
|
|
857
|
-
assert stats["files"] == 0
|
|
858
|
-
assert stats["total_size"] == 0
|
|
812
|
+
treex.print_tree(tmp_path, include_regex=re.compile(r"\.PY$"))
|
|
813
|
+
assert "app.py" not in capsys.readouterr().out
|
|
859
814
|
|
|
860
815
|
def test_exclude_regex_is_case_sensitive(self, tmp_path, capsys):
|
|
861
816
|
(tmp_path / "lower.py").write_bytes(b"hello")
|
|
862
817
|
(tmp_path / "upper.PY").write_bytes(b"world")
|
|
863
|
-
|
|
818
|
+
treex.print_tree(tmp_path, exclude_regex=re.compile(r"\.py$"))
|
|
864
819
|
output = capsys.readouterr().out
|
|
865
820
|
assert "lower.py" not in output
|
|
866
821
|
assert "upper.PY" in output
|
|
867
|
-
assert stats["files"] == 1
|
|
868
822
|
|
|
869
823
|
def test_exclude_regex_overrides_include_glob(self, tmp_path, capsys):
|
|
870
824
|
(tmp_path / "app.py").write_bytes(b"hello")
|
|
871
825
|
(tmp_path / "test_app.py").write_bytes(b"world")
|
|
872
|
-
|
|
826
|
+
treex.print_tree(
|
|
873
827
|
tmp_path,
|
|
874
828
|
include_pattern="*.py",
|
|
875
829
|
exclude_regex=re.compile(r"(^|/)test_"),
|
|
@@ -877,13 +831,11 @@ class TestPrintTree:
|
|
|
877
831
|
output = capsys.readouterr().out
|
|
878
832
|
assert "app.py" in output
|
|
879
833
|
assert "test_app.py" not in output
|
|
880
|
-
assert stats["files"] == 1
|
|
881
|
-
assert stats["total_size"] == 5
|
|
882
834
|
|
|
883
835
|
def test_exclude_glob_overrides_include_regex(self, tmp_path, capsys):
|
|
884
836
|
(tmp_path / "app.py").write_bytes(b"hello")
|
|
885
837
|
(tmp_path / "test_app.py").write_bytes(b"world")
|
|
886
|
-
|
|
838
|
+
treex.print_tree(
|
|
887
839
|
tmp_path,
|
|
888
840
|
include_regex=re.compile(r"\.py$"),
|
|
889
841
|
exclude_pattern="test_*.py",
|
|
@@ -891,16 +843,14 @@ class TestPrintTree:
|
|
|
891
843
|
output = capsys.readouterr().out
|
|
892
844
|
assert "app.py" in output
|
|
893
845
|
assert "test_app.py" not in output
|
|
894
|
-
assert stats["files"] == 1
|
|
895
|
-
assert stats["total_size"] == 5
|
|
896
846
|
|
|
897
|
-
def
|
|
847
|
+
def test_include_glob_and_regex_must_both_match(self, tmp_path, capsys):
|
|
898
848
|
src = tmp_path / "src"
|
|
899
849
|
src.mkdir()
|
|
900
850
|
(src / "app.py").write_bytes(b"hello")
|
|
901
851
|
(src / "app.txt").write_bytes(b"world")
|
|
902
852
|
(tmp_path / "other.py").write_bytes(b"!")
|
|
903
|
-
|
|
853
|
+
treex.print_tree(
|
|
904
854
|
tmp_path,
|
|
905
855
|
include_pattern="src/*",
|
|
906
856
|
include_regex=re.compile(r"\.py$"),
|
|
@@ -909,32 +859,6 @@ class TestPrintTree:
|
|
|
909
859
|
assert "app.py" in output
|
|
910
860
|
assert "app.txt" not in output
|
|
911
861
|
assert "other.py" not in output
|
|
912
|
-
assert stats["files"] == 1
|
|
913
|
-
assert stats["total_size"] == 5
|
|
914
|
-
|
|
915
|
-
def test_include_and_exclude_can_be_combined_with_depth(self, tmp_path, capsys):
|
|
916
|
-
(tmp_path / "main.py").write_bytes(b"123")
|
|
917
|
-
(tmp_path / "test_main.py").write_bytes(b"12345")
|
|
918
|
-
nested = tmp_path / "src"
|
|
919
|
-
nested.mkdir()
|
|
920
|
-
(nested / "helper.py").write_bytes(b"1234567")
|
|
921
|
-
deeper = nested / "deeper"
|
|
922
|
-
deeper.mkdir()
|
|
923
|
-
(deeper / "deep.py").write_bytes(b"123456789")
|
|
924
|
-
stats = treex.print_tree(
|
|
925
|
-
tmp_path,
|
|
926
|
-
include_pattern="*.py",
|
|
927
|
-
exclude_pattern="test_*.py",
|
|
928
|
-
max_depth=2,
|
|
929
|
-
)
|
|
930
|
-
output = capsys.readouterr().out
|
|
931
|
-
assert "main.py" in output
|
|
932
|
-
assert "helper.py" in output
|
|
933
|
-
assert "test_main.py" not in output
|
|
934
|
-
assert "deeper" not in output
|
|
935
|
-
assert "deep.py" not in output
|
|
936
|
-
assert stats["files"] == 2
|
|
937
|
-
assert stats["total_size"] == 10
|
|
938
862
|
|
|
939
863
|
def test_directory_size_is_recursive(self, tmp_path, capsys):
|
|
940
864
|
directory = tmp_path / "dir"
|
|
@@ -949,13 +873,13 @@ class TestPrintTree:
|
|
|
949
873
|
assert "15 B" in directory_line
|
|
950
874
|
assert "10 B" in nested_line
|
|
951
875
|
|
|
952
|
-
def
|
|
876
|
+
def test_directory_size_with_hidden_files(self, tmp_path, capsys):
|
|
953
877
|
directory = tmp_path / "dir"
|
|
954
878
|
nested = directory / "nested"
|
|
955
879
|
nested.mkdir(parents=True)
|
|
956
880
|
(directory / "one.txt").write_bytes(b"12345")
|
|
957
881
|
(nested / "two.txt").write_bytes(b"1234567890")
|
|
958
|
-
|
|
882
|
+
treex.print_tree(tmp_path, show_files=False)
|
|
959
883
|
output = capsys.readouterr().out
|
|
960
884
|
directory_line = next(line for line in output.splitlines() if "dir" in line)
|
|
961
885
|
nested_line = next(line for line in output.splitlines() if "nested" in line)
|
|
@@ -963,8 +887,6 @@ class TestPrintTree:
|
|
|
963
887
|
assert "two.txt" not in output
|
|
964
888
|
assert "15 B" in directory_line
|
|
965
889
|
assert "10 B" in nested_line
|
|
966
|
-
assert stats["files"] == 2
|
|
967
|
-
assert stats["total_size"] == 15
|
|
968
890
|
|
|
969
891
|
def test_empty_directory_has_zero_size(self, tmp_path, capsys):
|
|
970
892
|
(tmp_path / "empty").mkdir()
|
|
@@ -973,7 +895,7 @@ class TestPrintTree:
|
|
|
973
895
|
empty_line = next(line for line in output.splitlines() if "empty" in line)
|
|
974
896
|
assert "0 B" in empty_line
|
|
975
897
|
|
|
976
|
-
def
|
|
898
|
+
def test_directory_size_excludes_gitignored_files(self, tmp_path, capsys):
|
|
977
899
|
init_git_repo(tmp_path)
|
|
978
900
|
directory = tmp_path / "data"
|
|
979
901
|
directory.mkdir()
|
|
@@ -988,26 +910,14 @@ class TestPrintTree:
|
|
|
988
910
|
assert "15 B" not in data_line
|
|
989
911
|
assert "ignored.txt" not in output
|
|
990
912
|
|
|
991
|
-
def
|
|
913
|
+
def test_reports_permission_denied(self, tmp_path, capsys):
|
|
992
914
|
directory = tmp_path / "restricted"
|
|
993
915
|
directory.mkdir()
|
|
994
916
|
with patch.object(Path, "iterdir", side_effect=PermissionError):
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
assert "[permission denied]" in output
|
|
998
|
-
assert stats["directories"] == 0
|
|
999
|
-
assert stats["files"] == 0
|
|
1000
|
-
|
|
1001
|
-
def test_tree_name_width_aligns_file_metadata(self, tmp_path, capsys):
|
|
1002
|
-
(tmp_path / "a.txt").write_bytes(b"hello")
|
|
1003
|
-
(tmp_path / "long_filename.txt").write_bytes(b"hello")
|
|
1004
|
-
treex.print_tree(tmp_path)
|
|
1005
|
-
lines = capsys.readouterr().out.splitlines()
|
|
1006
|
-
size_positions = [line.index("5 B") for line in lines if ".txt" in line]
|
|
1007
|
-
assert len(size_positions) == 2
|
|
1008
|
-
assert size_positions[0] == size_positions[1]
|
|
917
|
+
treex.print_tree(directory)
|
|
918
|
+
assert "[permission denied]" in capsys.readouterr().out
|
|
1009
919
|
|
|
1010
|
-
def
|
|
920
|
+
def test_aligns_directory_and_file_metadata(self, tmp_path, capsys):
|
|
1011
921
|
directory = tmp_path / "dir"
|
|
1012
922
|
directory.mkdir()
|
|
1013
923
|
(directory / "file.txt").write_bytes(b"hello")
|
|
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
|
|
File without changes
|
|
File without changes
|