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

Merge dev into main #29

Merged
merged 79 commits into from
Sep 5, 2023
Merged

Merge dev into main #29

merged 79 commits into from
Sep 5, 2023

Conversation

evalott100
Copy link
Contributor

@evalott100 evalott100 commented Sep 1, 2023

dev now contains commits from many different PRs, this PR replaces this one.

The PRs that have already merged into dev are:

If we merge this PR I don't mind closing these open PRs and making new ones into main, alternatively we can merge them first.

Note: dist is also failing on main, once this is merged to main we can make a new issue for this before release.

This does now mean we do a lot more re-ordering of the list,
but the alternative is to keep two lists which would more easily
become out of sync.
This applies to any PandA field that returns us a label field.
Tests updated to accomodate this.
Also fixes some mypy errors in tests
Also upgrade to newest pythonSoftIoc which includes waveform of
strings support.
Also adjust typing of some test fixtures to better indicate that
the order of items is important
Also raise exception if initial connect fails.
Also improves the IOC startup, by waiting for a signal rather than
just a flat sleep timer
Changed test to use lower case names consistent with PVA
… retrieving commands from the to give them time
…nd 3.10/3.11. We should consider 3.10 minimum on pandablocks-ioc
@dmgav
Copy link
Contributor

dmgav commented Sep 4, 2023

Would you consider merging #27 before merging dev into main? The PR seems to be ready. The issue is rather critical for testing Panda with fly scans. The changes were discussed with @coretl on Slack.

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.

See comment regarding listing files

src/pandablocks_ioc/_pvi.py Outdated 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.

Looks good! We can finally start having much simpler PRs :)

@evalott100 evalott100 merged commit 6f7232d into main Sep 5, 2023
15 of 16 checks passed
@evalott100 evalott100 deleted the dev branch September 5, 2023 09:00
@dmgav
Copy link
Contributor

dmgav commented Sep 5, 2023

@evalott100 I see that you did merge #27, but for some reason I don't see the changes from this PR in the main branch. Should I reopen the PR or create a new PR (from the same PR branch) to the main branch?

@evalott100
Copy link
Contributor Author

@dmgav Yes please do, I'm unsure why those changes aren't there. Sorry for the bother!

I'm happy to approve either a rebase of the original, or a new PR.

@dmgav
Copy link
Contributor

dmgav commented Sep 5, 2023

@evalott100 Another question: currently the IOC is checking if the directory with .bob files is empty and fails to start if it is not empty, which means that the IOC can not be simply restarted without clearing the directory with bob files. There used to be an option --overwrite-bobfiles, but now it is removed. Are there any plans to implement any option that allow restarting the IOC without removing the bob file (e.g. an option not to generate the bob files if automatic overwrite is not desirable)?

@coretl
Copy link
Contributor

coretl commented Sep 6, 2023

I propose changing the positional commandline screen_dir argument to an optional --screen-dir=. If provided it must be an empty directory that will be filled with bob files. If not provided then no bob file generation will take place.

@dmgav, @evalott100 what do you reckon?

@AlexanderWells-diamond
Copy link
Contributor

The issue with that is you still have to manually clear the directory between runs, if you do want to generate bobfiles. e.g. you run it once, then make a change to the PandA, then want to regenerate your bobfiles. With your suggestion there's an extra step required before the re-run to delete the files.

I don't know how common this workflow is though, so may be overstating the problem.

@dmgav
Copy link
Contributor

dmgav commented Sep 6, 2023

I agree with making --screen-dir optional, but I think it would be useful to have another argument that tells IOC to skip generating bob files if the directory is not empty.

@coretl
Copy link
Contributor

coretl commented Sep 6, 2023

@dmgav what's the use case for this? I'm interested to see how you intend to run this in production. For us we would probably put the creation of the bob files in a temporary directory, then rsyncing to a shared filesystem in the container startup. Where do you plan to put bob files in production?

@coretl
Copy link
Contributor

coretl commented Sep 6, 2023

Also, does generating bobfiles take a long time?

@dmgav
Copy link
Contributor

dmgav commented Sep 6, 2023

No, execution time is not an issue. Bobfiles are generated quickly. We have not discussed how the IOC is going to be deployed in production. I am currently thinking about the development environment. In principle, making the --screen-dir optional covers all use cases, since it allows to start the IOC without clearing the directory with bobfiles or creating an empty temporary directory. Additional argument could make life easier, since it would allow to start the IOC using fixed set of arguments (e.g. without changing a script that starts the IOC) and simply clear the directory with bobfiles when they need to be generated. This could probably be done by writing a little bit more complicated script though.

@evalott100
Copy link
Contributor Author

I propose changing the positional commandline screen_dir argument to an optional --screen-dir=. If provided it must be an empty directory that will be filled with bob files. If not provided then no bob file generation will take place.

@dmgav, @evalott100 what do you reckon?

I like this idea!

@evalott100
Copy link
Contributor Author

No, execution time is not an issue. Bobfiles are generated quickly. We have not discussed how the IOC is going to be deployed in production. I am currently thinking about the development environment. In principle, making the --screen-dir optional covers all use cases, since it allows to start the IOC without clearing the directory with bobfiles or creating an empty temporary directory. Additional argument could make life easier, since it would allow to start the IOC using fixed set of arguments (e.g. without changing a script that starts the IOC) and simply clear the directory with bobfiles when they need to be generated. This could probably be done by writing a little bit more complicated script though.

I can see this use case. I'll add that along with ---screen-dir in a branch.

@evalott100 evalott100 self-assigned this Oct 11, 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.

6 participants