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

Fix LensUpdateMode #40

Merged
merged 3 commits into from Sep 25, 2023
Merged

Fix LensUpdateMode #40

merged 3 commits into from Sep 25, 2023

Conversation

LucVV
Copy link
Contributor

@LucVV LucVV commented Sep 25, 2023

Proposed change

The setter for LensUpdateMode does not work currently, as it is trying to set OpticStudioSystem.LensUpdateMode rather than 'OpticStudioSystem.UpdateMode. There is some ambiguity as the contact is called 'LensUpdateMode but the ZOS-API calls it UpdateMode. For now, I think we should at least fix 'LensUpdateMode'.

We can also choose to add 'UpdateMode' and drop LensUpdateMode), but that would be a breaking change. If we would want that, I would propose to fix LensUpdateMode for now, add UpdateMode and add a deprecation warning to LensUpdateMode. I would like some input on that.

Type of change

  • Example (a notebook demonstrating how to use ZOSPy for a specific application)
  • Bugfix (non-breaking change which fixes an issue)
  • New analysis (a wrapper around an OpticStudio analysis)
  • New feature (other than an analysis)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • Python version: 3.11
  • OpticStudio version: 20.3.2

Related issues

Checklist

  • I have followed the contribution guidelines
  • The code has been linted, formatted and tested locally using tox.
  • Local tests pass. Please fix any problems before opening a PR. If this is not possible, specify what doesn't work and why you can't fix it.
  • I added new tests for any features contributed, or updated existing tests.
  • I updated CHANGELOG.md with my changes (except for refactorings and changes in the documentation).

If you contributed an analysis:

  • I did not use AttrDicts for the analysis result data (please use dataclasses instead).

If you contributed an example:

  • I contributed my example as a Jupyter notebook.

@LucVV LucVV changed the title Lvv fix lensupdatemode Fix lensupdatemode Sep 25, 2023
@LucVV LucVV changed the title Fix lensupdatemode Fix LensUpdateMode Sep 25, 2023
Copy link
Collaborator

@crnh crnh left a comment

Choose a reason for hiding this comment

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

In the future, we may want to change this attribute to UpdateMode, to be more in line with the ZOS-API names.

@crnh crnh merged commit fa4ca61 into main Sep 25, 2023
15 checks passed
@crnh crnh deleted the lvv_fix_lensupdatemode branch September 25, 2023 11:32
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.

None yet

2 participants