Skip to content

Commit

Permalink
removed module for testing, moved TestInputs outside the package, upd…
Browse files Browse the repository at this point in the history
…ated readme
  • Loading branch information
AleksMat committed Jun 17, 2019
1 parent 7130a4a commit f1fd74d
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 101 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ check [LightGBM installation guide](https://lightgbm.readthedocs.io/en/latest/In
Before installing `s2cloudless` on **Windows** it is recommended to install package `shapely` from
[Unofficial Windows wheels repository](https://www.lfd.uci.edu/~gohlke/pythonlibs/)


## Input: Sentinel-2 scenes

The input to cloud detector are Sentinel-2 images. In particular, the cloud detector requires the following 10
Expand All @@ -42,23 +41,6 @@ reflectance value in the following way: `B_i/10000`.
You don't need to worry about any of this, if you're doing classification of scenes obtained using Sentinel Hub's
WMS or WCS services (i.e. using ours Python library [sentinelhub-py](https://github.com/sentinel-hub/sentinelhub-py)).

## Test

Please test the cloud detector after the installation by performing a classification on a test scene provided with
this package. To execute it do the following:

```Python
>>> import s2cloudless
>>> s2cloudless.test_sentinelhub_cloud_detector()
```

In case your installation is fine and cloud detector works properly you should get the following output:

```
INFO:s2cloudless.test_cloud_detector:Test OK.
Cloud probabilities and cloud masks match templates.
```

## Examples

Jupyter notebook on how to use the cloud detector to produce cloud mask or cloud probability map
Expand Down
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ numpy>=1.13.3
scipy>=0.19.1
scikit-learn>=0.19.0
scikit-image>=0.13.0
matplotlib>=2.1.0; python_version < '3.7'
matplotlib>=3.0.2; python_version >= '3.7'
lightgbm>=2.0.11
sentinelhub>=2.4.6
3 changes: 1 addition & 2 deletions s2cloudless/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from .S2PixelCloudDetector import S2PixelCloudDetector, CloudMaskRequest, MODEL_EVALSCRIPT, S2_BANDS_EVALSCRIPT
from .PixelClassifier import PixelClassifier
from .test_cloud_detector import test_sentinelhub_cloud_detector


__version__ = '1.2.2'
__version__ = '1.3.0'
74 changes: 0 additions & 74 deletions s2cloudless/test_cloud_detector.py

This file was deleted.

4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ def parse_requirements(file):
packages=find_packages(),
package_dir={'': '.'},
include_package_data=True,
package_data={'s2cloudless': ['models/pixel_s2_cloud_detector_lightGBM_v0.1.joblib.dat',
'TestInputs/input_arrays.npz']
},
package_data={'s2cloudless': ['models/pixel_s2_cloud_detector_lightGBM_v0.1.joblib.dat']},
install_requires=parse_requirements('requirements.txt'),
extras_require={'DEV': parse_requirements('requirements-dev.txt')},
zip_safe=False,
Expand Down
File renamed without changes.
3 changes: 1 addition & 2 deletions tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

class TestS2Cloudless(TestSentinelHub):

INPUT_DATA_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 's2cloudless',
'TestInputs', 'input_arrays.npz')
INPUT_DATA_FILE = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'TestInputs', 'input_arrays.npz')


if __name__ == '__main__':
Expand Down

0 comments on commit f1fd74d

Please sign in to comment.