Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Jan 9, 2025
1 parent d27b591 commit a0d0cdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/run-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# python-version: [3.11, 3.12, 3.13] TODO
python-version: [3.12]
python-version: [3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -16,5 +15,4 @@ jobs:
- name: Install dependencies
run: pip install -e .
- name: Run tests
# run: python3 -m unittest discover tests TODO
run: python3 -m unittest tests.test_disk.TestSymlinked.test_basic
run: python3 -m unittest discover tests
6 changes: 0 additions & 6 deletions deduplidog/deduplidog.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ def _process_file(self, work_file: Path, bar: tqdm):
if name.startswith("✓"): # this file has been already processed
self.ignored_count += 1
return
print("457: 1", work_file) # TODO
stem = str(work_file.stem)
if self.match.space2char:
stem = stem.replace(" ", self.match.space2char)
Expand Down Expand Up @@ -496,9 +495,7 @@ def _process_file(self, work_file: Path, bar: tqdm):
# compare by date and size
candidates = [p for p in _candidates_fact if p.suffix.match.casefold() == work_file.suffix.match.casefold()] \
if self.match.casefold else [p for p in _candidates_fact if p.suffix == work_file.suffix]
print("\n501: candidates", candidates) # TODO
original = self._find_similar(work_file, candidates)
print("502: original", original) # TODO

# original of the work_file has been found
# one of them might be treated as a duplicate and thus affected
Expand Down Expand Up @@ -700,9 +697,6 @@ def _find_similar(self, work_file: Path, candidates: list[Path]):
""" compare by date and size """
for original in candidates:
ost, wst = original.stat(), work_file.stat()
print("703: ost,wst", ost, wst) # TODO
print("704: wst.st_mtime", wst.st_mtime) # TODO
print("704: ost.st_mtime", ost.st_mtime) # TODO
if (self.match.ignore_date
or wst.st_mtime == ost.st_mtime
or self.match.tolerate_hour and self.match.tolerate_hour[0] <= (wst.st_mtime - ost.st_mtime)/3600 <= self.match.tolerate_hour[1]
Expand Down

0 comments on commit a0d0cdd

Please sign in to comment.