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

Have DESIGN_MATRIX not require design_sheet and default_sheet #10272

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonathan-eq
Copy link
Contributor

@jonathan-eq jonathan-eq commented Mar 11, 2025

Issue
Resolves #10270

Approach
This commit makes the DESIGN_MATRIX keyword not require arguments for design and default sheet. Now DESIGN_SHEET defaults to DesignSheet01 and DEFAULT_SHEET defaults to "DefaultSheet"

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'just rapid-tests')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@jonathan-eq jonathan-eq added the release-notes:improvement Automatically categorise as improvement in release notes label Mar 11, 2025
@jonathan-eq jonathan-eq force-pushed the design_matrix branch 2 times, most recently from 7290ae6 to eb2b139 Compare March 11, 2025 14:27
@jonathan-eq jonathan-eq marked this pull request as ready for review March 11, 2025 14:28
@jonathan-eq jonathan-eq force-pushed the design_matrix branch 2 times, most recently from e41d3b7 to 7424ebd Compare March 11, 2025 14:39
Copy link

codspeed-hq bot commented Mar 11, 2025

CodSpeed Performance Report

Merging #10272 will improve performances by 19.36%

Comparing jonathan-eq:design_matrix (05f9f67) with main (827b401)

Summary

⚡ 1 improvements
✅ 24 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
test_direct_dark_performance_with_storage[gen_x: 20, sum_x: 20 reals: 10-summary-get_record_observations] 1.5 ms 1.3 ms +19.36%

@larsevj
Copy link
Collaborator

larsevj commented Mar 12, 2025

Would not DesignSheet be a more natural default than DesignSheet01 ?

@jonathan-eq
Copy link
Contributor Author

Would not DesignSheet be a more natural default than DesignSheet01 ?

Maybe, but that was just the example in the issue. What do you think @JHolba @xjules ?

def test_invalid_design_matrix_format_raises_validation_error():
with pytest.raises(
ConfigValidationError,
match="DESIGN_MATRIX must be of format \\.xls or \\.xlsx; is 'my_matrix\\.txt'",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this test removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, it was probably caught in the crossfire 🤔

"my_matrix.xlsx",
"DESIGN_:design",
"DEFAULT_SHEET:default",
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

What does happen if you input this? Or if you input for instance DESIGN_MATRIX some_file.xlsx design_sheet default or something else that does not really match the intended input?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Then we use the default

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will add a test^

@jonathan-eq
Copy link
Contributor Author

Would not DesignSheet be a more natural default than DesignSheet01 ?

This is also the current default in design2params, but there the defaultsheet default is "DefaultValues"

This commit makes the DESIGN_MATRIX keyword not require arguments for design and default
sheet. Now DESIGN_SHEET defaults to `DesignSheet01` and `DEFAULT_SHEET` defaults to "DefaultSheet"
@sondreso
Copy link
Collaborator

Would not DesignSheet be a more natural default than DesignSheet01 ?

This is also the current default in design2params, but there the defaultsheet default is "DefaultValues"

We should have the same defaults as DESIGN2PARAMS here, otherwise we might cause unnecessary confusion when transitioning users over 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make design and default sheet not required arguments for the DESIGN_MATRIX keyword
3 participants