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

Systemviewers fixes for older OpticStudio versions #101

Merged
merged 20 commits into from
Dec 18, 2024

Conversation

LucVV
Copy link
Contributor

@LucVV LucVV commented Dec 17, 2024

Proposed change

The new systemviewer implementation does not fully work with older versions of OpticStudio. There are two main issues:

  1. The SystemViewer analyses do not return any result with older OpticStudio versions, making AnalysisData None. In principlle this is oke, but it breaks the current json serialization. This is mainly a problem for some unit tests.
  2. The unit tests also check if the SystemViewer analysis works using assert result.AnalysisData is not None, which fails for older OpticStudio versions due to point 1.

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
  • Documentation (improvement of either the docstrings or the documentation website)

Additional information

  • Python version: 3.11
  • OpticStudio version: 20.3.2

Related issues

#97

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 requested a review from crnh December 17, 2024 10:07
@LucVV
Copy link
Contributor Author

LucVV commented Dec 17, 2024

Similar as in #100, I think changelog can be skipped for this one?

@LucVV LucVV added the skip changelog It is not necessary to update the changelog for this PR label Dec 17, 2024
@crnh
Copy link
Collaborator

crnh commented Dec 17, 2024

Similar as in #100, I think changelog can be skipped for this one?

Yes, this is still part of the analysis conversion, which will be listed as a single item in the changelog.

tests/analyses/new/test_systemviewers.py Outdated Show resolved Hide resolved
@crnh crnh merged commit 70c07de into v2.0.0 Dec 18, 2024
13 checks passed
@crnh crnh deleted the lvv/v2.0.0/systemviewers branch December 18, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changelog It is not necessary to update the changelog for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants