Skip to content

Fix get_metadata name of AuthInfo class (#2221)#2222

Merged
sphuber merged 2 commits into
aiidateam:developfrom
JuDFTteam:develop
Nov 22, 2018
Merged

Fix get_metadata name of AuthInfo class (#2221)#2222
sphuber merged 2 commits into
aiidateam:developfrom
JuDFTteam:develop

Conversation

@PhilippRue
Copy link
Copy Markdown
Contributor

@PhilippRue PhilippRue commented Nov 20, 2018

Fixes #2221
Fixes this error:

Error: * The test raised an exception!
** Full traceback:
   Traceback (most recent call last):
     File ".../aiida_core/aiida/cmdline/commands/cmd_computer.py", line 561, in computer_test
       succeeded = test(transport=trans, scheduler=sched, authinfo=authinfo)
     File ".../aiida_core/aiida/cmdline/commands/cmd_computer.py", line 145, in _computer_create_temp_file
       workdir = authinfo.get_workdir().format(username=remote_user)
     File ".../aiida_core/aiida/orm/authinfos.py", line 136, in get_workdir
       metadata = self.get_metadata()
     File ".../aiida_core/aiida/orm/authinfos.py", line 122, in get_metadata
       return self._backend_entity.get_metadata()
   AttributeError: 'DjangoAuthInfo' object has no attribute 'get_metadata'
Some tests failed! (1 out of 4 failed)

when running verdi computer test ...

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 20, 2018

Coverage Status

Coverage increased (+0.09%) to 68.887% when pulling ad20750 on JuDFTteam:develop into 60bc398 on aiidateam:develop.

Copy link
Copy Markdown
Contributor

@muhrin muhrin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the linter happy

Comment thread aiida/orm/authinfos.py Outdated
:return: a dictionary
"""
return self._backend_entity.get_metadata()
return self._backend_entity._get_metadata()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return self._backend_entity._get_metadata()
return self._backend_entity._get_metadata() # pylint: disable=protected-access

@muhrin
Copy link
Copy Markdown
Contributor

muhrin commented Nov 22, 2018

All good. A more general solution will come in when provenance_redesign gets merged. Thanks @PhilippRue

@sphuber sphuber self-requested a review November 22, 2018 10:10
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.

4 participants