From dffe663e0516347f5bd82891d06de44643b3a3f1 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Thu, 26 Sep 2024 12:04:13 +0200 Subject: [PATCH] remove units and quantities addapted --- evidence/__init__.py | 25 --------------------- evidence/unit_registry/base2.quantities.txt | 4 ---- evidence/unit_registry/quantities.txt | 9 -------- requirements.txt | 2 +- 4 files changed, 1 insertion(+), 39 deletions(-) delete mode 100644 evidence/unit_registry/base2.quantities.txt delete mode 100644 evidence/unit_registry/quantities.txt diff --git a/evidence/__init__.py b/evidence/__init__.py index b76b6a9..e69de29 100644 --- a/evidence/__init__.py +++ b/evidence/__init__.py @@ -1,25 +0,0 @@ -from pathlib import Path - -from pint import UnitRegistry - -# Sets up the unit handling -unit_registry = Path(__file__).parent / 'unit_registry' - -unit = UnitRegistry() -unit.load_definitions(str(unit_registry / 'quantities.txt')) -TB = unit.TB -GB = unit.GB -MB = unit.MB -Mbs = unit.Mbit / unit.s -MBs = unit.MB / unit.s -Hz = unit.Hz -GHz = unit.GHz -MHz = unit.MHz -Inch = unit.inch -mAh = unit.hour * unit.mA -mV = unit.mV - -base2 = UnitRegistry() -base2.load_definitions(str(unit_registry / 'base2.quantities.txt')) - -GiB = base2.GiB diff --git a/evidence/unit_registry/base2.quantities.txt b/evidence/unit_registry/base2.quantities.txt deleted file mode 100644 index 2c724a2..0000000 --- a/evidence/unit_registry/base2.quantities.txt +++ /dev/null @@ -1,4 +0,0 @@ -K = KiB = k = kb = KB -M = MiB = m = mb = MB -G = GiB = g = gb = GB -T = TiB = t = tb = TB diff --git a/evidence/unit_registry/quantities.txt b/evidence/unit_registry/quantities.txt deleted file mode 100644 index d658ab2..0000000 --- a/evidence/unit_registry/quantities.txt +++ /dev/null @@ -1,9 +0,0 @@ -HZ = hertz = hz -KHZ = kilohertz = khz -MHZ = megahertz = mhz -GHZ = gigahertz = ghz -B = byte = b = UNIT = unit -KB = kilobyte = kb = K = k -MB = megabyte = mb = M = m -GB = gigabyte = gb = G = g -T = terabyte = tb = T = t diff --git a/requirements.txt b/requirements.txt index 2d2537c..1576d4f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,4 @@ pandas==2.2.2 xlrd==2.0.1 odfpy==1.4.1 pytz==2024.2 -Pint==0.24.3 +