Skip to content

Conversation

@weixifan
Copy link
Collaborator

@weixifan weixifan commented Nov 8, 2018

This PR concludes the main implementation work of the project_management module. New integration tests have been added to cover these new functionalities.

The final few upcoming PRs will add a unit test suite for the project_management module.

weixifan and others added 30 commits October 26, 2018 19:08
…after making the RPC (a RequestException can be raised).
…after making the RPC (a RequestException can be raised).
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

Looks mostly good. I think we should start working on unit tests now to take advantage of CI.

"""Android-specific information about an Android Firebase app."""

def __init__(self, name, app_id, display_name, project_id, package_name):
def __init__(self, package_name, name, app_id, display_name, project_id):
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems to me the argument order you had earlier is the more appropriate one. Commons args followed by more type specific args.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I actually wanted to leave it as the last argument as well, but then I will have trouble in _get_app_metadata in line 498 because there the parameter name would be different between iOS and Android, forcing me to pass it as the first positional argument and the rest as keyword arguments (which must follow positional arguments). On the other hand, I can remove keywords from all the other arguments. Please let me know if you have any suggestions.

platform_resource_name=_ProjectManagementService.ANDROID_APPS_RESOURCE_NAME,
app_class=AndroidApp)

def list_ios_apps(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

What if we drop these platform-specific helper functions and directly call _list_apps() where it's needed? Same for others?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is to avoid the clutter that would otherwise appear at the module level. This way, I am able to localize the long list of platform-specific constants into the _ProjectManagementService class.

@hiranya911 hiranya911 assigned weixifan and unassigned hiranya911 Nov 9, 2018
@weixifan weixifan assigned hiranya911 and unassigned weixifan Nov 10, 2018
Copy link
Contributor

@hiranya911 hiranya911 left a comment

Choose a reason for hiding this comment

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

LGTM with one nit. Please make the change before merge.

assert client_info['android_client_info']['package_name'] == TEST_APP_PACKAGE_NAME
break
else:
assert False, 'Failed to find the test Android app in the Android config.'
Copy link
Contributor

Choose a reason for hiding this comment

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

pytest.fail(....)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. Done.

@weixifan weixifan merged commit 2add92c into project-mgt-service Nov 16, 2018
@weixifan weixifan deleted the weixifan-project-management-5 branch November 16, 2018 22:02
@hiranya911 hiranya911 mentioned this pull request Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants