From 8d83721e3c9a1b78439749ad5ff4a1e31cd837e2 Mon Sep 17 00:00:00 2001 From: mxmlnkn Date: Sun, 6 Oct 2024 20:41:49 +0200 Subject: [PATCH] fixup! [feature] Add support for fsspec backends --- .github/workflows/appimage-develop.yml | 25 ++++++++++++-------- .github/workflows/appimage.yml | 32 ++++++++++++++++++-------- .github/workflows/tests.yml | 14 +++++------ AppImage/build-ratarmount-appimage.sh | 5 +++- 4 files changed, 48 insertions(+), 28 deletions(-) diff --git a/.github/workflows/appimage-develop.yml b/.github/workflows/appimage-develop.yml index f4650c4f..22fc01cd 100644 --- a/.github/workflows/appimage-develop.yml +++ b/.github/workflows/appimage-develop.yml @@ -43,16 +43,6 @@ jobs: parallelization: [0, 1, 2] steps: - - uses: actions/checkout@v4 - with: - # We need one tag for testing the git mount. - # This is BROKEN! God damn it. Is anything working at all... - # https://github.com/actions/checkout/issues/1781 - fetch-tags: true - - - name: Fetch tag for tests - run: git fetch origin refs/tags/v0.15.2:refs/tags/v0.15.2 - - uses: actions/download-artifact@v3 with: name: ratarmount-x86_64.AppImage @@ -74,6 +64,14 @@ jobs: ratarmount --version - uses: actions/checkout@v4 + with: + # We need one tag for testing the git mount. + # This is BROKEN! God damn it. Is anything working at all... + # https://github.com/actions/checkout/issues/1781 + fetch-tags: true + + - name: Fetch tag for tests + run: git fetch origin refs/tags/v0.15.2:refs/tags/v0.15.2 - name: Test Simple Mount run: | @@ -82,6 +80,13 @@ jobs: sleep 1s ratarmount -u mimi + - name: Install pip Test Dependencies + run: | + python3 -m pip install -r tests/requirements-tests.txt + # Explicitly install pygit2 even on Python 3.13+ because we have set up libgit2 manually. + python3 -m pip install pygit2 + python3 -c 'import pygit2' + - name: Regression Tests run: | # Starting up ratarmount for each very short test is quite slow, especially on the CI machine (3-5s). diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index b9d9fb44..77328a69 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -37,16 +37,6 @@ jobs: parallelization: [0, 1, 2] steps: - - uses: actions/checkout@v4 - with: - # We need one tag for testing the git mount. - # This is BROKEN! God damn it. Is anything working at all... - # https://github.com/actions/checkout/issues/1781 - fetch-tags: true - - - name: Fetch tag for tests - run: git fetch origin refs/tags/v0.15.2:refs/tags/v0.15.2 - - uses: actions/download-artifact@v3 with: name: ratarmount-x86_64.AppImage @@ -62,12 +52,27 @@ jobs: # These are required for creating test files on the fly not for ratarmount! sudo apt-get -y install bzip2 pixz zstd unar fuse + - name: Install pip Test Dependencies + run: | + python3 -m pip install -r tests/requirements-tests.txt + # Explicitly install pygit2 even on Python 3.13+ because we have set up libgit2 manually. + python3 -m pip install pygit2 + python3 -c 'import pygit2' + - name: Test Simple Startup run: | ratarmount --help ratarmount --version - uses: actions/checkout@v4 + with: + # We need one tag for testing the git mount. + # This is BROKEN! God damn it. Is anything working at all... + # https://github.com/actions/checkout/issues/1781 + fetch-tags: true + + - name: Fetch tag for tests + run: git fetch origin refs/tags/v0.15.2:refs/tags/v0.15.2 - name: Test Simple Mount run: | @@ -76,6 +81,13 @@ jobs: sleep 1s ratarmount -u mimi + - name: Install pip Test Dependencies + run: | + python3 -m pip install -r tests/requirements-tests.txt + # Explicitly install pygit2 even on Python 3.13+ because we have set up libgit2 manually. + python3 -m pip install pygit2 + python3 -c 'import pygit2' + - name: Regression Tests run: | # Starting up ratarmount for each very short test is quite slow, especially on the CI machine (3-5s). diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 904b9d3a..b646773d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -234,13 +234,6 @@ jobs: # Segfaults (139) are not allowed but other exit codes are valid! python3 ratarmount.py tests/simple.bz2 || [ $? != 139 ] - - name: Install pip Test Dependencies - run: | - python3 -m pip install -r tests/requirements-tests.txt - # Explicitly install pygit2 even on Python 3.13+ because we have set up libgit2 manually. - python3 -m pip install pygit2 - python3 -c 'import pygit2' - - name: Unit Tests run: | python3 -m pip install pytest pytest-xdist @@ -271,6 +264,13 @@ jobs: done python3 tests/tests.py + - name: Install pip Test Dependencies + run: | + python3 -m pip install -r tests/requirements-tests.txt + # Explicitly install pygit2 even on Python 3.13+ because we have set up libgit2 manually. + python3 -m pip install pygit2 + python3 -c 'import pygit2' + - name: Regression Tests (FUSE 3) if: ${{ !startsWith( matrix.os, 'macos' ) }} run: | diff --git a/AppImage/build-ratarmount-appimage.sh b/AppImage/build-ratarmount-appimage.sh index ec661582..08d2b2b9 100644 --- a/AppImage/build-ratarmount-appimage.sh +++ b/AppImage/build-ratarmount-appimage.sh @@ -86,6 +86,9 @@ function installAppImagePythonPackages() # And we need to apply a patch for that. "$APP_PYTHON_BIN" -I -m pip install --no-cache-dir pyfatfs patch -u "$( find "$APP_DIR" -type f -name FatIO.py )" pyfatfs-issue-41.patch + + # These are untested but small enough that we can just install them for now. Maybe they even work. + "$APP_PYTHON_BIN" -I -m pip install --no-cache-dir gcsfs adlfs dropboxdrivefs } function installAppImageSystemLibraries() @@ -185,7 +188,7 @@ function trimAppImage() "$APP_PYTHON_LIB/smtplib.py" \ "$APP_PYTHON_LIB/smtpd.py" \ "$APP_PYTHON_LIB/ensurepip" \ - "$APP_PYTHON_LIB/html" \ + #"$APP_PYTHON_LIB/html" \ # Needed by botocore "$APP_PYTHON_LIB/idlelib" \ "$APP_PYTHON_LIB/pickletools.py" \ "$APP_PYTHON_LIB/pydoc_data" \