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

WiP ENH: yield "impossible" result record instead of exception if remote is not known #7402

Draft
wants to merge 1 commit into
base: maint
Choose a base branch
from

Conversation

yarikoptic
Copy link
Member

In this repo, where we have 'smaug' sibling only known to the top dataset

❯ giturl
http://github.com/con/opfvta-replication-2023/

if we request getting data from 'smaug'

❯ datalad get -rs smaug .
[INFO   ] Ensuring presence of Dataset(/home/yoh/proj/CON/opfvta-replication-2023) to get /home/yoh/proj/CON/opfvta-replication-2023
Remote 'smaug' is not available. Command failed:
RemoteNotAvailableError: 'annex get --from=smaug -c annex.retry=3 --json --json-error-messages --json-progress'

where the problems are:

  • not clear where (which submodule) the remote is not available
  • we immediately fail instead of going through other submodules
  • 'impossible' seems to be more appropriate than 'error'

with current patch it gets to be

❯ datalad get -rs smaug .
[INFO   ] Ensuring presence of Dataset(/home/yoh/proj/CON/opfvta-replication-2023) to get /home/yoh/proj/CON/opfvta-replication-2023
get(impossible): (dataset) [Remote 'smaug' is not available in '/home/yoh/proj/CON/opfvta-replication-2023/inputs/mouse-brain-templates']
get(impossible): (dataset) [Remote 'smaug' is not available in '/home/yoh/proj/CON/opfvta-replication-2023/inputs/opfvta_bidsdata']
action summary:
  get (impossible: 2)

but it feels "incorrect" in how the records is created. The comments in the code show what I attempted to do -- the main problem is that then that datalad doesn't show anything for me, or duplicates info if I provide exception, etc. @mih please advise on how to proceed in "optimal record" way.

TODOs

  • figure out the right way
  • add a test

…ote is not known

In this repo, where we have 'smaug' sibling only known to the top dataset

    ❯ giturl
    http://github.com/con/opfvta-replication-2023/

if we request getting data from 'smaug'

	❯ datalad get -rs smaug .
	[INFO   ] Ensuring presence of Dataset(/home/yoh/proj/CON/opfvta-replication-2023) to get /home/yoh/proj/CON/opfvta-replication-2023
	Remote 'smaug' is not available. Command failed:
	RemoteNotAvailableError: 'annex get --from=smaug -c annex.retry=3 --json --json-error-messages --json-progress'

where the problems are:

- not clear where (which submodule) the remote is not available
- we immediately fail instead of going through other submodules
- 'impossible' seems to be more appropriate than 'error'

with current patch it gets to be

    ❯ datalad get -rs smaug .
    [INFO   ] Ensuring presence of Dataset(/home/yoh/proj/CON/opfvta-replication-2023) to get /home/yoh/proj/CON/opfvta-replication-2023
    get(impossible): (dataset) [Remote 'smaug' is not available in '/home/yoh/proj/CON/opfvta-replication-2023/inputs/mouse-brain-templates']
    get(impossible): (dataset) [Remote 'smaug' is not available in '/home/yoh/proj/CON/opfvta-replication-2023/inputs/opfvta_bidsdata']
    action summary:
      get (impossible: 2)

but it feels "incorrect" in how the records is created.  The comments in the
code show what I attempted to do -- the main problem is that then that datalad
doesn't show anything for me, or duplicates info if I provide exception, etc.
Please advise on how to proceed in "optimal record" way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant