Skip to content

ENH: Add py-flowy #30704

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

ENH: Add py-flowy #30704

wants to merge 7 commits into from

Conversation

HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Aug 2, 2025

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@HaoZeke
Copy link
Member Author

HaoZeke commented Aug 2, 2025

@amritagos @MSallermann can you confirm that you'll be co-maintainers for the conda-forge recipe?

Copy link
Contributor

github-actions bot commented Aug 2, 2025

Hi! This is the staged-recipes linter and I found some lint.

It looks like some changes were made outside the recipes/ directory. To ensure everything runs smoothly, please make sure that recipes are only added to the recipes/ directory and no other files are changed.

If these changes are intentional (and you aren't submitting a recipe), please add a maintenance label to the PR.

File-specific lints and/or hints:

  • conda_build_config.yaml:
    • lints:
      • Do not edit files outside of the recipes/ directory.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/pyflowy/meta.yaml) and found some lint.

Here's what I've got...

For recipes/pyflowy/meta.yaml:

  • ❌ Non noarch packages should have python requirement without any version constraints.
  • ❌ Non noarch packages should have python requirement without any version constraints.
  • ❌ This recipe is using a compiler, which now requires adding a build dependence on {{ stdlib("c") }} as well. Note that this rule applies to each output of the recipe using a compiler. For further details, please see META: {{ stdlib("c") }} migration conda-forge.github.io#2102.
  • ❌ In your conda_build_config.yaml, please change the name of MACOSX_DEPLOYMENT_TARGET, to c_stdlib_version!

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/16694841401. Examine the logs at this URL for more detail.

@MSallermann
Copy link

@amritagos @MSallermann can you confirm that you'll be co-maintainers for the conda-forge recipe?

Yes, I can confirm :)

@amritagos
Copy link

@amritagos @MSallermann can you confirm that you'll be co-maintainers for the conda-forge recipe?

Sure, I'll confirm! Thanks! :)

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/pyflowy/meta.yaml) and found it was in an excellent condition.

Copy link
Contributor

github-actions bot commented Aug 2, 2025

Hi! This is the staged-recipes linter and your PR looks excellent! 🚀

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/pyflowy/recipe.yaml) and found some lint.

Here's what I've got...

For recipes/pyflowy/recipe.yaml:

  • requirements: build: xtensor < 0.25.0 should not contain a space between relational operator and the version, i.e. xtensor <0.25.0

For recipes/pyflowy/recipe.yaml:

  • ℹ️ Jinja2 variable references are suggested to take a ${{<one space><variable name><one space>}} form. See lines [38].

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/16695590029. Examine the logs at this URL for more detail.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/pyflowy/recipe.yaml) and found it was in an excellent condition.

@HaoZeke
Copy link
Member Author

HaoZeke commented Aug 2, 2025

Same error as #30703 (comment)

1 warning and 20 errors generated.
 │ │   [6/9] Compiling C++ object subprojects/flowy/libflowy.dylib.p/src_topography.cpp.o
 │ │   FAILED: [code=1] subprojects/flowy/libflowy.dylib.p/src_topography.cpp.o
 │ │   x86_64-apple-darwin13.4.0-clang++ -Isubprojects/flowy/libflowy.dylib.p -Isubprojects/flowy -I../subprojects/flowy -I../subprojects/flowy/thirdparty/tsl -Isubprojects/pdf_cpplib -I../subprojects/pdf_cpplib -I$PREFIX/include -I$BUILD_PREFIX/include -fvisibility=hidden -fvisibility-inlines-hidden -fdiagnostics-color=always -DNDEBUG -Wall -Winvalid-pch -Wextra -Wpedantic -std=c++20 -O3 -g -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/pyflowy-0.0.1 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -D_FORTIFY_SOURCE=2 -isystem $PREFIX/include -mmacosx-version-min=10.13 -mmacosx-version-min=10.13 -Wno-unused-local-typedefs -Wno-array-bounds -ffast-math -fno-finite-math-only -fno-plt -Bsymbolic -DWITH_NETCDF -MD -MQ subprojects/flowy/libflowy.dylib.p/src_topography.cpp.o -MF subprojects/flowy/libflowy.dylib.p/src_topography.cpp.o.d -o subprojects/flowy/libflowy.dylib.p/src_topography.cpp.o -c ../subprojects/flowy/src/topography.cpp
 │ │   In file included from ../subprojects/flowy/src/topography.cpp:3:
 │ │   In file included from ../subprojects/flowy/flowy/include/topography.hpp:8:
 │ │   $BUILD_PREFIX/include/xtensor/xsort.hpp:297:27: warning: unused parameter 'data_end' [-Wunused-parameter]
 │ │     297 |             ConstRandomIt data_end,
 │ │         |                           ^
 │ │   In file included from ../subprojects/flowy/src/topography.cpp:4:
 │ │   In file included from ../subprojects/flowy/flowy/include/asc_file.hpp:4:
 │ │   ../subprojects/flowy/flowy/include/topography_file.hpp:33:65: error: 'path' is unavailable: introduced in macOS 10.15 unknown - see https://conda-forge.org/docs/maintainer/knowledge_base.html#newer-c-features-with-old-sdk
 │ │      33 |     std::filesystem::path handle_suffix( const std::filesystem::path & path_in )
 │ │         |                                                              

