Skip to content
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
- name: Build bdist_wheel
run: python setup.py bdist_wheel
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Build wheel
run: uv build --wheel
- uses: actions/upload-artifact@v3
with:
path: dist/*.whl
18 changes: 9 additions & 9 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- uses: pre-commit/action@v3.0.0
with:
Expand All @@ -27,21 +27,21 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
python-version: [ "3.11", "3.12" ]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install dependencies
run: |
# Keep pip below 23.0.1 (vam.whittaker install fails with higher versions, #84)
python -m pip install --upgrade 'pip<23.0.1'
pip install flake8 pytest
# Workaround for vam.whittaker installation issue https://github.com/WFP-VAM/vam.whittaker/issues/4
pip install numpy==1.23.5 cython
pip install .[dev]
uv pip install --system flake8 pytest cython
uv pip install --system .[dev] --index-strategy unsafe-best-match --extra-index-url https://artifactory.vgt.vito.be/artifactory/api/pypi/python-packages-public/simple
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
Expand All @@ -50,4 +50,4 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest
pytest
2 changes: 2 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ pythonPipeline {
wheel_repo = 'python-openeo'
wheel_repo_dev = 'python-openeo'
pep440 = true
enable_caching = true
enable_uv = true
}
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[build-system]
requires = ["setuptools>=42", "wheel", "numpy==1.23.5"]
requires = ["setuptools>=42", "wheel", "numpy>=2.0"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 120

[tool.ruff]
line-length = 120
target-version = "py38"
target-version = "py311"
select = ["F401", "I"]
fix = true

Expand Down
8 changes: 5 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ package_dir =
packages = find:
python_requires = >= 3.8
install_requires =
numpy==1.23.5
vam.whittaker==2.0.6
numpy>=2.0
vam_whittaker @ https://artifactory.vgt.vito.be/artifactory/python-packages-public/vam_whittaker/2.0.6/vam_whittaker-2.0.6-cp311-cp311-linux_x86_64.whl ; python_version == "3.11" and sys_platform == "linux"
vam_whittaker @ https://artifactory.vgt.vito.be/artifactory/python-packages-public/vam_whittaker/2.0.6/vam_whittaker-2.0.6-cp312-cp312-linux_x86_64.whl ; python_version == "3.12" and sys_platform == "linux"
vam_whittaker ; sys_platform=="windows"
xarray>=0.20.2
lcmap-pyccd==2021.7.19
openeo
Expand All @@ -38,7 +40,7 @@ dev =
pre-commit
sphinx>=4.5.0
myst-parser>=0.17.0
h5netcdf
h5netcdf[h5py]
sphinx-autodoc-annotation
sphinx-autodoc-typehints
sphinxcontrib-svg2pdfconverter==1.2.0
2 changes: 1 addition & 1 deletion src/fusets/whittaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def whittaker(

def callback(timeseries):
_, _, Zd, XXd = whittaker_f(dates, timeseries, smoothing_lambda, 1)
dates_mask = np.in1d(XXd, output_dates)
dates_mask = np.isin(XXd, output_dates)
return Zd[dates_mask]

result = xarray.apply_ufunc(
Expand Down
Loading