digital-science / dimcli

Python client and CLI for scientometrics and research analytics using the Dimensions API.
https://digital-science.github.io/dimcli/getting-started.html
MIT License
43 stars 6 forks source link

Add package to conda-forge #74

Closed giswqs closed 2 years ago

giswqs commented 2 years ago

Any plan to add the package to conda-forge? I can't add dimcli as a package dependency until it is available on conda-forge. https://github.com/conda-forge

lambdamusic commented 2 years ago

Hi, I'm not familiar with conda-forge, how would that work?

giswqs commented 2 years ago

Conda-forge is a community-led collection of recipes, build infrastructure, and distributions for the conda package manager. Package available on conda-forge can be installed using conda install pkg-name -c conda-forge. Almost all the popular Python packages available on PyPI are also available on conda-forge. You can check https://anaconda.org/conda-forge/repo for the tens of thousands of Python packages. Check the link here for instructions on how to submit a package to conda-forge. I also have a video tutorial here showing step-by-step how to do it.

sugatoray commented 2 years ago

@giswqs I just added dimcli to conda-forge. (PR: https://github.com/conda-forge/staged-recipes/pull/17275)

image

sugatoray commented 2 years ago

@lambdamusic Since, now dimcli is directly available on conda-forge, it can be installed with:

conda install -c conda-forge dimcli

And docs should be updated. (Installation)

image

giswqs commented 2 years ago

@sugatoray That's great. Thanks.

I saw you use a workaround for requirements.txt. This file should also be included in the the PyPI source distribution as I mentioned in https://github.com/digital-science/dimcli/issues/75. It needs to be fixed by the dimcli developers.

sugatoray commented 2 years ago

@lambdamusic I would request you to add the following to the repository readme, if possible.

Installation

with pip

pip install dimcli -U

with conda

conda install -c conda-forge dimcli
sugatoray commented 2 years ago

@giswqs

It needs to be fixed by the dimcli developers.

Completely agree with you on this. The workaround is to get the library up into conda-forge. But so far python packaging is concerned, requirements.txt must be included in the source. And this needs to happen upstream (here by the devs/maintainers of dimcli).

sugatoray commented 2 years ago

cc: @giswqs @lambdamusic

The reason, why it is necessary to include the requirements.txt (reqflie) file in the source (on PyPI), is as you see below. The code here is dynamically fetching the contents of the reqfile and then preparing a list of requirements (REQUIREMENTS_DATA), followed by finally feeding it to setup.py:install_requires on line 61.

https://github.com/digital-science/dimcli/blob/36382e2933ece95baa02220f119da31c03f455f9/setup.py#L36-L44

https://github.com/digital-science/dimcli/blob/36382e2933ece95baa02220f119da31c03f455f9/setup.py#L58-L63

lambdamusic commented 2 years ago

Documentation updated: https://digital-science.github.io/dimcli/getting-started.html#installation

Thanks to both for the help! I'll look at the requirements.txt issue later..