dandi / dandi-cli

DANDI command line client to facilitate common operations
https://dandi.readthedocs.io/
Apache License 2.0
22 stars 27 forks source link

ENH: organize - show files with conflicts requiring adding _obj- #1490

Open yarikoptic opened 3 months ago

yarikoptic commented 3 months ago

Logging check is currently not really functioning since IIRC we do enable logging into a file at higher level than INFO. So we might need to tune decision making here

Should provide UX side to partially address:

example:

❯ dandi organize --dandiset-path /tmp/outds /home/yoh/proj/dandi/dandisets/000004/sub-P53CS/*nwb /home/yoh/proj/dandi/dandisets/000004/sub-P54CS/*nwb
...
2024-08-19 20:03:17,448 [    INFO] Symlink support autodetected; setting files_mode='symlink'
2024-08-19 20:03:17,452 [    INFO] 2 out of 5 paths are not unique.
 2 paths 'compete' for the path 'sub-P53CS/sub-P53CS_ses-20171101_ecephys+image.nwb':
  /home/yoh/proj/dandi/dandisets/000004/sub-P53CS/sub-P53CS_ses-20171101_obj-108aqix_ecephys+image.nwb
  /home/yoh/proj/dandi/dandisets/000004/sub-P53CS/sub-P53CS_ses-20171101_obj-lj04dr_ecephys+image.nwb
 3 paths 'compete' for the path 'sub-P54CS/sub-P54CS_ses-20180101_ecephys+image.nwb':
  /home/yoh/proj/dandi/dandisets/000004/sub-P54CS/sub-P54CS_ses-20180101_obj-1ru98u8_ecephys+image.nwb
  /home/yoh/proj/dandi/dandisets/000004/sub-P54CS/sub-P54CS_ses-20180101_obj-1ukzk61_ecephys+image.nwb
  /home/yoh/proj/dandi/dandisets/000004/sub-P54CS/sub-P54CS_ses-20180101_obj-1vx1a5w_ecephys+image.nwb
 We will try adding _obj- based on crc32 of object_id

TODOs

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.60%. Comparing base (44e097f) to head (e456ebb).

Files Patch % Lines
dandi/organize.py 66.66% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1490 +/- ## ========================================== + Coverage 88.55% 88.60% +0.04% ========================================== Files 77 77 Lines 10568 10581 +13 ========================================== + Hits 9359 9375 +16 + Misses 1209 1206 -3 ``` | [Flag](https://app.codecov.io/gh/dandi/dandi-cli/pull/1490/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dandi/dandi-cli/pull/1490/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | `88.60% <66.66%> (+0.04%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.