Skip to content

Relax tightness of coupling in monitor code#174

Merged
digimaun merged 7 commits into
devfrom
unknown repository
May 4, 2020
Merged

Relax tightness of coupling in monitor code#174
digimaun merged 7 commits into
devfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Apr 29, 2020


This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Thank you for contributing to the IoT extension!

This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • If introducing new functionality or modified behavior, are they backed by unit and integration tests?
  • In the same context as above are command names and their parameter definitions accurate? Do help docs have sufficient content?
  • Have all unit and integration tests passed locally? i.e. pytest <project root> -vv
  • Have static checks passed using the .pylintrc and .flake8 rules? Look at the CI scripts for example usage.

@ghost
Copy link
Copy Markdown
Author

ghost commented Apr 30, 2020

image

@ghost ghost marked this pull request as ready for review April 30, 2020 23:19
@ghost ghost requested a review from digimaun as a code owner April 30, 2020 23:19
@ghost ghost changed the title Prbans/monitor cleanup Relax tightness of coupling in monitor code Apr 30, 2020
import mock


class TestUamqpImport(object):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice.

from abc import ABC, abstractmethod


class AbstractBaseEventsHandler(ABC):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good use of abstract base class.

@ghost
Copy link
Copy Markdown
Author

ghost commented May 1, 2020

image

properties,
content_type,
simulate_errors,
central_device_provider,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ultimately the provider for device templates needs to be abstracted and not assume Central (there are services other than Central that deal with device templates).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed, I think that'll be the next item I'll address

properties=None,
output=None,
validate_messages=None,
simulate_errors=None,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The named args list here is getting too long - we should move the less commonly used to kwargs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Agreed, I'll be addressing this as part of the next work item where I think I'll split the central parsing logic out so we dont have the _static_validation or _dynamic_validation calls in the common parser

@digimaun digimaun merged commit 93aae53 into Azure:dev May 4, 2020
@ghost ghost deleted the prbans/monitor-cleanup branch May 4, 2020 19:43
c-ryan-k added a commit to c-ryan-k/azure-iot-cli-extension that referenced this pull request Apr 10, 2025
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.

1 participant