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

evalott100
Copy link
Contributor

No description provided.

@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.

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

evalott100 commented Aug 7, 2023

Dist is also fails on main and dev

src/pandablocks_ioc/ioc.py Outdated Show resolved Hide resolved
tests/fixtures/mocked_panda.py Outdated Show resolved Hide resolved
tests/test_hdf_ioc.py Show resolved Hide resolved
tests/test_unit_testing_structure.py Show resolved Hide resolved
tests/test_ioc_system.py Outdated Show resolved Hide resolved
tests/test_ioc_system.py Show resolved Hide resolved
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.

src/pandablocks_ioc/_hdf_ioc.py Outdated Show resolved Hide resolved
tests/test_ioc.py Outdated Show resolved Hide resolved
tests/test_ioc_system.py Show resolved Hide resolved
tests/fixtures/mocked_panda.py Outdated Show resolved Hide resolved
tests/fixtures/mocked_panda.py Outdated Show resolved Hide resolved
tests/test_tables.py Outdated Show resolved Hide resolved
tests/test_unit_testing_structure.py Show resolved Hide resolved
tests/fixtures/mocked_panda.py Outdated Show resolved Hide resolved
tests/fixtures/mocked_panda.py Outdated Show resolved Hide resolved
tests/fixtures/table_data_for_tests.py Outdated Show resolved Hide resolved
@evalott100
Copy link
Contributor Author

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.

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.

…nstall requires). Should hopefully fix the problem of deprecation warnings on python/3.8
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.

tests/fixtures/mocked_panda.py Outdated Show resolved Hide resolved
tests/test_ioc_system.py Show resolved Hide resolved
tests/test_ioc_system.py Outdated Show resolved Hide resolved
to use waits, changed the
mocked_panda_standard_responses to wait
until the MockedAsyncioClient is set up
before proceeding with the test.
to allow bobfiles time to be written
in the subprocess. Changed to pvi>=0.5
and python>=3.10
@evalott100 evalott100 merged commit e292130 into PandABlocks:dev Aug 16, 2023
7 of 10 checks passed
@evalott100 evalott100 deleted the adjust_testing_environment branch August 16, 2023 10:37
@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.

3 participants