Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uploading Zarr within a BIDS dataset; typing-check guided fix for handling requests exception #1331

Merged
merged 3 commits into from
Sep 29, 2023

Commits on Sep 28, 2023

  1. Add a test checking/demonstrating the problem of uploading Zarr withi…

    …n BIDS
    
    could not run tests locally unfortunately - likely due to my custom
    configuration of networking for podman (?) or was it also done for docker? TODO to figure it out
    
        ulling django   ... done
        Creating network "dandiarchive-docker_default" with the default driver
        ERROR: Failed to Setup IP tables: Unable to enable SKIP DNAT rule:  (iptables failed: iptables --wait -t nat -I DOCKER -i br-c26ebcecb035 -j RETURN: iptables: No chain/target/match by that name.
         (exit status 1))
        Removing network dandiarchive-docker_default
        WARNING: Network dandiarchive-docker_default not found.
        ERROR
    
        ============================================================ ERRORS =============================================================
        ____________________________________________ ERROR at setup of test_upload_bids_zarr ____________________________________________
        dandi/tests/fixtures.py:403: in docker_compose_setup
            run(
        /usr/lib/python3.11/subprocess.py:571: in run
            raise CalledProcessError(retcode, process.args,
        E   subprocess.CalledProcessError: Command '['docker-compose', 'run', '--rm', 'django', './manage.py', 'migrate']' returned non-zero exit status 1.
        ===================================================== slowest 10 durations ======================================================
        119.18s setup    dandi/tests/test_upload.py::test_upload_bids_zarr
    
        (1 durations < 0.005s hidden.  Use -vv to show these durations.)
        ==================================================== short test summary info ====================================================
        ERROR dandi/tests/test_upload.py::test_upload_bids_zarr - subprocess.CalledProcessError: Command '['docker-compose', 'run', '--rm', 'django', './manage.py', 'migrate']' returned non-...
        ================================================= 1 error in 119.31s (0:01:59) ==================================================
        python -m pytest -s -v dandi/tests/test_upload.py::test_upload_bids_zarr  3.87s user 3.43s system 6% cpu 2:01.11 total
    
    Also flake8 was not happy either
    
        flake8...................................................................Failed
        - hook id: flake8
        - exit code: 1
    
        dandi/tests/test_upload.py:297:5: F821 undefined name 'new_dandiset'
        dandi/tests/test_upload.py:298:16: F821 undefined name 'new_dandiset'
        dandi/tests/test_upload.py:303:5: F821 undefined name 'new_dandiset'
    
    so it seems it does not know how to deal with those pytest fixtures but odd
    that just now and just for that one
    yarikoptic committed Sep 28, 2023
    Configuration menu
    Copy the full SHA
    c19906b View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2023

  1. Make ZarrBIDSAsset to inherit from ZarrAsset first so iter_upload of …

    …Zarr is used not of a file
    
    Also fixed up test
    yarikoptic committed Sep 29, 2023
    Configuration menu
    Copy the full SHA
    95a0f20 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6a9970 View commit details
    Browse the repository at this point in the history