File tree Expand file tree Collapse file tree 7 files changed +44
-23
lines changed Expand file tree Collapse file tree 7 files changed +44
-23
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Tests
2
2
3
3
on :
4
4
push :
5
- branches : " * "
5
+ branches : main
6
6
pull_request :
7
7
branches : main
8
8
13
13
strategy :
14
14
fail-fast : false
15
15
matrix :
16
- CONDA_ENV : [3.8, 3.9]
16
+ CONDA_ENV : [3.8, 3.9, unpinned ]
17
17
steps :
18
18
- name : Checkout
19
19
uses : actions/checkout@v2
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ channels:
3
3
- conda-forge
4
4
dependencies :
5
5
- python=3.8
6
- - geopandas
7
- - numpy
6
+ - geopandas-base
8
7
- pip
9
8
- pytest
10
9
- requests
Original file line number Diff line number Diff line change @@ -3,8 +3,7 @@ channels:
3
3
- conda-forge
4
4
dependencies :
5
5
- python=3.9
6
- - geopandas
7
- - numpy
6
+ - geopandas-base
8
7
- pip
9
8
- pytest
10
9
- requests
Original file line number Diff line number Diff line change
1
+ name : sliderule-ci
2
+ channels :
3
+ - conda-forge
4
+ dependencies :
5
+ - python
6
+ - pip
7
+ - pytest
Original file line number Diff line number Diff line change 1
1
requests
2
- setuptools_scm
3
2
numpy
4
- ipykernel
5
- ipywidgets
6
- ipyleaflet
7
- tk
8
- matplotlib
9
- cartopy
10
- pandas
11
3
geopandas
12
- h5py
13
- pyproj
14
- scipy
15
4
shapely
Original file line number Diff line number Diff line change 27
27
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28
28
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
30
+ import sys
30
31
import warnings
31
32
import datetime
32
- import scipy .io
33
33
import geopandas
34
- import h5py
35
34
import numpy as np
36
35
36
+ # imports with warnings if not present
37
+ try :
38
+ import scipy .io
39
+ except ModuleNotFoundError as e :
40
+ sys .stderr .write ("Warning: missing packages, some functions will throw an exception if called. (%s)\n " % (str (e )))
41
+ try :
42
+ import h5py
43
+ except ModuleNotFoundError as e :
44
+ sys .stderr .write ("Warning: missing packages, some functions will throw an exception if called. (%s)\n " % (str (e )))
45
+
37
46
# attributes for ATL06-SR variables
38
47
def get_attributes (** kwargs ):
39
48
# set default keyword arguments
Original file line number Diff line number Diff line change 28
28
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
29
30
30
import os
31
+ import sys
31
32
import copy
32
33
import datetime
33
- import ipywidgets
34
- import ipyleaflet
35
34
import numpy as np
36
35
from traitlets .utils .bunch import Bunch
37
- import tkinter .filedialog
38
- import IPython .display
39
36
import sliderule .io
40
37
38
+ # imports with warnings if not present
39
+ try :
40
+ import ipywidgets
41
+ except ModuleNotFoundError as e :
42
+ sys .stderr .write ("Warning: missing packages, some functions will throw an exception if called. (%s)\n " % (str (e )))
43
+ try :
44
+ import tkinter .filedialog
45
+ except ModuleNotFoundError as e :
46
+ sys .stderr .write ("Warning: missing packages, some functions will throw an exception if called. (%s)\n " % (str (e )))
47
+ try :
48
+ import IPython .display
49
+ except ModuleNotFoundError as e :
50
+ sys .stderr .write ("Warning: missing packages, some functions will throw an exception if called. (%s)\n " % (str (e )))
51
+
52
+ # imports that raise error if not present
53
+ try :
54
+ import ipyleaflet
55
+ except ModuleNotFoundError as e :
56
+ sys .stderr .write ("Error: missing required packages. (%s)\n " % (str (e )))
57
+ raise
58
+
41
59
class widgets :
42
60
def __init__ (self ):
43
61
# dropdown menu for setting asset
You can’t perform that action at this time.
0 commit comments