Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Feature: Readthedocs support #497

Merged
merged 43 commits into from
Apr 26, 2018
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
04eeb93
Update req
timotheeguerin Apr 18, 2018
3f02143
Update req
timotheeguerin Apr 18, 2018
822d6a1
Docs v1
timotheeguerin Apr 18, 2018
508de0f
Added docs
timotheeguerin Apr 18, 2018
53cdb5b
More docs
timotheeguerin Apr 18, 2018
1afe58a
More
timotheeguerin Apr 18, 2018
8393c52
More tweaks
timotheeguerin Apr 18, 2018
a3430f2
More tweaks
timotheeguerin Apr 18, 2018
0870650
Fix
timotheeguerin Apr 18, 2018
be0c490
Fix
timotheeguerin Apr 18, 2018
64b5801
Better sdk docs
timotheeguerin Apr 18, 2018
c95140a
Switch custom script to plugins
timotheeguerin Apr 18, 2018
6bec62f
more
timotheeguerin Apr 19, 2018
1632077
Try this
timotheeguerin Apr 19, 2018
ce7e734
revert
timotheeguerin Apr 19, 2018
7eb69a3
More tweaks
timotheeguerin Apr 19, 2018
3ff7fc4
missing file
timotheeguerin Apr 19, 2018
de767d0
Tweak
timotheeguerin Apr 20, 2018
f844778
Tweaks
timotheeguerin Apr 20, 2018
cdfb21c
test
timotheeguerin Apr 20, 2018
624c115
Test this
timotheeguerin Apr 20, 2018
e81b0b0
remove some of the docs
timotheeguerin Apr 23, 2018
3ffd1c4
more docs
timotheeguerin Apr 23, 2018
64a5d1e
Merge master
timotheeguerin Apr 23, 2018
d04a008
merge master
timotheeguerin Apr 24, 2018
20ee83a
Added plugins
timotheeguerin Apr 24, 2018
5365dda
define plugin docs
timotheeguerin Apr 24, 2018
c0a6605
more
timotheeguerin Apr 24, 2018
712679d
Read the docs
timotheeguerin Apr 25, 2018
bbbf7ef
Test
timotheeguerin Apr 25, 2018
515395b
Tweaks
timotheeguerin Apr 25, 2018
5106ca4
Fix
timotheeguerin Apr 25, 2018
5ed0d33
Fix
timotheeguerin Apr 25, 2018
6354919
Fix
timotheeguerin Apr 25, 2018
f124957
More
timotheeguerin Apr 25, 2018
75ee27d
More
timotheeguerin Apr 25, 2018
7a13ef9
Merge branch 'master' of https://github.com/Azure/aztk into feature/r…
timotheeguerin Apr 25, 2018
8b80238
more
timotheeguerin Apr 25, 2018
7f8005c
Disable
timotheeguerin Apr 25, 2018
67c4b71
Merge branch 'master' into feature/readthedocs
timotheeguerin Apr 25, 2018
c3c7825
updated links to html
timotheeguerin Apr 25, 2018
85b7361
mroe
timotheeguerin Apr 25, 2018
a181c98
Merge branch 'master' into feature/readthedocs
timotheeguerin Apr 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf

[*.{json,yml,yaml}]
indent_size = 2
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ tmp/

# PyTest
.cache/


# Built docs
docs/_build/
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"python.formatting.provider": "yapf",
"python.formatting.yapfArgs": [
"--style=.style.yapf"
]
],
"python.pythonPath": "${workspaceFolder}\\ENV\\Scripts\\python.exe"
}
8 changes: 7 additions & 1 deletion aztk/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
"""



class AztkError(Exception):
"""
Base class for all errors raised by the Aztk sdk
"""
def __init__(self, message: str = None):
"""
:param message: Message of the exception
:type message: str
"""
super().__init__(message)

class ClusterNotReadyError(AztkError):
Expand Down
5 changes: 2 additions & 3 deletions aztk/internal/cluster_data/cluster_data.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import yaml
import logging
import yaml
import azure.common
from azure.storage.blob import BlockBlobService
from .node_data import NodeData
from .blob_data import BlobData

Expand All @@ -15,7 +14,7 @@ class ClusterData:
APPLICATIONS_DIR = "applications"
CLUSTER_CONFIG_FILE = "config.yaml"

def __init__(self, blob_client: BlockBlobService, cluster_id: str):
def __init__(self, blob_client, cluster_id: str):
self.blob_client = blob_client
self.cluster_id = cluster_id
self._ensure_container()
Expand Down
2 changes: 1 addition & 1 deletion aztk/internal/cluster_data/node_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import zipfile
from pathlib import Path
from typing import List
from aztk.spark import models
from aztk import models
from aztk.utils import constants, file_utils, secure_utils
from aztk.error import InvalidCustomScriptError

Expand Down
22 changes: 18 additions & 4 deletions aztk/spark/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,27 @@


class Client(BaseClient):
"""
Aztk Spark Client
This is the main entry point for using aztk for spark

Args:
secrets_config(aztk.spark.models.models.SecretsConfiguration): Configuration with all the needed credentials
"""
def __init__(self, secrets_config):
super().__init__(secrets_config)

'''
Spark client public interface
'''
def create_cluster(self, cluster_conf: models.ClusterConfiguration, wait: bool = False):
"""
Create a new aztk spark cluster

Args:
cluster_conf(aztk.spark.models.models.ClusterConfiguration): Configuration for the the cluster to be created
wait(bool): If you should wait for the cluster to be ready before returning

Returns:
aztk.spark.models.Cluster
"""
cluster_conf.validate()
cluster_data = self._get_cluster_data(cluster_conf.cluster_id)
try:
Expand Down Expand Up @@ -202,7 +216,7 @@ def submit_job(self, job_configuration):

autoscale_formula = "$TargetDedicatedNodes = {0}; " \
"$TargetLowPriorityNodes = {1}".format(
job_configuration.max_dedicated_nodes,
job_configuration.max_dedicated_nodes,
job_configuration.max_low_pri_nodes)

job = self.__submit_job(
Expand Down
2 changes: 1 addition & 1 deletion aztk/spark/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .models import *
from .models import *
8 changes: 4 additions & 4 deletions aztk/spark/models/plugins/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .hdfs import *
from .jupyter import *
from .jupyter_lab import *
from .rstudio_server import *
from .hdfs import HDFSPlugin
from .jupyter import JupyterPlugin
from .jupyter_lab import JupyterLabPlugin
from .rstudio_server import RStudioServerPlugin
Loading