Upstream doesn't yet support macos either (officially, the pypi packages are not for macos either). For later.

@conda-forge-admin
Copy link
Contributor

conda-forge-admin commented Aug 2, 2025

Hi! This is the friendly automated conda-forge-linting service.

I failed to even lint the recipe, probably because of a conda-smithy bug 😢. This likely indicates a problem in your meta.yaml, though. To get a traceback to help figure out what's going on, install conda-smithy and run conda smithy recipe-lint --conda-forge . from the recipe directory. You can also examine the workflow logs for more detail.

This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/16698483837. Examine the logs at this URL for more detail.

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/pyflowy/recipe.yaml) and found it was in an excellent condition.

@HaoZeke
Copy link
Member Author

HaoZeke commented Aug 2, 2025

@conda-forge/help-python-c, ready for review!

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Copy link
Member

Choose a reason for hiding this comment

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

You should remove this file since it is included in the source distribution and conda/rattler will pick it up from there.

tests:
- python:
imports:
- pyflowy
Copy link
Member

Choose a reason for hiding this comment

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

you can remove the script section below and just add
pip_check: true. See:
https://rattler.build/latest/reference/recipe_file/#python-tests

context:
name: pyflowy
version: 0.0.1
build_num: 0
Copy link
Member

Choose a reason for hiding this comment

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

Instead of using context to set jinja variables for build_num and shasum, just set them explicitly below.


build:
skip:
- if: python < 3.9
Copy link
Member

Choose a reason for hiding this comment

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

Technically you don't need to have the python < 3.9 check since conda-forge only builds packages for python >=3.9

- win
- osx
number: ${{ build_num }}
string: h${{ hash }}_${{ build_num }}
Copy link
Member

Choose a reason for hiding this comment

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

Don't set the build string. That's created automatically.

- pybind11 >=2.12.0
- libnetcdf
- hdf5
- ${{ pin_compatible('numpy') }}
Copy link
Member

Choose a reason for hiding this comment

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

You can just change this to numpy. `pin_compatible is no longer needed:
https://conda-forge.org/docs/maintainer/knowledge_base/#building-against-numpy

I like to still include numpy explicitly in run, even though there is a run_exports from the numpy package.

@@ -0,0 +1,5 @@
c_stdlib_version:
Copy link
Member

Choose a reason for hiding this comment

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

Unless there is a good reason to specify this, it is best to just use the conda-forge defaults. My suggestion would be to delete this file.

- numpy
- libnetcdf
- hdf5
- ${{ compiler('c') }}
Copy link
Member

Choose a reason for hiding this comment

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

compiler(...) should go up in the build section. I believe host and build should be reorganized. There's several things that should be in the build_platform != target_platform section. The following recipe might be a good guide:
https://github.com/conda-forge/matplotlib-feedstock/blob/5da242b3aa49613299e2bc176011d22aac266bf3/recipe/meta.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants