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 meta #51349

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add meta #51349

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions recipes/meta/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

unset LD LINK ARCH
export CMAKE_INSTALL_RPATH='$ORIGIN/../lib'
export CMAKE_BUILD_WITH_INSTALL_RPATH=ON

mkdir -p "$PREFIX/bin"
mkdir -p "$PREFIX/lib"
mkdir -p "$PREFIX/share"
mkdir -p $SRC_DIR/build
cd $SRC_DIR/build || exit 1

cmake -S $SRC_DIR -B $SRC_DIR/build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_MODULE_PATH=$PREFIX/share/cmake \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DCMAKE_INSTALL_RPATH=$CMAKE_INSTALL_RPATH \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=$CMAKE_BUILD_WITH_INSTALL_RPATH

cmake --build . --config Release || exit 1
cmake --install . || exit 1
rm -rf $SRC_DIR/build

# Install MeTA package
cd ${SRC_DIR} || exit 1
${PYTHON} -m pip install . --no-deps -vv || exit 1
9 changes: 9 additions & 0 deletions recipes/meta/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
build_variant:
- "osmesa" # [linux]
- "qt" # [osx]

python:
- 3.8
- 3.9
- 3.10
- 3.11
92 changes: 92 additions & 0 deletions recipes/meta/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{% set name = "meta" %}
{% set version = "1.0.0" %}
{% set sha256 = "96673754c8f8c926bd179a824513de36d0b361eb93b1f7781cbac27ecf520d6e" %}

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

source:
url: https://github.com/bagari/meta/archive/refs/tags/v{{ version }}.tar.gz
sha256: {{ sha256 }}
bagari marked this conversation as resolved.
Show resolved Hide resolved

build:
number: 0
skip: true # [win] # Windows support will be added in next release.

requirements:
build:
- {{ compiler('cxx') }}
- {{ stdlib("c") }}
- cmake
- make # [not win]
- python {{ python }}
- pip
- git
- setuptools
- boost =1.82
- itk ==5.3.0
- libitk ==5.3.0
- libitk-devel ==5.3.0
- hdf5 >=1.14.2,<1.14.3.0a0
- vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}*
- libexpat <2.6
- libexpat >=2.5.0,<3.0a0
- vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}*

host:
- qhull
- boost =1.82
- itk ==5.3.0
- libitk ==5.3.0
- libitk-devel ==5.3.0
- hdf5 >=1.14.2,<1.14.3.0a0
- vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}*
- python {{ python }}
- libexpat <2.6
- libexpat >=2.5.0,<3.0a0
- vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}*

run:
- qhull
- boost =1.82
- itk ==5.3.0
- libitk ==5.3.0
- libitk-devel ==5.3.0
- hdf5 >=1.14.2,<1.14.3.0a0
- vtk-base >=9.2.6,<9.3.0 build=*{{ build_variant }}*
- python {{ python }}
- numpy
- setuptools
- nibabel
- pandas
- pyvista
- scipy
- tqdm
- tslearn
- dipy
- libexpat <2.6
- libexpat >=2.5.0,<3.0a0
- vtk-io-ffmpeg >=9.2.6,<9.3.0 build=*{{ build_variant }}*
Comment on lines +17 to +70
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider optimizing dependency management

The requirements section is comprehensive, but there might be room for optimization:

  1. Some dependencies (e.g., boost, itk, hdf5, vtk-base) are repeated across build, host, and run sections with the same version constraints. Consider using conda-forge's run_exports feature to reduce redundancy.

  2. The libexpat dependency has two entries with overlapping version ranges. These could potentially be combined into a single entry.

  3. Ensure that all listed dependencies are necessary for each stage (build, host, run). For example, does the package really need git at build time?

Review each dependency and its presence in different sections. If you need assistance in optimizing this section, please let me know.


test:
imports:
- meta
commands:
- meta --help
- cmrep_vskel --version
- vtklevelset --version
Comment on lines +72 to +78
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Enhance test robustness

The test section includes both import and command-line tests, which is good. However, consider the following improvements based on past review suggestions:

  1. For command-line tests, instead of just running with --help or --version, check for specific expected output:
  commands:
    - meta --help 2>&1 | grep -q "Usage:" || exit 1
    - cmrep_vskel --version 2>&1 | grep -q "version" || exit 1
    - vtklevelset --version 2>&1 | grep -q "version" || exit 1
  1. Add more comprehensive import tests to ensure all main modules are importable.

  2. Consider adding functional tests that exercise core features of the package.

Would you like assistance in implementing these test improvements?


about:
home: https://github.com/bagari/meta
license: BSD-3-Clause
license_file: LICENSE.txt
summary: 'Medial Tractography Analysis (MeTA)'
description: |
MeTA is a workflow implemented to minimize microstructural heterogeneity in diffusion MRI (dMRI) metrics by extracting and parcellating the core volume along the bundle length in the voxel-space directly while effectively preserving bundle shape and efficiently capturing the regional variation within and along white matter (WM) bundles.
dev_url: https://github.com/bagari/meta
doc_url: https://github.com/bagari/meta/wiki

extra:
recipe-maintainers:
- bagari
Loading