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

docs: autodoc_mock_imports for gssapi #276

Merged
merged 1 commit into from Oct 9, 2020
Merged

docs: autodoc_mock_imports for gssapi #276

merged 1 commit into from Oct 9, 2020

Conversation

ParthS007
Copy link
Member

@ParthS007 ParthS007 commented Sep 28, 2020

closes #274

Adds mocking of gssapi that cannot be installed on ReadTheDocs
builders.

This fixes the ReadTheDocs building problem.

setup.py Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
setup.py Show resolved Hide resolved
setup.py Show resolved Hide resolved
@tiborsimko
Copy link
Member

@ParthS007 Can you please rebase all your RTFD build fixing branches against maint-0.7 and edit PR to change the base branch? We can merge it there, so that we won'tt have to worry about failed PRs in case we shall be working on future 0.7.1, 0.7.2 bug fix upgrades...

@ParthS007 ParthS007 changed the base branch from master to maint-0.7 October 9, 2020 09:51
@ParthS007
Copy link
Member Author

@tiborsimko I have updated the base branch and rebased my current branch. Can you please check if it's fine and let me know if any other changes are required. 👍

@@ -72,6 +71,8 @@ def initialize_krb5_token(workflow_uuid):
class SSHClient:
"""SSH Client."""

import paramiko
Copy link
Member

Choose a reason for hiding this comment

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

If we import paramiko in this class, which is a good thing to do, we have to amend all paramiko-related commands to use self.paramiko as the package name, for example:

diff --git a/reana_job_controller/utils.py b/reana_job_controller/utils.py
index 9176495..418ba7a 100644
--- a/reana_job_controller/utils.py
+++ b/reana_job_controller/utils.py
@@ -81,8 +81,8 @@ class SSHClient:

     def establish_connection(self):
         """Establish the connection."""
-        self.ssh_client = paramiko.SSHClient()
-        self.ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+        self.ssh_client = self.paramiko.SSHClient()
+        self.ssh_client.set_missing_host_key_policy(self.paramiko.AutoAddPolicy())
         self.ssh_client.connect(hostname=self.hostname, port=self.port, gss_auth=True)

     def exec_command(self, command):

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

requirements.in Outdated
@@ -0,0 +1,7 @@
# This file is part of REANA.
# Copyright (C) 2017, 2018 CERN.
Copy link
Member

Choose a reason for hiding this comment

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

2020

(we did not have this file in 2017, 2018)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 👍

Copy link
Member

Choose a reason for hiding this comment

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

You edited the wrong file, the 2020 should be in the new requirements.in file, not in the old MANIFEST.in ...

Adds mocking of 'gssapi' and 'paramiko[gssapi]' that cannot be installed on ReadTheDocs
builders.

This fixes the ReadTheDocs building problem.

closes #274
@tiborsimko tiborsimko merged commit 2fa5221 into reanahub:maint-0.7 Oct 9, 2020
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.

docs: fix ReadTheDocs build
4 participants