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

Changed test to use lower case names consistent with PVA #22

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

evalott100
Copy link
Contributor

Closes #13

@evalott100 evalott100 self-assigned this Jul 19, 2023
@evalott100 evalott100 linked an issue Jul 19, 2023 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c7499b9) 83.50% compared to head (ec9cc23) 83.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev      #22   +/-   ##
=======================================
  Coverage   83.50%   83.50%           
=======================================
  Files           7        7           
  Lines        1073     1073           
=======================================
  Hits          896      896           
  Misses        177      177           
Impacted Files Coverage Δ
src/pandablocks_ioc/_tables.py 95.85% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AlexanderWells-diamond
Copy link
Contributor

Is this a correct understanding of the situation?

We create a series of records for the tables, and we pass in the name of each column as an extra bit of info. As PandA returns that name in capitals, we pass it in like that, but then PVI is internally converting it to lower case? Is that an expected behaviour? It seems like an odd bit of unnecessary work that it's doing.

@evalott100
Copy link
Contributor Author

Is this a correct understanding of the situation?

We create a series of records for the tables, and we pass in the name of each column as an extra bit of info. As PandA returns that name in capitals, we pass it in like that, but then PVI is internally converting it to lower case? Is that an expected behaviour? It seems like an odd bit of unnecessary work that it's doing.

@coretl mentioned this maybe he can weight in? I remember hearing that names will be capitalised and made lowercase at different points in the I22 run we're planning

@coretl
Copy link
Contributor

coretl commented Jul 20, 2023

That is correct, we need the names in the PVI structure, and the names in the PVA table structure to be lowercase, as we tie python attribute names to this in Ophyd...

@AlexanderWells-diamond
Copy link
Contributor

Sorry, I don't quite get it: We create the PVI name tags, and we're creating them in uppercase? But then when we receive them through pvget we see lowercase strings? I don't see how Ophyd is related to what I believe is happening entirely inside this codebase?

@coretl
Copy link
Contributor

coretl commented Jul 20, 2023

In this line I make the PVA table column lowercase:

f"value.{field_name.lower()}": {

This makes the same name to the tests.

In #18 I also make the PVI structure name lowercase, so that's not actually part of this PR...

@evalott100 evalott100 merged commit 61ff502 into PandABlocks:dev Aug 10, 2023
16 of 18 checks passed
@evalott100 evalott100 deleted the fix_failing_unit_test branch August 10, 2023 12:17
@evalott100 evalott100 mentioned this pull request Sep 1, 2023
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.

Fix failing unit test
3 participants