Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into more-pixi
Browse files Browse the repository at this point in the history
  • Loading branch information
bollwyvl committed Nov 19, 2024
2 parents 88274ef + c94d00a commit a8d7d14
Show file tree
Hide file tree
Showing 7 changed files with 153 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .scripts/run_win_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@ cd ..
if not exist "%CONDA_BLD_PATH%\win-64\" mkdir "%CONDA_BLD_PATH%\win-64\"
if not exist "%CONDA_BLD_PATH%\win-arm64\" mkdir "%CONDA_BLD_PATH%\win-arm64\"
if not exist "%CONDA_BLD_PATH%\noarch\" mkdir "%CONDA_BLD_PATH%\noarch\"
:: Make sure CONDA_BLD_PATH is a valid channel; only do it if noarch/repodata.json doesn't exist
:: to save some time running locally
if not exist "%CONDA_BLD_PATH%\noarch\repodata.json" conda index "%CONDA_BLD_PATH%"

echo Index %CONDA_BLD_PATH%
conda.exe index "%CONDA_BLD_PATH%"
Expand Down
2 changes: 1 addition & 1 deletion build-locally.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def setup_environment(ns):

# The default cache location might not be writable using docker on macOS.
if ns.config.startswith("linux") and platform.system() == "Darwin":
os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = "-e XDG_CACHE_HOME=/tmp/rattler_cache"
os.environ["CONDA_FORGE_DOCKER_RUN_ARGS"] = "-e RATTLER_CACHE_DIR=/tmp/rattler_cache"


def run_docker_build(ns):
Expand Down
2 changes: 2 additions & 0 deletions recipes/r-glmtrans/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"%R%" CMD INSTALL --build . %R_ARGS%
IF %ERRORLEVEL% NEQ 0 exit /B 1
3 changes: 3 additions & 0 deletions recipes/r-glmtrans/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
export DISABLE_AUTOBREW=1
${R} CMD INSTALL --build . ${R_ARGS}
72 changes: 72 additions & 0 deletions recipes/r-glmtrans/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{% set version = "2.0.0" %}
{% set posix = 'm2-' if win else '' %}

package:
name: r-glmtrans
version: {{ version|replace("-", "_") }}

source:
url:
- {{ cran_mirror }}/src/contrib/glmtrans_{{ version }}.tar.gz
- {{ cran_mirror }}/src/contrib/Archive/glmtrans/glmtrans_{{ version }}.tar.gz
sha256: 43fa44945db364fbf3ad943d66b5303c58e70bc501d458ede0b35b9973f8a981

build:
number: 0
noarch: generic
rpaths:
- lib/R/lib/
- lib/

requirements:
build:
- {{ posix }}zip # [win]
host:
- r-base
- r-glmnet
- r-ggplot2
- r-foreach
- r-doparallel
- r-caret
- r-assertthat
- r-formatr
run:
- r-base
- r-glmnet
- r-ggplot2
- r-foreach
- r-doparallel
- r-caret
- r-assertthat
- r-formatr

test:
commands:
- $R -e "library('glmtrans')" # [not win]
- "\"%R%\" -e \"library('glmtrans')\"" # [win]

about:
home: https://CRAN.R-project.org/package=glmtrans
license: GPL-2.0-only
summary: Transfer Learning under Regularized Generalized Linear Models.
license_family: GPL2
license_file:
- {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
recipe-maintainers:
- conda-forge/r
- mlondschien

# Package: glmtrans
# Title: Search Contributed R Packages, Sort by Package
# Version: 2.0-0
# Author: Ye Tian [aut, cre], Yang Feng [aut]
# Maintainer: Ye Tian <ye.t at columbia.edu>
# Description: Transfer Learning under Regularized Generalized Linear Models
# License: GPL-2
# Depends: R (>= 3.5.0)
# Imports: glmnet, ggplot2, foreach, doParallel, caret, assertthat, formatR, stats
# Suggests: knitr, rmarkdown
# Repository: CRAN
# NeedsCompilation: no
62 changes: 62 additions & 0 deletions recipes/torchkbnufft/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{% set name = "torchkbnufft" %}
{% set version = "1.4.0" %}

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

source:
url: https://pypi.org/packages/source/{{ name[0] }}/{{ name }}/torchkbnufft-{{ version }}.tar.gz
sha256: 29d93c1299f888f1d7f14f2de5e85d6461785299046a04483abb6134287b716c
patches:
# lets tests pass with numpy 2.0, see https://github.com/mmuckley/torchkbnufft/pull/100
# Todo: remove patch once https://github.com/mmuckley/torchkbnufft/pull/100 is released upstream
- patches/0001-conftest-np-2-0.patch

build:
noarch: python
script: {{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation
number: 0

requirements:
host:
- python {{ python_min }}
- setuptools-scm >=6.3.2
- setuptools >=59.5.0
- wheel >=0.37.0
- pip
run:
- python >={{ python_min }}
- numpy >=1.22.4,<3.0a0
- scipy >=1.8.1,<2.0a0
- pytorch >=1.12,<3.0a0

test:
imports:
- torchkbnufft
source_files:
- tests
- notebooks
commands:
- pip check
- pytest tests
# omits Toeplitz Example: pytorch 2.0, see https://github.com/mmuckley/torchkbnufft/issues/98
- pytest --nbmake "notebooks/Basic Example.ipynb" "notebooks/SENSE Example.ipynb" "notebooks/Sparse Matrix Example.ipynb"
requires:
- python {{ python_min }}
- pip
- pytest
- matplotlib
- nbmake

about:
summary: A high-level, easy-to-deploy non-uniform Fast Fourier Transform in PyTorch.
home: https://github.com/mmuckley/torchkbnufft
dev_url: https://github.com/mmuckley/torchkbnufft
doc_url: https://torchkbnufft.readthedocs.io/en/stable/
license: MIT
license_file: LICENSE

extra:
recipe-maintainers:
- gabuzi
13 changes: 13 additions & 0 deletions recipes/torchkbnufft/patches/0001-conftest-np-2-0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/tests/conftest.py b/tests/conftest.py
index 1ac5f13..1df4a85 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -26,7 +26,7 @@ def test_params():


def create_input_plus_noise(shape, is_complex):
- x = np.arange(np.product(shape)).reshape(shape)
+ x = np.arange(np.prod(shape)).reshape(shape)
x = torch.tensor(x, dtype=torch.get_default_dtype())

if is_complex:

0 comments on commit a8d7d14

Please sign in to comment.