From 6ec16dc6bb8bddafed17a511a8914410440d0138 Mon Sep 17 00:00:00 2001 From: Edvard Rejthar Date: Fri, 8 Mar 2024 18:45:46 +0100 Subject: [PATCH] publish --- .github/workflows/run-unittest.yml | 3 ++- deduplidog/__init__.py | 3 +++ pyproject.toml | 5 ++++- tests.py | 6 ++++-- 4 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 deduplidog/__init__.py diff --git a/.github/workflows/run-unittest.yml b/.github/workflows/run-unittest.yml index 46179fa..7a172c0 100644 --- a/.github/workflows/run-unittest.yml +++ b/.github/workflows/run-unittest.yml @@ -5,7 +5,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.10", 3.11, 3.12] + # python-version: [3.11, 3.12] TODO + python-version: [3.12] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/deduplidog/__init__.py b/deduplidog/__init__.py new file mode 100644 index 0000000..80f936a --- /dev/null +++ b/deduplidog/__init__.py @@ -0,0 +1,3 @@ +from .deduplidog import Deduplidog + +__all__ = ["Deduplidog"] diff --git a/pyproject.toml b/pyproject.toml index 4717927..b17ef87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,7 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry] +name = "deduplidog" version = "0.5.0" description = "Deduplicate folders" authors = ["Edvard Rejthar "] @@ -12,7 +13,9 @@ license = "GPL-3.0-or-later" python = ">=3.11" humanize = "*" imagehash = "*" +IPython = "*" +ipywidgets = "*" opencv-python = "*" -PIL = "*" +Pillow = "*" sh = "*" tqdm = "*" \ No newline at end of file diff --git a/tests.py b/tests.py index c695de7..d653f11 100644 --- a/tests.py +++ b/tests.py @@ -22,12 +22,14 @@ class FileRepresentation: text_seed: int = 1 def __post_init__(self): - self._mtime = self.path.parent.stat().st_mtime + self.mtime + self._mtime = self.path.parent.parent.stat().st_mtime + self.mtime def write(self): "Writes the representation to the disk." self.path.write_text(self.get_text()) - os.utime(self.path, (self._mtime,)*2) + # TODO asi tady vždycky napsat print (self._mtime) + # TODO co zkusit round? + os.utime(self.path, (round(self._mtime),)*2) return self def check(self, test: TestCase):