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

Add Xopt and Badger version into routine #101

Merged
merged 19 commits into from
Oct 22, 2024
Merged

Add Xopt and Badger version into routine #101

merged 19 commits into from
Oct 22, 2024

Conversation

wenatuhs
Copy link
Collaborator

@wenatuhs wenatuhs commented Oct 4, 2024

This PR contains the following changes:

  • Add Xopt and Badger version when save a routine
  • Add open docs button on env config panel to show the readme of the corresponding env
  • Incorporate toml project conf file from Sara

@wenatuhs wenatuhs requested a review from roussel-ryan October 4, 2024 15:57
Copy link
Collaborator

@roussel-ryan roussel-ryan 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, can you add a small test to verify that the badger and xopt versions are properly added in when saving the routine from the routine page?

@roussel-ryan
Copy link
Collaborator

I'm reviewing this now, @wenatuhs can you add more details to the PR description?

Copy link
Collaborator

@roussel-ryan roussel-ryan 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 to me, please add a description to the PR + the test I requested before and then we can accept

@@ -48,6 +48,10 @@ def test_routine_generation(qtbot):
assert routine.vocs.objectives == {"f": "MINIMIZE"}
assert routine.initial_points.empty

# test if badger and xopt version are embedded
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we make this test stronger by comparing it to the current version? (same goes for the tests in test_db)

Copy link
Collaborator

Choose a reason for hiding this comment

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

ie. routine.badger_version == str(badger.__version__) and similar for xopt

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure! Unfortunately we cannot do the same for test_db because we didn't add version numbers there -- there are corresponding fields but the value would be None. We of course can add version numbers first in the test but then it doesn't make sense to verify the just-added version numbers

@roussel-ryan roussel-ryan merged commit 615fcca into main Oct 22, 2024
10 checks passed
@wenatuhs wenatuhs deleted the xopt-tag branch November 1, 2024 16:53
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.

4 participants