Skip to content

[sc-241566] Add ElementName column to attribute search #72

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

Open
wants to merge 5 commits into
base: feature/sc-241416-allow-maxCount-tuning
Choose a base branch
from

Conversation

alexbourret
Copy link
Contributor

Copy link
Contributor

@liamlynch-data liamlynch-data left a comment

Choose a reason for hiding this comment

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

Works fine - indeed it's pretty simple... but I think we could probably:

  • remove the flag (add_element_name) as unneeded complexity
  • add a unit test like this (I have this locally, can commit it if you agreed)
    def test_get_element_name_from_path(self):
        assert get_element_name_from_path("\\osisoft-pi-serv\\Well\\Assets\\TX532|Current") == 'TX532'
        assert get_element_name_from_path("\\osisoft-pi-serv\\Well\\Assets\\TX532") == 'TX532'
        assert get_element_name_from_path("TX532") == 'TX532'
        self.assertIsNone(get_element_name_from_path(""))
        assert get_element_name_from_path("|mknnkn") == ""
        assert get_element_name_from_path("\\something\\|mknnkn") == ""

@alexbourret
Copy link
Contributor Author

Works fine - indeed it's pretty simple... but I think we could probably:

* remove the flag (add_element_name) as unneeded complexity

* add a unit test like this (I have this locally, can commit it if you agreed)
    def test_get_element_name_from_path(self):
        assert get_element_name_from_path("\\osisoft-pi-serv\\Well\\Assets\\TX532|Current") == 'TX532'
        assert get_element_name_from_path("\\osisoft-pi-serv\\Well\\Assets\\TX532") == 'TX532'
        assert get_element_name_from_path("TX532") == 'TX532'
        self.assertIsNone(get_element_name_from_path(""))
        assert get_element_name_from_path("|mknnkn") == ""
        assert get_element_name_from_path("\\something\\|mknnkn") == ""

👍 added in d516709

Copy link
Contributor

@liamlynch-data liamlynch-data left a comment

Choose a reason for hiding this comment

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

Thanks - LGTM!

…c-241566-add-elementname-column-to-attribute-search
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.

2 participants