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

build: Add numpy as a dependency explicitly #2041

Merged
merged 1 commit into from
Oct 10, 2022

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Oct 5, 2022

Description

Add numpy explicitly as a dependency of pyhf. As the lower bound (and upper bound) of numpy is tightly controlled by scipy a lower bound is not given to avoid potential future confusion for pip's dependency resolver. Explicitly adding numpy as a dependency improves the metadata for packaging. e.g. pip show will now list numpy under the 'Requires' output.

Note that no more information is contained with this addition, but it provides additional context to metadata inspection.

Before

$ python -m pip show pyhf             
Name: pyhf
Version: 0.7.1.dev5
Summary: pure-Python HistFactory implementation with tensors and autodiff
Home-page: https://github.com/scikit-hep/pyhf
Author: Lukas Heinrich, Matthew Feickert, Giordon Stark
Author-email: lukas.heinrich@cern.ch, matthew.feickert@cern.ch, gstark@cern.ch
License: Apache
Location: /home/feickert/.pyenv/versions/3.10.6/envs/pyhf-dev-CPU/lib/python3.10/site-packages
Requires: click, jsonpatch, jsonschema, pyyaml, scipy, tqdm
Required-by: 

This PR

$ python -m pip show pyhf    
Name: pyhf
Version: 0.7.1.dev6
Summary: pure-Python HistFactory implementation with tensors and autodiff
Home-page: https://github.com/scikit-hep/pyhf
Author: Lukas Heinrich, Matthew Feickert, Giordon Stark
Author-email: lukas.heinrich@cern.ch, matthew.feickert@cern.ch, gstark@cern.ch
License: Apache
Location: /home/feickert/.pyenv/versions/3.10.6/envs/pyhf-dev-CPU/lib/python3.10/site-packages
Requires: click, jsonpatch, jsonschema, numpy, pyyaml, scipy, tqdm
Required-by: 

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 numpy explicitly as a dependency of pyhf. As the lower bound (and upper bound)
  of numpy is tightly controlled by scipy a lower bound is not given to avoid potential
  future confusion for pip's dependency resolver. Explicitly adding numpy as a dependency
  improves the metadata for packaging. e.g. `pip show` will now list numpy under the
  'Requires' output.

* Add numpy explicitly as a dependency of pyhf. As the lower bound
  (and upper bound) of numpy is tightly controlled by scipy a lower
  bound is not given to avoid potential future confusion for pip's
  dependency resolver. Explicitly adding numpy as a dependency improves
  the metadata for packaging. e.g. `pip show` will now list numpy under
  the 'Requires' output.
@matthewfeickert matthewfeickert added docs Documentation related build Changes that affect the build system or external dependencies dependencies Pull requests that update a dependency file labels Oct 5, 2022
@matthewfeickert matthewfeickert self-assigned this Oct 5, 2022
@codecov
Copy link

codecov bot commented Oct 5, 2022

Codecov Report

Base: 98.30% // Head: 98.30% // No change to project coverage 👍

Coverage data is based on head (8c0b95f) compared to base (eac527e).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2041   +/-   ##
=======================================
  Coverage   98.30%   98.30%           
=======================================
  Files          69       69           
  Lines        4530     4530           
  Branches      645      645           
=======================================
  Hits         4453     4453           
  Misses         45       45           
  Partials       32       32           
Flag Coverage Δ
contrib 27.52% <ø> (ø)
doctest 61.14% <ø> (ø)
unittests-3.10 96.31% <ø> (ø)
unittests-3.7 96.28% <ø> (ø)
unittests-3.8 96.33% <ø> (ø)
unittests-3.9 96.35% <ø> (ø)

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

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@matthewfeickert matthewfeickert merged commit 3042b27 into main Oct 10, 2022
@matthewfeickert matthewfeickert deleted the build/explicitly-add-numpy branch October 10, 2022 16:15
matthewfeickert added a commit that referenced this pull request Oct 23, 2022
…2050)

* Add numpy metadata information to codemeta.json.
   - Amends PR #2041
* Update lower bound on scipy to v1.3.2 and remove typing-extensions.
   - Amends PR #2044
* Update codemetapy lower bound to v2.3.0 to ensure consistency of output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system or external dependencies dependencies Pull requests that update a dependency file docs Documentation related
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants