From 260ce2255df023f2a1e99d52ca837495aa9e8786 Mon Sep 17 00:00:00 2001 From: Alex Panin <59580529+ddl-alexpanin@users.noreply.github.com> Date: Thu, 16 Sep 2021 17:33:12 -0700 Subject: [PATCH] Release 1.0.5 (#103) Release 1.0.5 --- CHANGELOG.md | 7 +++++++ README.md | 39 ++++++++++++++++++++++++++++++--------- domino/_version.py | 2 +- setup.py | 19 ++++++++++++++----- 4 files changed, 52 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c936d64..9eb022c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,13 @@ All notable changes to the `python-domino` library will be documented in this fi ### Added +### Changed + +## 1.0.5 + +### Added + +* Added support for launching Dask jobs * Added the ability to choose which exceptions to ignore (if any) while polling for `job_start_blocking` * Added several new unit tests in `test_basic_auth.py` and `test_jobs.py` * Added a public method to re-authenticate if a token expires (assuming a long-running process) diff --git a/README.md b/README.md index d421e74..c176b28 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Python bindings for the Domino API. Permits interaction with a Domino deployment from Python using the [Domino API](https://dominodatalab.github.io/api-docs/). -The latest released version is [1.0.4](https://github.com/dominodatalab/python-domino/archive/1.0.4.zip). +The latest released version is [1.0.5](https://github.com/dominodatalab/python-domino/archive/1.0.5.zip). ## Version Compatibility Matrix @@ -15,7 +15,7 @@ The latest released version is [1.0.4](https://github.com/dominodatalab/python-d | 3.6.x or Lower | [0.3.5](http://github.com/dominodatalab/python-domino/archive/0.3.5.zip) | | 4.1.0 or Higher | [1.0.0](https://github.com/dominodatalab/python-domino/archive/1.0.0.zip) or Higher | -## Installation +## Installation At this time, these Domino Python bindings are not in PyPi. You can install the latest version of this package from our Github `master` branch with the following: @@ -30,7 +30,7 @@ You can also add `python-domino` to your `requirements.txt` file with the follow git+git://github.com/dominodatalab/python-domino.git Note: To install lower version of library, for example `0.3.5` use the following command: - + pip install https://github.com/dominodatalab/python-domino/archive/0.3.5.zip ## Overview @@ -53,9 +53,9 @@ The parameters are: * *domino_token_file:* (Optional) Path to domino token file containing auth token. If not provided the library will expect to find one in the DOMINO_TOKEN_FILE environment variable. -Note: +Note: 1. In case both api_key and domino_token_file are available, then preference will be given to domino_token_file. -2. By default the log level is set to `INFO`, to set log level to `DEBUG`, set `DOMINO_LOG_LEVEL` environment variable to `DEBUG` +2. By default the log level is set to `INFO`, to set log level to `DEBUG`, set `DOMINO_LOG_LEVEL` environment variable to `DEBUG`
## Methods @@ -87,7 +87,7 @@ Start a new run on the selected project. The parameters are: * *isDirect:* (Optional) Whether or not this command should be passed directly to a shell. * *commitId:* (Optional) The commitId to launch from. If not provided, will launch from latest commit. * *title:* (Optional) A title for the run. -* *tier:* (Optional) The hardware tier to use for the run. This is the human-readable name of the hardware tier, such as "Free", "Small", or "Medium". Will use project default tier if not provided. +* *tier:* (Optional) The hardware tier to use for the run. This is the human-readable name of the hardware tier, such as "Free", "Small", or "Medium". Will use project default tier if not provided. * *publishApiEndpoint:* (Optional) Whether or not to publish an API endpoint from the resulting output.
@@ -163,7 +163,7 @@ Publishes an app in the Domino project, or republish an existing app. The parame ### app_unpublish() -Stops all running apps in the Domino project. +Stops all running apps in the Domino project.
@@ -177,7 +177,7 @@ Starts a new Job (run) in the project * *environment_id (string):* (Optional) The environment id to launch job with. If not provided it will use the default environment for the project * *on_demand_spark_cluster_properties (dict):* (Optional) On demand spark cluster properties. Following properties can be provided in spark cluster - + ``` { "computeEnvironmentId": "" @@ -191,7 +191,28 @@ Starts a new Job (run) in the project (optional defaults to 0; 1GB is 1000MB Here) } ``` +* *param compute_cluster_properties (dict):* (Optional) The compute cluster properties definition contains parameters for +launching any Domino supported compute cluster for a job. Use this to launch a job that uses a compute cluster instead of +the deprecated `on_demand_spark_cluster_properties` field. If `on_demand_spark_cluster_properties` and `compute_cluster_properties` +are both present, `on_demand_spark_cluster_properties` will be ignored. `compute_cluster_properties` contains the following fields: + ``` + { + "clusterType": , + "computeEnvironmentId": , + "computeEnvironmentRevisionSpec": "} (optional)>, + "masterHardwareTierId": , + "workerCount": , + "workerHardwareTierId": , + "workerStorage": <{ "value": , "unit": }, + The disk storage size for the cluster's worker nodes (optional)> + "maxWorkerCount": + } + ```
### job_stop(*job_id*, *commit_results=True*): @@ -199,7 +220,7 @@ Starts a new Job (run) in the project Stops the Job (run) in the project * *job_id (string):* Job identifier -* *commit_results (boolean):* Defaults to `True`, if `false` job results will not be committed +* *commit_results (boolean):* Defaults to `True`, if `false` job results will not be committed
diff --git a/domino/_version.py b/domino/_version.py index 8a81504..858de17 100644 --- a/domino/_version.py +++ b/domino/_version.py @@ -1 +1 @@ -__version__ = '1.0.4' +__version__ = '1.0.5' diff --git a/setup.py b/setup.py index bcd50f2..6db86b5 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,14 @@ -from setuptools import setup +import pathlib +from setuptools import setup, find_packages import re PACKAGE_NAME = 'domino' +# The directory containing this file +HERE = pathlib.Path(__file__).parent + +# The text of the README file +README = (HERE / "README.md").read_text() def get_version(): try: @@ -22,12 +28,15 @@ def get_version(): version=get_version(), author='Domino Data Lab', author_email='support@dominodatalab.com', - packages=[PACKAGE_NAME], + packages=find_packages(), scripts=[], - url='http://www.dominodatalab.com', - license='LICENSE.txt', + url='https://github.com/dominodatalab/python-domino', + download_url='https://github.com/dominodatalab/python-domino/' + get_version() + '.zip', + license='Apache Software License (Apache 2.0)', description='Python bindings for the Domino API', - long_description='', + long_description=README, + long_description_content_type="text/markdown", + keywords=['Domino Data Lab', 'API'], install_requires=[ 'requests>=2.4.2', 'bs4==0.*,>=0.0.1',