-
Notifications
You must be signed in to change notification settings - Fork 4
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
Adds Graphflood binding #57
Conversation
Hi @wkearn , I am back to work and updated that branch to upstream. |
@bgailleton: I think we added lints with |
Did you want If that script is meant to be documentation, we can turn it into a Jupyter notebook and include it with our other example notebooks, and either upload your Green River example to our DEM repository or use one of the DEMs we already have. |
OK, thanks for the quick reply. |
Yes, if you run
It is fine to just rename that file for now. If you want, once I merge this, I can turn it into a Jupyter notebook just so we have something, and you can add or change it later.
This is a good question, which I haven't thought enough about. Generally we'd like to support as wide a range of dependency versions as possible, but we do depend on the NumPy C ABI through pybind11, which could limit things. I'll do some research and try to figure out exactly what we currently support. |
From https://numpy.org/devdocs/dev/depending_on_numpy.html#numpy-2-abi-handling I've tested this, and it seems like as long as you build with numpy>=2.0.0, you can use older versions of numpy at run time. The following patch works for fixing the build time dependency on numpy: pyproject.toml | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 2af7675..cc77510 100755
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,11 @@
[build-system]
-requires = ["scikit-build-core","pybind11"]
build-backend = "scikit_build_core.build"
+requires = [
+ "scikit-build-core",
+ "pybind11",
+ "numpy>=2.0.0"
+]
+
[project]
name = "topotoolbox" I will go ahead and make that change. Let me know, @bgailleton, if you encounter any problems with your package versions after I do so. See #66. That change shouldn't cause any merge conflicts here. |
Should be ready to merge. I deleted the tests and will better examples later. I added a wrapper to run graphflood from a gridobj. |
Since this depends on the libtopotoolbox patch merged earlier this week
(TopoToolbox/libtopotoolbox#134), I will wait until the next weekly
release of libtopotoolbox on Monday (2024-W40) to merge. At that point we can
bump the tag in CMakeLists.txt and run the checks one more time to make
sure everything still works. The only reason it would not is if we merge
#63 or #65 before then, and they conflict with the libtopotoolbox
dependency, which should be unlikely.
|
OK with me! |
I just bumped the git tag and pushed that commit to your branch. I'll merge now, but you might want to check and make sure that everything still works on your end, since we don't yet have automated checks of graphflood in pytopotoolbox. Further PRs are, of course, welcome. You should be considered a "contributor" by GitHub now, so the CI will run on automatically on your pull requests. |
Binds graphflood (see this pull request ) to
pytopotoolbox