tommyod / KDEpy

Kernel Density Estimation in Python
https://kdepy.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
584 stars 90 forks source link

Create Conda package for conda-forge #38

Open dmentipl opened 5 years ago

dmentipl commented 5 years ago

Hi @tommyod. First, thanks very much for KDEpy!

I use KDEpy as part of my smoothed particle hydrodynamics analysis and visualisation software Plonk (https://github.com/dmentipl/plonk). I use it for interpolation of particle quantities to a pixel grid, like in SPLASH (http://users.monash.edu.au/~dprice/splash/).

I have a Conda (https://docs.conda.io/en/latest/) package for Plonk on my channel on Anaconda Cloud (https://anaconda.org/dmentipl). I've also created a Conda package for KDEpy on my channel. However, I would like to put Plonk on conda-forge (https://conda-forge.org/). Typically, for a conda-forge package all dependencies are on conda-forge. Since I depend on KDEpy, I was wondering if you could put KDEpy on conda-forge. I think you would have to do this as you are the author and maintainer of KDEpy.

I have written a meta.yaml file for KDEpy; see below. This file is the file conda-build uses to build KDEpy into a Conda package. You can use this to build the Conda package with conda-build, and upload it to Anaconda Cloud. However, for conda-forge, the procedure seems to be:

  1. Fork https://github.com/conda-forge/staged-recipes.
  2. Add your "recipe".
  3. Issue pull request.

I've tested the build following instructions here (https://conda-forge.org/docs/maintainer/adding_pkgs.html#staging-test-locally), and it seems to work.

Let me know what you think and if you have any questions.

Regards, Daniel

meta.yaml

{% set name = "KDEpy" %}
{% set version = "1.0.2" %}

package:
  name: "{{ name|lower }}"
  version: "{{ version }}"

source:
  url: "https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz"
  sha256: "6ddeae3f5e20d195b4c60f3416dd8fec08838e16a6f3c8dc857a1fc28f0e58a9"

build:
  number: 0
  skip: True  # [py<35]
  script: "{{ PYTHON }} setup.py install --single-version-externally-managed --record=record.txt"

requirements:
  build:
    - {{ compiler('c') }}
  host:
    - cython
    - matplotlib >=2.2.0
    - numpy >=1.14.2
    - python
    - scipy >=1.0.1
  run:
    - matplotlib >=2.2.0
    - numpy >=1.14.2
    - python
    - scipy >=1.0.1

test:
  imports:
    - KDEpy

about:
  home: "https://github.com/tommyod/KDEpy"
  license: "GNU General Public v3 (GPLv3)"
  license_family: "GPL3"
  summary: "Kernel Density Estimation in Python."

extra:
  recipe-maintainers:
    - tommyod
tommyod commented 5 years ago

Thanks a lot for this @dmentipl . I will look into it and get back to you soon! :+1:

dmentipl commented 5 years ago

No worries. Thanks!

dmentipl commented 4 years ago

Hi @tommyod, just to let you know, I no longer use KDEpy in Plonk.

I have realized that I require variable bandwidth KDE, plus I need to use the FFT version for performance. So, I have implemented the algorithms I require in Python, compiled with Numba.

As such I no longer need KDEpy to be a conda-forge package. However, I think KDEpy is excellent software, and it would be worthwhile to put it on conda-forge. I'm happy to help with that if you need. But feel free to close this issue if you prefer.

tommyod commented 4 years ago

Thanks for the update! I still want it up on conda forge, but haven't had the time to look at it. I'll keep it issue open. Where is your KDE code? I'd like to take a look.

dmentipl commented 4 years ago

My code is available here.

It's not a general KDE code. I've re-implemented the interpolation subroutines from SPLASH. Interpolating particle data to a pixel grid is the typical method to visualize smoothed particle hydrodynamics simulations. See the SPLASH paper for the technical details.

syrte commented 3 years ago

My code is available here.

It's not a general KDE code. I've re-implemented the interpolation subroutines from SPLASH. Interpolating particle data to a pixel grid is the typical method to visualize smoothed particle hydrodynamics simulations. See the SPLASH paper for the technical details.

To who is curious about the above link (like me), it was moved to https://github.com/dmentipl/plonk/blob/main/src/plonk/visualize/splash.py