Skip to content

Commit

Permalink
Merge pull request #17 from SpeysideHEP/bugfix_patchmaker
Browse files Browse the repository at this point in the history
[Bug] Issue with the patch maker
  • Loading branch information
jackaraz authored Jan 28, 2025
2 parents e0d6d6b + 81121a3 commit f676f77
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "pyhf plug-in for spey package",
"license": "MIT",
"title": "SpeysideHEP/spey-pyhf: v0.1.9",
"version": "v0.1.9",
"title": "SpeysideHEP/spey-pyhf: v0.1.10",
"version": "v0.1.10",
"upload_type": "software",
"creators": [
{
Expand All @@ -29,7 +29,7 @@
},
{
"scheme": "url",
"identifier": "https://github.com/SpeysideHEP/spey-pyhf/tree/v0.1.9",
"identifier": "https://github.com/SpeysideHEP/spey-pyhf/tree/v0.1.10",
"relation": "isSupplementTo"
},
{
Expand Down
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@ description and the benefits of the implementation.
Here are the steps to follow to make a pull request:

1. Fork the `spey-pyhf` repository.
2. Open an issue and discuss the implementation with the developers.
3. Commit your changes to a feature branch on your fork and push all your
changes there.
4. Start a draft pull request and let the developers know about your
progress.
5. Pull the main branch to make sure that there is no
conflict with the current developments of the code.
6. Make sure that you modified appropriate section of
2. Install pre-commit using `pip install pre-commit`
3. Go to `spey-pyhf` main folder and type `pre-commit install`.
4. Open an issue and discuss the implementation with the developers.
5. Commit your changes to a feature branch on your fork and push all your changes.
6. Start a draft pull request and inform the developers about your progress.
7. Pull the ``main`` branch to ensure there are no conflicts with the current code developments.
8. Modify the appropriate section of
`docs/releases/changelog-dev.md`.
7. Once you are done, request one of the maintainers to review your PR.
9. Once complete, request a review from one of the maintainers.
3 changes: 3 additions & 0 deletions docs/releases/changelog-v0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
* Issue with implementing removed channels to the patch
([#16](https://github.com/SpeysideHEP/spey-pyhf/pull/16))

* Issue with the sorting of the removed channels.
([#17](https://github.com/SpeysideHEP/spey-pyhf/pull/17))

## Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with open("src/spey_pyhf/_version.py", encoding="UTF-8") as f:
version = f.readlines()[-1].split()[-1].strip("\"'")

requirements = ["pyhf==0.7.6", "spey>=0.1.9"]
requirements = ["pyhf==0.7.6", "spey>=0.1.11"]

docs = [
"sphinx==6.2.1",
Expand Down
2 changes: 1 addition & 1 deletion src/spey_pyhf/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of the spey - pyhf plugin"""

__version__ = "0.1.9"
__version__ = "0.1.10"
2 changes: 1 addition & 1 deletion src/spey_pyhf/helper_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def make_patch(self) -> List[Dict]:
else:
log.warning(f"Undefined channel in the patch set: {channel}")

to_remove.sort(key=lambda p: p["path"].split("/")[-1], reverse=True)
to_remove.sort(key=lambda p: int(p["path"].split("/")[-1]), reverse=True)

return patch + to_remove

Expand Down

0 comments on commit f676f77

Please sign in to comment.