-
Notifications
You must be signed in to change notification settings - Fork 5
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
Adopt PEP 517 and PEP 621, use raven-hydro package #278
Conversation
…olete installation options
The new The fix is to simply adjust the way we handle these objects in |
docs/installation.rst
Outdated
If you wish to install RavenPy and its C-libraries manually, compiling the `Raven` binary for your system, | ||
you can install the entire system directly, placing them in the `bin` folder of your environment. | ||
In order to perform this from Ubuntu/Debian: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point to the Raven documentation ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just make sure that the Install docs are clear on what needs to be done now, ie. use conda or compile yourself.
@@ -7,7 +7,7 @@ | |||
import pytest | |||
import xarray as xr | |||
from filelock import FileLock | |||
from xclim.indicators.land import fit, stats | |||
from xclim.indicators.generic import fit, stats |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because there is deprecation warning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because we have just changed it: Ouranosinc/xclim@0e06e2c
I think we need to pin this to the newest version of xclim as a result!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either that or we can make it backwards-compatible with a try/except block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, let's pin to the newest xclim then.
Co-authored-by: David Huard <huard.david@ouranos.ca>
for more information, see https://pre-commit.ci
There's an environment inconsistency for conda:
As it stands, the libraries are incompatible:
I think climpred needs to be regenerated, or we need to offer pinned versions of netCDF (which I really very much don't want to do). |
…test fixture to prevent multiple file-access requests
It's looking good! The last thing that needs to be revised is the one failing test on macOS. I think it has to do with the CRS not being read on file open. One approach would be to change the engine being used to read the file (try GeoPandas?) Will explore this tomorrow. |
## Overview This PR fixes #472 Changes: * Modified entrypoint to use raven-wps * use `python3` calls for compatibility (macOS and Linux) * Updates the methods for fetching remote JSON files to be read by GeoPandas (with pyogrio) ## Related Issue / Discussion CSHS-CWRA/RavenPy#278 (comment))
Closes #283
Changes
setup.py
with new formatpyproject.toml
using theflit
backend.requirements*.txt
andManifest.in
files.ravenpy
before it is installed).dev
ordocs
recipe, you must also install thegis
recipe. A workaround I've added is to simply list thegis
recipes in both for nowurllib
). A more elegant solution should be looked into (to synchronizeowslib / requests / urllib.request
calls).What still needs to be addressed
There is now no method of buildingraven-hydro
from PyPI. The current approach was rendered obsolete inpip>=23.1
, so we are in the right to retire this method.raven-hydro
usingscikit-build-core
is in the works.The CI for the PyPI builds usingtox
are broken due to the missingraven-hydro
binary. There is likely a whole slew of things that must be addressed intox
(removal of tons of now-obsolete workarounds), so don't expect this to work yet.There are documentation files as well as the top-levelMakefile
that refer to operations usingsetup.py
, andtwine
. These need to be replaced with theirflit
-based equivalents. For more information, see: https://flit.pypa.io/en/stable/index.htmlWhy?
With new standards for tooling and packaging, the setuptools-based compilation approach was very quickly becoming unmaintainable and only supported building on Linux/Unix platforms.
For raven-hydro, scikit-build-core is a setup backend that supports multi-OS builds using CMake (which is a much more approachable crossplatform C/C++ build engine). This renders the setuptools-based installation approach obsolete, as we are now able to install a Python wheel or source distribution specifically for the Raven model that allow users to compile it themselves on pip install (similar to numpy).