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

Adjust testing environment #23

Merged
merged 17 commits into from
Aug 16, 2023

Conversation

evvaaaa
Copy link
Contributor

@evvaaaa evvaaaa commented Aug 2, 2023

No description provided.

@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from d190f0a to 164f08b Compare August 3, 2023 13:32
@codecov
Copy link

codecov bot commented Aug 3, 2023

Codecov Report

Patch coverage: 20.00% and project coverage change: -0.14% ⚠️

Comparison is base (61ff502) 83.48% compared to head (e289cb3) 83.34%.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev      #23      +/-   ##
==========================================
- Coverage   83.48%   83.34%   -0.14%     
==========================================
  Files           7        7              
  Lines        1072     1075       +3     
==========================================
+ Hits          895      896       +1     
- Misses        177      179       +2     
Files Changed Coverage Δ
src/pandablocks_ioc/__main__.py 0.00% <0.00%> (ø)
src/pandablocks_ioc/_hdf_ioc.py 96.85% <0.00%> (-1.55%) ⬇️
src/pandablocks_ioc/ioc.py 78.71% <100.00%> (+0.18%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch 6 times, most recently from 61654cf to 2c5dee1 Compare August 7, 2023 10:46
@evvaaaa evvaaaa self-assigned this Aug 7, 2023
@evvaaaa
Copy link
Contributor Author

evvaaaa commented Aug 7, 2023

Dist is also fails on main and dev

@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from 13c58a1 to 77f2837 Compare August 7, 2023 14:11
Copy link
Contributor

@AlexanderWells-diamond AlexanderWells-diamond left a comment

Choose a reason for hiding this comment

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

I like the overall structural changes to the tests - it's much nicer to not have the dummy_server, and its associated process and network calls. It should be much easier going forward to reason about how the tests will run.

I'm requesting changes as I think important tests have been removed in this refactoring. None of the tests that checked the dummy server have received expected messages have been kept, which means we have no verification that this module is sending any of the expected messages to PandA. Given our talks about Mocks I expected to see some mocking of the PandA-client calls and validating that they have received the messages that we previously saw in the dummy server.

@evvaaaa
Copy link
Contributor Author

evvaaaa commented Aug 9, 2023

Given our talks about Mocks I expected to see some mocking of the PandA-client calls and validating that they have received the messages that we previously saw in the dummy server.

I've now passed a multiprocessing.Queue to the MockedAsyncioClient so any command it receives from the softioc is put there and can be retrieved in tests.

@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from f8c0aca to d1917d8 Compare August 10, 2023 10:02
pyproject.toml Outdated
@@ -19,7 +19,7 @@ dependencies = [
"h5py",
"softioc>=4.3.0",
"pandablocks>=0.3.1",
"pvi[cli]>=0.4",
"pvi[cli]<0.5",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

pvi requires 3.10 for v0.5, it's neccessary to pin this for consistency on .bob files between 3.9 and 3.10/3.11.

Maybe we should consider requiring 3.10 for pandablocks-ioc @AlexanderWells-diamond?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#26 this will require pvi>=0.5

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know why PVI updated itself to Python 3.10 - it appears to be this PR that did it, but there are no functional changes to the Python code that warrant dropping lower Python versions - the only changes appear to be in the typing module, which will not affect runtime behaviour.

Ultimately I don't really mind what version requirements we have. I'll defer to whatever @coretl and @GDYendell want to do.

@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from 30c3bcb to 06709f1 Compare August 10, 2023 10:41
@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from 06709f1 to a9139d8 Compare August 10, 2023 12:19
…nstall requires). Should hopefully fix the problem of deprecation warnings on python/3.8
@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from f06151d to f8fa658 Compare August 10, 2023 13:48
Copy link
Contributor

@AlexanderWells-diamond AlexanderWells-diamond left a comment

Choose a reason for hiding this comment

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

Looks good now. I've just raised a couple more very minor comments, but they don't have to be resolved to merge this PR.

@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from 4c47b82 to 4e7e53a Compare August 16, 2023 08:51
to use waits, changed the
mocked_panda_standard_responses to wait
until the MockedAsyncioClient is set up
before proceeding with the test.
@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from 4e7e53a to 9c88dae Compare August 16, 2023 09:26
to allow bobfiles time to be written
in the subprocess. Changed to pvi>=0.5
and python>=3.10
@evvaaaa evvaaaa force-pushed the adjust_testing_environment branch from 4771eb6 to e289cb3 Compare August 16, 2023 09:43
@evvaaaa evvaaaa merged commit e292130 into PandABlocks:dev Aug 16, 2023
@evvaaaa evvaaaa deleted the adjust_testing_environment branch August 16, 2023 10:37
@evvaaaa evvaaaa 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.

3 participants