-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor PullRequest Image Building and Testing GitHub Actions CI (#118)
enables building and testing images from PRs.
- Loading branch information
Showing
11 changed files
with
136 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Pangeo/Base-Notebook | ||
|
||
A bare-bones image with Jupyter and Dask. | ||
A bare-bones image with Jupyter and Dask |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pytest | ||
|
||
|
||
@pytest.fixture(scope='module') | ||
def client(): | ||
from dask.distributed import Client | ||
with Client(n_workers=4) as dask_client: | ||
yield dask_client | ||
|
||
def test_check_dask_version(client): | ||
print(client) | ||
versions = client.get_versions(check=True) | ||
|
||
|
||
def test_dask_config(): | ||
import dask | ||
|
||
assert '/srv/conda/envs/notebook/etc/dask' in dask.config.paths | ||
assert dask.config.config['labextension']['factory']['class'] == 'KubeCluster' | ||
assert 'worker-template' in dask.config.config['kubernetes'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import importlib | ||
|
||
import pytest | ||
|
||
packages = [ | ||
# these are problem libraries that don't always seem to import, mostly due | ||
# to dependencies outside the python world | ||
'netCDF4', 'h5py', 'rasterio', 'geopandas', 'cartopy', 'geoviews', | ||
# these are things we can't live without, just to be safe | ||
'gcsfs', 's3fs', 'xarray', 'intake', 'dask', 'distributed', | ||
] | ||
|
||
@pytest.mark.parametrize('package_name', packages, ids=packages) | ||
def test_import(package_name): | ||
importlib.import_module(package_name) |
Oops, something went wrong.