-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactor submodule structure and imports * Update docs * Install all deps in CI
- Loading branch information
1 parent
9cf4df8
commit 84ca438
Showing
33 changed files
with
94 additions
and
69 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,29 +1,27 @@ | ||
from . import config | ||
|
||
try: | ||
from .providers.aws.ecs import ECSCluster, FargateCluster | ||
from .providers.aws.ec2 import EC2Cluster | ||
except ImportError: | ||
pass | ||
try: | ||
from .providers.azure.azureml import AzureMLCluster | ||
except ImportError: | ||
pass | ||
try: | ||
from .providers.digitalocean.droplet import DropletCluster | ||
except ImportError: | ||
pass | ||
|
||
__all__ = [ | ||
"ECSCluster", | ||
"EC2Cluster", | ||
"FargateCluster", | ||
"AzureMLCluster", | ||
"DropletCluster", | ||
] | ||
|
||
from ._version import get_versions | ||
|
||
__version__ = get_versions()["version"] | ||
|
||
del get_versions | ||
|
||
|
||
def __getattr__(name): | ||
if name in ["EC2Cluster", "ECSCluster", "FargateCluster"]: | ||
raise ImportError( | ||
"AWS cluster managers have been moved into the aws subpackage. " | ||
f"Please import dask_cloudprovider.aws.{name}" | ||
) | ||
|
||
if name in ["AzureMLCluster"]: | ||
raise ImportError( | ||
"Azure cluster managers have been moved into the azure subpackage. " | ||
f"Please import dask_cloudprovider.azure.{name}" | ||
) | ||
|
||
if name in ["DropletCluster"]: | ||
raise ImportError( | ||
"DigitalOcean cluster managers have been moved into the digitalocean subpackage. " | ||
f"Please import dask_cloudprovider.digitalocean.{name}" | ||
) |
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,2 @@ | ||
from .ec2 import EC2Cluster | ||
from .ecs import ECSCluster, FargateCluster |
4 changes: 2 additions & 2 deletions
4
dask_cloudprovider/providers/aws/ec2.py → dask_cloudprovider/aws/ec2.py
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
File renamed without changes.
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,8 @@ | ||
import pytest | ||
|
||
aiobotocore = pytest.importorskip("aiobotocore") | ||
|
||
|
||
def test_import(): | ||
from dask_cloudprovider.aws import ECSCluster # noqa | ||
from dask_cloudprovider.aws import FargateCluster # noqa |
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 @@ | ||
from .azureml import AzureMLCluster |
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
File renamed without changes.
File renamed without changes.
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,7 @@ | ||
import pytest | ||
|
||
pytest.importorskip("azureml") | ||
|
||
|
||
def test_aml(): | ||
from dask_cloudprovider.azure import AzureMLCluster # noqa |
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 @@ | ||
from .droplet import DropletCluster |
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...providers/generic/tests/test_vmcluster.py → ...dprovider/generic/tests/test_vmcluster.py
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
File renamed without changes.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
import pytest | ||
|
||
|
||
def test_imports(): | ||
from dask_cloudprovider.aws import EC2Cluster # noqa | ||
from dask_cloudprovider.aws import ECSCluster # noqa | ||
from dask_cloudprovider.aws import FargateCluster # noqa | ||
from dask_cloudprovider.azure import AzureMLCluster # noqa | ||
from dask_cloudprovider.digitalocean import DropletCluster # noqa | ||
|
||
|
||
def test_import_exceptions(): | ||
with pytest.raises(ImportError): | ||
from dask_cloudprovider import EC2Cluster # noqa | ||
with pytest.raises(ImportError): | ||
from dask_cloudprovider import ECSCluster # noqa | ||
with pytest.raises(ImportError): | ||
from dask_cloudprovider import FargateCluster # noqa | ||
with pytest.raises(ImportError): | ||
from dask_cloudprovider import AzureMLCluster # noqa | ||
with pytest.raises(ImportError): | ||
from dask_cloudprovider import DropletCluster # noqa |
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
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