Skip to content

Commit

Permalink
Merge branch 'pytroll:main' into mersi_fy3f
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrp84 authored Jul 19, 2024
2 parents cce88a4 + f7b356b commit 1832175
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
shell: bash -l {0}
run: |
export LD_PRELOAD=${{ env.LD_PRELOAD }};
pytest --cov=satpy satpy/tests --cov-report=xml --cov-report=
pytest -n auto --cov=satpy satpy/tests --cov-report=xml --cov-report=
- name: Upload unittest coverage to Codecov
uses: codecov/codecov-action@v4
Expand Down
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ The following people have made contributions to this project:
- [Will Sharpe (wjsharpe)](https://github.com/wjsharpe)
- [Sara Hörnquist (shornqui)](https://github.com/shornqui)
- [Antonio Valentino](https://github.com/avalentino)
- [Clément (ludwigvonkoopa)](https://github.com/ludwigVonKoopa)
1 change: 1 addition & 0 deletions continuous_integration/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ dependencies:
- pint-xarray
- ephem
- bokeh
- pytest-xdist
- pip:
- pytest-lazy-fixtures
- trollsift
Expand Down
17 changes: 17 additions & 0 deletions satpy/resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,23 @@
>>> my_area = AreaDefinition(...)
>>> local_scene = scn.resample(my_area)
Resize area definition in pixels
--------------------------------
Sometimes you may want to create a small image with fixed size in pixels.
For example, to create an image of (y, x) pixels :
>>> small_scn = scn.resample(scn.finest_area().copy(height=y, width=x), resampler="nearest")
.. warning::
Be aware that resizing with native resampling (``resampler="native"``) only
works if the new size is an integer factor of the original input size. For example,
multiplying the size by 2 or dividing the size by 2. Multiplying by 1.5 would
not be allowed.
Create dynamic area definition
------------------------------
Expand Down
3 changes: 1 addition & 2 deletions satpy/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import datetime
import logging
import typing
import unittest
import warnings
from math import sqrt
from unittest import mock
Expand Down Expand Up @@ -266,7 +265,7 @@ def test_make_fake_scene():
assert sc["nine"].attrs.keys() >= {"please", "answer", "bad words", "area"}


class TestCheckSatpy(unittest.TestCase):
class TestCheckSatpy:
"""Test the 'check_satpy' function."""

def test_basic_check_satpy(self):
Expand Down
Loading

0 comments on commit 1832175

Please sign in to comment.