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

feat: Allow skipping of validation when combining workspaces #2385

Merged
merged 6 commits into from
Dec 7, 2023

Conversation

lorenzennio
Copy link
Contributor

@lorenzennio lorenzennio commented Nov 30, 2023

Description

It would be nice to include the option to avoid the validation step when combining two workspaces:

def combine(cls, left, right, join='none', merge_channels=False):

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Add validate arg to workspace.combine to allow for optionally skipping
  workspace validation during. Default is to validate.
* Add test for validate arg being used.
* Add Lorenz Gaertner to contributors list.

@kratsg
Copy link
Contributor

kratsg commented Nov 30, 2023

Is there a reason you want to combine workspaces that don't produce a valid workspace?

@kratsg kratsg added question Further information is requested user request Request coming form a pyhf user labels Nov 30, 2023
@lorenzennio
Copy link
Contributor Author

Yes, I am working with workspaces that contain instructions for a custom modifier. These don't pass the validation in the first place, but for single workspaces I can simply skip it. Now I want to combine two of them, for a global fit.

@matthewfeickert matthewfeickert added feat/enhancement New feature or request API Changes the public API labels Dec 3, 2023
Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

@lorenzennio Can you also add your name to docs /contributors.rst below

- Jonas Rembser

?

Copy link

codecov bot commented Dec 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b4fec1c) 98.28% compared to head (3cafa60) 98.28%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2385   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          69       69           
  Lines        4539     4539           
  Branches      803      803           
=======================================
  Hits         4461     4461           
  Misses         45       45           
  Partials       33       33           
Flag Coverage Δ
contrib 97.86% <100.00%> (ø)
doctest 60.71% <50.00%> (ø)
unittests-3.10 96.29% <100.00%> (ø)
unittests-3.11 96.29% <100.00%> (ø)
unittests-3.8 96.32% <100.00%> (ø)
unittests-3.9 96.34% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@matthewfeickert matthewfeickert left a comment

Choose a reason for hiding this comment

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

Thanks for your PR @lorenzennio — your contributions are appreciated! This all LGTM so I'm just going to push back some style changes that we don't have in the linter yet (nothing wrong with what you did, this is just to reduce noise later when we turn on some additional linting) and then I'll merge. 👍

@matthewfeickert matthewfeickert changed the title feat: allow skipping of validation when combining workspaces feat: Allow skipping of validation when combining workspaces Dec 7, 2023
@matthewfeickert matthewfeickert merged commit 4d215a7 into scikit-hep:main Dec 7, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes the public API feat/enhancement New feature or request question Further information is requested user request Request coming form a pyhf user
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants