Skip to content

Move VOCS from base Xopt object to generator#393

Open
roussel-ryan wants to merge 19 commits intov3.0from
move-vocs
Open

Move VOCS from base Xopt object to generator#393
roussel-ryan wants to merge 19 commits intov3.0from
move-vocs

Conversation

@roussel-ryan
Copy link
Collaborator

@roussel-ryan roussel-ryan commented Jan 23, 2026

This pull request updates the documentation and code to reflect a refactoring where the Xopt class no longer directly stores a vocs attribute; instead, vocs is now accessed through the generator. The changes ensure consistency across examples, documentation, and code, and introduce a property to retrieve vocs from the generator.

Documentation and Example Updates:

  • Updated the YAML and code examples in README.md and xopt_basic.ipynb to remove direct references to vocs in the Xopt constructor and configuration, and to clarify that only generator and evaluator are required for Xopt instantiation [1] [2] [3] [4] [5] [6].

Codebase Refactoring:

  • Removed the vocs attribute from the Xopt class definition and its constructor, updating the class docstring and field definitions accordingly [1] [2].
  • Added a vocs property to the Xopt class that retrieves the vocs object from the associated generator, providing backward compatibility for accessing vocs.

@roussel-ryan
Copy link
Collaborator Author

Draft PR to supercede #360 @electronsandstuff

@roussel-ryan
Copy link
Collaborator Author

@nikitakuklev @ChristopherMayes I've prototyped this change in the current draft PR and updated the readme / basic example to give us a sense of what this change would look like. Let me know your thoughts, if you are supportive of this change I will go through and fix the examples / tests to support it

@electronsandstuff
Copy link
Contributor

@roussel-ryan, just looking here after the Xopt 3.0 meeting. How do you want to handle me adding legacy support in. Merge this into the 3.0 branch and then I make another PR?

I suppose we should also close #360 now.

@roussel-ryan
Copy link
Collaborator Author

@electronsandstuff Yes, we should merge and then add in legacy support

@roussel-ryan roussel-ryan marked this pull request as ready for review February 12, 2026 17:29
@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 96.49123% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
xopt/base.py 75.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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.

2 participants