From db2c28c4e1e204dd373be563daee6c337102745f Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Wed, 4 Sep 2024 14:27:09 -0400 Subject: [PATCH] changelog (#639) * changelog * use mincondax * tr exact version * more * boost time * debug * auto creds --- .github/workflows/ci.yml | 20 +++++++++----------- docs/source/changelog.rst | 5 +++++ environment_gcsfs.yaml | 3 +-- gcsfs/tests/conftest.py | 10 +++++++--- gcsfs/tests/test_core.py | 4 +++- requirements.txt | 2 +- 6 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b70adf0..957c7439 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: test: name: Python ${{ matrix.python-version }} runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -20,27 +20,25 @@ jobs: - name: Checkout source uses: actions/checkout@v4 - - name: Setup Conda Environment - uses: mamba-org/setup-micromamba@v1 + - name: Setup conda + uses: conda-incubator/setup-miniconda@v3 with: - cache-downloads: true environment-file: environment_gcsfs.yaml - environment-name: gcsfs_test - create-args: >- - python=${{ matrix.PY }} + python-version: ${{ matrix.PY }} + activate-environment: gcsfs_test - name: Conda info run: | conda list conda --version - - name: Install libfuse - run: (sudo apt-get install -y fuse || echo "Error installing fuse.") - + - name: install + run: | + pip install -e . - name: Run tests run: | export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/gcsfs/tests/fake-secret.json - pytest -vv \ + pytest -vv -s \ --log-format="%(asctime)s %(levelname)s %(message)s" \ --log-date-format="%H:%M:%S" \ gcsfs/ diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 1bf64c29..7418f6f0 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -4,6 +4,11 @@ Changelog Note: in some releases, there are no changes, because we always guarantee relasing in step with fsspec. +2024.9.0 +-------- + +* In case error in a pure string (#631) + 2024.6.1 -------- diff --git a/environment_gcsfs.yaml b/environment_gcsfs.yaml index 98da14c0..8779802f 100644 --- a/environment_gcsfs.yaml +++ b/environment_gcsfs.yaml @@ -2,18 +2,17 @@ name: gcsfs_test channels: - conda-forge dependencies: + - python==3.11 - aiohttp - crcmod - decorator - fsspec - - fusepy<3 - google-api-core - google-api-python-client - google-auth - google-auth-oauthlib - google-cloud-core - google-cloud-storage - - libfuse<3 - pytest - pytest-timeout - requests diff --git a/gcsfs/tests/conftest.py b/gcsfs/tests/conftest.py index b5d74cca..e1a73732 100644 --- a/gcsfs/tests/conftest.py +++ b/gcsfs/tests/conftest.py @@ -46,6 +46,8 @@ c = TEST_BUCKET + "/tmp/test/c" d = TEST_BUCKET + "/tmp/test/d" +params = dict() + def stop_docker(container): cmd = shlex.split('docker ps -a -q --filter "name=%s"' % container) @@ -60,6 +62,7 @@ def docker_gcs(): # assume using real API or otherwise have a server already set up yield os.getenv("STORAGE_EMULATOR_HOST") return + params["token"] = "anon" container = "gcsfs_test" cmd = ( "docker run -d -p 4443:4443 --name gcsfs_test fsouza/fake-gcs-server:latest -scheme " @@ -86,11 +89,12 @@ def docker_gcs(): @pytest.fixture def gcs_factory(docker_gcs): + params["endpoint_url"] = docker_gcs + def factory(default_location=None): GCSFileSystem.clear_instance_cache() - return fsspec.filesystem( - "gcs", endpoint_url=docker_gcs, default_location=default_location - ) + params["default_location"] = default_location + return fsspec.filesystem("gcs", **params) return factory diff --git a/gcsfs/tests/test_core.py b/gcsfs/tests/test_core.py index ebd33c0c..28f1a1d6 100644 --- a/gcsfs/tests/test_core.py +++ b/gcsfs/tests/test_core.py @@ -870,8 +870,10 @@ def test_bigger_than_block_read(gcs): def test_current(gcs): + from gcsfs.tests import conftest + assert GCSFileSystem.current() is gcs - gcs2 = GCSFileSystem(endpoint_url=gcs._endpoint, default_location=None) + gcs2 = GCSFileSystem(**conftest.params) assert gcs2.session is gcs.session diff --git a/requirements.txt b/requirements.txt index 1d290de1..6a73c506 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ aiohttp!=4.0.0a0, !=4.0.0a1 decorator>4.1.2 -fsspec==2024.6.1 +fsspec==2024.9.0 google-auth>=1.2 google-auth-oauthlib google-cloud-storage