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 a recipe for pydata/sparse #5631

Merged
merged 11 commits into from
Apr 16, 2018
Merged

Conversation

hameerabbasi
Copy link
Contributor

@hameerabbasi hameerabbasi commented Apr 11, 2018

This is to add a recipe for pydata/sparse.

As an aside, can we install the requirements for py.test and run it as a command, if possible?

Edit: And how do I specify minimum versions?

@conda-forge-linter
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/sparse) and found it was in an excellent condition.

- pip
run:
- python
- numpy >= 1.14
Copy link
Member

Choose a reason for hiding this comment

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

remove the space between the logical sign and the version number, i.e:

   - numpy >=1.14

description: |
sparse implements sparse multidimensional arrays on top of Numpy
and scipy.sparse. It tries to mimic Numpy's ndarray API.
doc_url: https://sparse.pydata.org/en/0.3.0/
Copy link
Member

Choose a reason for hiding this comment

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

Maybe drop the version number from the doc_url? I'm afraid it might not get updated when the recipe does since it's buried far down in the recipe.

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 could, but since this package is currently not mature I expect the information on there to get out of sync with what's in the recipe quite quickly, which is why I added a link to the release version.

extra:
recipe-maintainers:
- hameerabbasi
- mrocklin
Copy link
Member

Choose a reason for hiding this comment

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

@mrocklin -- are ok with being a co-maintainer of the sparse recipe on conda-forge?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I am ok with being a co-maintainer of the sparse package on conda-forge.

Additionally lets ping @jakevdp to see if he is interested.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, sounds good

- scipy >= 0.19
- numba >= 0.37

test:
Copy link
Member

Choose a reason for hiding this comment

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

You can run pytest here using the command section of test:

https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#test-commands

You'll need to add pytest and any other testing-only requirement in the requires section:

https://conda.io/docs/user-guide/tasks/build-packages/define-metadata.html#test-requirements

Also being able to run the test suite depends on the test files being included in the source distribution.

@hameerabbasi
Copy link
Contributor Author

Well, this is weird. Do I need to add all requirements to the test section? It seems it can't import Numpy, even though Numpy is in the run section. Should I move it to build?

@synapticarbors
Copy link
Member

Anything in the run section should automatically be available in the test section. I think you need numpy in the build section since in the setup.py you import the package which will necessitate all of the run dependencies. Doesn't look like that happens once you switch to the version that uses versioneer.

@synapticarbors
Copy link
Member

You're going to want the requirements under both build and run; they'll just duplicated.

@jakevdp
Copy link
Contributor

jakevdp commented Apr 12, 2018

Looks like the MANIFEST.in in the package needs to be updated: it specifies LICENSE.txt rather than LICENSE.rst, and so the license file is not included in the distribution available on PyPI https://github.com/pydata/sparse/blob/master/MANIFEST.in

@hameerabbasi
Copy link
Contributor Author

I pushed 0.3.1 to PyPI with an updated MANIFEST.in. Unfortunately, it seems RTD isn't picking up the tag/building documentation.

@hameerabbasi
Copy link
Contributor Author

Hmm. It seems I need to run py.test in another directory... Can someone point me how to cd into the package directory?

- pytest-cov
- pytest-flake8
commands:
- py.test
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps py.test sparse ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I may be mistaken, but I think the preference is to not run full test suites as part of a conda-forge recipe, because it eats up too many CI resources.

Copy link
Contributor

@jakevdp jakevdp Apr 13, 2018

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fair enough. I'll just take out the test and we'll do the testing on our own CI.

@hameerabbasi
Copy link
Contributor Author

hameerabbasi commented Apr 15, 2018

@synapticarbors I apologize for this, but could you either merge or re-trigger Travis? The failure seems to be related to not being able to download the package, and it downloaded fine in the other CI services.

@jakevdp
Copy link
Contributor

jakevdp commented Apr 15, 2018

I restarted the Travis build

@hameerabbasi
Copy link
Contributor Author

hameerabbasi commented Apr 15, 2018

Another intermittent error. 😐

Edit: And a different one at that. Best to wait a bit I guess. Travis might be having issues.

@jakirkham
Copy link
Member

jakirkham commented Apr 16, 2018

Anything in the run section should automatically be available in the test section. I think you need numpy in the build section since in the setup.py you import the package which will necessitate all of the run dependencies. Doesn't look like that happens once you switch to the version that uses versioneer.

This shouldn't be needed any more now that it is not importing the package, correct?

@hameerabbasi
Copy link
Contributor Author

hameerabbasi commented Apr 16, 2018

Unfortunately, the release version is still doing that. I'm hesitating on releasing now because we made some backwards incompatible changes (feature removals) I need to clean up and add back with new logic.

@jakevdp
Copy link
Contributor

jakevdp commented Apr 16, 2018

Looks good to me. 👍 for merge

@jakirkham
Copy link
Member

FWIW was able to build locally when dropping basically everything from build except python and pip.

@jakevdp
Copy link
Contributor

jakevdp commented Apr 16, 2018

That makes sense: I think numpy, scipy, and numba can be removed from build_deps. If you look at the v0.3.1 setup.py file you can see that it doesn't import those or import anything that uses those.

@hameerabbasi
Copy link
Contributor Author

Ah, you're both right. I removed those from the build deps, and I also removed numba as it was introduced as a dependency after 0.3.1.

@jakirkham
Copy link
Member

Do you still want to wait on this or is it good to merge?

@hameerabbasi
Copy link
Contributor Author

+1 to merge from me. 😄

@jakirkham jakirkham merged commit 7ce0cf9 into conda-forge:master Apr 16, 2018
@jakirkham
Copy link
Member

Sorry for the delay. Thanks also for your patience. This is now in a feedstock with builds triggered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants