aiidalab / aiidalab-widgets-base

Reusable widgets for AiiDAlab applications
MIT License
7 stars 17 forks source link

Publish AWB on conda-forge #595

Closed danielhollas closed 4 months ago

danielhollas commented 7 months ago

Just pasting here a handy guide how to create new conda-forge packages.

https://www.pyopensci.org/python-package-guide/tutorials/publish-conda-forge.html

danielhollas commented 7 months ago

I tried to generate a recipe with greyskull and it looks promising!

$ pipx install grayskull
$ grayskull pypi aiidalab-widgets-base
#### Initializing recipe for aiidalab-widgets-base (pypi) ####

Recovering metadata from pypi...
Starting the download of the sdist package aiidalab-widgets-base
aiidalab-widgets-base 100% Time:  0:00:00   3.2 MiB/s|###################################################################################|
Checking for pyproject.toml
pyproject.toml found in /tmp/grayskull-aiidalab-widgets-base-c9exif_i/aiidalab_widgets_base-2.2.0/pyproject.toml
Recovering information from setup.py
Executing injected distutils...
Recovering metadata from setup.cfg
Checking >> pandas 100% |#########################################################################################|[Elapsed Time: 0:00:11]
Recovering license info from spdx.org ...
Matching license file with database from Grayskull...
Match percentage of the license is 96%. Low match percentage could mean that the license was modified.
License type: MIT
License file: ['LICENSE.txt']
Build requirements:
  <none>
Host requirements:
  - python >=3.9
  - setuptools >=42
  - wheel
  - pip
Run requirements:
  - python >=3.9
  - pycifrw >=4.4,<5.dev0
  - aiida-core >=2.1,<3
  - aiidalab >=21.11.2
  - **aiidalab-eln >=0.1.2,>=0.1,<1.dev0**  THIS ONE IS RED
  - ansi2html >=1.6,<2.dev0
  - ase >=3.18,<4.dev0
  - bokeh >=2.0,<3.dev0
  - humanfriendly >=10.0,<11.dev0
  - ipytree >=0.2,<1.dev0
  - traitlets >=5.9.0,<5.10.dev0
  - ipywidgets >=7.7,<8.dev0
  - widgetsnbextension <3.6.3
  - more-itertools >=8.0,<9.dev0
  - pymysql >=0.9,<1.dev0
  - nglview >=3.0,<4.dev0
  - spglib >=1.14,<3
  - vapory >=0.1.2,<0.2.dev0
  - pandas >=2.1,<3.dev0

RED: Package names not available on conda-forge
YELLOW: PEP-725 PURLs that did not map to known package
GREEN: Packages available on conda-forge

The only thing that is missing on conda-forge is aiidalab-eln. I would lean towards making it an optional dependency as extras, in the same way we currently have optional extras for smiles and optimade widgets.

yakutovicha commented 6 months ago

The only thing that is missing on conda-forge is aiidalab-eln. I would lean towards making it an optional dependency as extras, in the same way we currently have optional extras for smiles and optimade widgets.

I was thinking of doing the same. Feel free to make a PR 👍

danielhollas commented 6 months ago

@yakutovicha thanks. Happy to make a PR, but as I was looking through the code, I was wondering if this needs to be part of AWB at all, especially if we're going to make AWB only a library.

Admittedly I know nothing about how this is used, but the code in aiidalab_widgets_base/elns.py does not use any of the other parts of AWB, and so it's completely independent. Should it be turned into its own library or app? Should it be part of aiidalab-eln?

danielhollas commented 4 months ago

I had two hours on the airport so I just decided to go for it. :sweat_smile: I published a new pre-release version which allowed me to generate a valid conda-forge recipe with grayskull. I've opened a PR on staged-recipes. https://github.com/conda-forge/staged-recipes/pull/26882

@yakutovicha @unkcpz could you please comment on that PR that you are okay with being added maintainers?

There is still some work left around dependencies, since pip check is failing after the conda install. Will continue to work on that.

unkcpz commented 4 months ago

@yakutovicha @unkcpz could you please comment on that PR that you are okay with being added maintainers?

I am fine with it, thanks for adding me.

danielhollas commented 4 months ago

To clarify, you have to make a comment on the PR for staged-recipes, it's part of their checklist.

unkcpz commented 4 months ago

you have to make a comment on the PR for staged-recipes, it's part of their checklist.

So we are good now?

danielhollas commented 4 months ago

So we are good now?

You need to make a comment on the PR :-P Here is the link https://github.com/conda-forge/staged-recipes/pull/26882

unkcpz commented 4 months ago

Ah, sorrry, I though this is the PR :smile:

danielhollas commented 4 months ago

The recipe has been merged and AWB is not on conda-forge! :tada: https://github.com/conda-forge/aiidalab-widgets-base-feedstock

For now @unkcpz and I are the feedstock maintainers. It would be nice to have at least one more person. (@edan-bainglass LMK in case you have experience with conda-forge :-) )

I've opened a testing PR for integrating AWB into the docker stack. https://github.com/aiidalab/aiidalab-docker-stack/pull/483

Closing this issue.