Skip to content

Commit

Permalink
Rename project to dask-kubernetes (#50)
Browse files Browse the repository at this point in the history
* Rename project to dask-kubernetes
  • Loading branch information
mrocklin committed Mar 5, 2018
1 parent 763370c commit 24872b2
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 48 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
CHANGE_MINIKUBE_NONE_USER: true
environment:
PYTHON: "3.6"
ENV_NAME: "daskernetes-test"
ENV_NAME: "dask-kubernetes-test"
steps:
- checkout
- run:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
name: configure conda
command: |
export PATH="$HOME/miniconda/bin:$PATH"
if [ ! -d "/home/circleci/miniconda/envs/daskernetes-test" ]; then
if [ ! -d "/home/circleci/miniconda/envs/dask-kubernetes-test" ]; then
conda update -q conda
conda env create -f ci/environment-${PYTHON}.yml --name=${ENV_NAME}
source activate ${ENV_NAME}
Expand All @@ -65,7 +65,7 @@ jobs:
- "/home/circleci/miniconda"
- run:
command: |
/home/circleci/miniconda/envs/daskernetes-test/bin/pytest daskernetes -s --verbose --worker-image daskdev/dask:0.17.0
/home/circleci/miniconda/envs/dask-kubernetes-test/bin/py.test dask_kubernetes -s --verbose --worker-image daskdev/dask:0.17.1
- run:
command: |
/home/circleci/miniconda/envs/daskernetes-test/bin/flake8 daskernetes
/home/circleci/miniconda/envs/dask-kubernetes-test/bin/flake8 dask-kubernetes
10 changes: 5 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Daskernetes
===========
Dask Kubernetes
===============

|Build Status|

Native Kubernetes integration for Dask.

See documentation for more information:
`daskernetes.readthedocs.io <https://daskernetes.readthedocs.io/en/latest>`_
`dask-kubernetes.readthedocs.io <https://dask-kubernetes.readthedocs.io/en/latest>`_

.. |Build Status| image:: https://circleci.com/gh/dask/daskernetes.svg?&style=shield
:target: https://circleci.com/gh/dask/daskernetes.svg?&style=shield
.. |Build Status| image:: https://circleci.com/gh/dask/dask-kubernetes.svg?&style=shield
:target: https://circleci.com/gh/dask/dask-kubernetes.svg?&style=shield
6 changes: 3 additions & 3 deletions ci/environment-3.6.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: daskernetes-test
name: dask-kubernetes-test
channels:
- defaults
dependencies:
- flake8
- ipywidgets
- distributed=1.21.0
- dask=0.17.0
- distributed=1.21.1
- dask=0.17.1
- nomkl
- pytest
- python=3.6
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion daskernetes/core.py → dask_kubernetes/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class KubeCluster(object):
Examples
--------
>>> from daskernetes import KubeCluster, make_pod_spec
>>> from dask_kubernetes import KubeCluster, make_pod_spec
>>> pod_spec = make_pod_spec(image='daskdev/dask:latest',
... memory_limit='4G', memory_request='4G',
... cpu_limit=1, cpu_request=1,
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import yaml

import pytest
from daskernetes import KubeCluster, make_pod_spec, config
from dask_kubernetes import KubeCluster, make_pod_spec, config
from dask.distributed import Client, wait
from distributed.utils_test import loop # noqa: F401
from distributed.utils import tmpfile
Expand All @@ -22,7 +22,7 @@

@pytest.fixture
def ns():
name = 'test-daskernetes' + str(uuid.uuid4())[:10]
name = 'test-dask-kubernetes' + str(uuid.uuid4())[:10]
ns = kubernetes.client.V1Namespace(metadata=kubernetes.client.V1ObjectMeta(name=name))
api.create_namespace(ns)
try:
Expand Down Expand Up @@ -296,10 +296,16 @@ def test_scale_up_down(cluster, client):

a, b = list(cluster.scheduler.workers)
x = client.submit(np.ones, 1, workers=a)
y = client.submit(np.ones, 100000000, workers=b)
y = client.submit(np.ones, 100_000_000, workers=b)

wait([x, y])

start = time()
while (cluster.scheduler.workers[a].info['memory'] >
cluster.scheduler.workers[b].info['memory']):
sleep(0.1)
assert time() < start + 1

cluster.scale(1)

start = time()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from daskernetes import KubeCluster
from daskernetes.objects import make_pod_spec, make_pod_from_dict
from dask_kubernetes import KubeCluster
from dask_kubernetes.objects import make_pod_spec, make_pod_from_dict
from distributed.utils_test import loop # noqa: F401


Expand Down
2 changes: 1 addition & 1 deletion doc/source/api.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
API
===

.. currentmodule:: daskernetes
.. currentmodule:: dask_kubernetes

.. autosummary::
KubeCluster
Expand Down
22 changes: 11 additions & 11 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Daskernetes documentation build configuration file, created by
# Dask-kubernetes documentation build configuration file, created by
# sphinx-quickstart on Thu Feb 8 17:56:16 2018.
#
# This file is execfile()d with the current directory set to its
Expand Down Expand Up @@ -56,16 +56,16 @@
master_doc = 'index'

# General information about the project.
project = 'Daskernetes'
copyright = '2018, Daskernetes Developers'
author = 'Daskernetes Developers'
project = 'Dask Kubernetes'
copyright = '2018, Dask Kubernetes Developers'
author = 'Dask Kubernetes Developers'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
from daskernetes import __version__
from dask_kubernetes import __version__
version = __version__
# The full version, including alpha/beta/rc tags.
release = __version__
Expand Down Expand Up @@ -129,7 +129,7 @@
# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'Daskernetesdoc'
htmlhelp_basename = 'dask-kubernetes-doc'


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -156,8 +156,8 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Daskernetes.tex', 'Daskernetes Documentation',
'Daskernetes Developers', 'manual'),
(master_doc, 'dask-kubernetes.tex', 'Dask Kubernetes Documentation',
'Dask kubernetes Developers', 'manual'),
]


Expand All @@ -166,7 +166,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'daskernetes', 'Daskernetes Documentation',
(master_doc, 'dask-kubernetes', 'Dask Kubernetes Documentation',
[author], 1)
]

Expand All @@ -177,8 +177,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Daskernetes', 'Daskernetes Documentation',
author, 'Daskernetes', 'One line description of project.',
(master_doc, 'Dask Kubernetes', 'Dask Kubernetes Documentation',
author, 'Dask-Kubernetes', 'One line description of project.',
'Miscellaneous'),
]

Expand Down
5 changes: 5 additions & 0 deletions doc/source/history.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ and `DSEP <http://data.berkeley.edu/>`__ programs while using it with
`Pangeo project <https://pangeo-data.github.io/>`__.
It was then brought under the Dask github organization where it lives today.

This repository was originally named *daskernetes* to avoid conflict with an
older, Google Cloud Platform specific solution named dask-kubernetes.
Eventually this package superceded that one and took on the name
dask-kubernetes.

.. image:: https://upload.wikimedia.org/wikipedia/en/thumb/f/f4/Met_Office.svg/1200px-Met_Office.svg.png
:alt: Met Office Logo
:width: 20%
Expand Down
30 changes: 15 additions & 15 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Daskernetes
===========
Dask Kubernetes
===============

Daskernetes deploys Dask workers on Kubernetes clusters using native Kubernetes
APIs. It is designed to dynamically launch short-lived deployments of workers
during the lifetime of a Python process.
Dask Kubernetes deploys Dask workers on Kubernetes clusters using native
Kubernetes APIs. It is designed to dynamically launch short-lived deployments
of workers during the lifetime of a Python process.

Install
-------

::

pip install daskernetes
pip install dask-kubernetes

Quickstart
----------

.. code-block:: python
from daskernetes import KubeCluster
from dask_kubernetes import KubeCluster
cluster = KubeCluster.from_yaml('worker-spec.yml')
cluster.scale_up(10) # specify number of nodes explicitly
Expand Down Expand Up @@ -73,23 +73,23 @@ Best Practices
Configuration
-------------

There are a few special environment variables that affect daskernetes behavior:
There are a few special environment variables that affect dask-kubernetes behavior:

1. ``DASKERNETES_WORKER_TEMPLATE_PATH``: a path a a YAML file that holds a
1. ``DASK_KUBERNETES_WORKER_TEMPLATE_PATH``: a path a a YAML file that holds a
Pod spec for the worker. If provided then this will be used when
:obj:`KubeCluster` is called with no arguments::

cluster = KubeCluster() # reads provided yaml file

2. ``DASKERNETES_DIAGNOSTICS_LINK``: a Python pre-formatted string that shows
2. ``DASK_KUBERNETES_DIAGNOSTICS_LINK``: a Python pre-formatted string that shows
the location of Dask's dashboard. This string will receive values for
``host``, ``port``, and all environment variables. This is useful when
using Daskernetes with JupyterHub and nbserverproxy to route the dashboard
using dask-kubernetes with JupyterHub and nbserverproxy to route the dashboard
link to a proxied address as follows::

export DASKERNETES_DIANGOSTICS_LINK="{JUPYTERHUB_SERVICE_PREFIX}proxy/{port}/status"
export DASK_KUBERNETES_DIANGOSTICS_LINK="{JUPYTERHUB_SERVICE_PREFIX}proxy/{port}/status"

3. ``DASKERNETES_WORKER_NAME``: a Python pre-formatted string to use
3. ``DASK_KUBERNETES_WORKER_NAME``: a Python pre-formatted string to use
when naming dask worker pods. This string will receive values for ``user``,
``uuid``, and all environment variables. This is useful when you want to have
control over the naming convention for your pods and use other tokens from
Expand All @@ -98,8 +98,8 @@ There are a few special environment variables that affect daskernetes behavior:
instead of ``dask-{user}-{uuid}``. **Ensure you keep the ``uuid`` somewhere in
the template.**

Any other environment variable starting with ``DASKERNETES_`` will be placed in
the ``daskernetes.config`` dictionary for general use.
Any other environment variable starting with ``DASK_KUBERNETES_`` will be placed in
the ``dask_kubernetes.config`` dictionary for general use.


Docker Images
Expand Down
2 changes: 1 addition & 1 deletion doc/source/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ process on one's local machine & the workers on minikube.

3. Run tests::

py.test daskernetes --worker-image <worker-image>
py.test dask_kubernetes --worker-image <worker-image>

where:

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
from setuptools import setup, find_packages

setup(
name='daskernetes',
name='dask-kubernetes',
version='0.1.3',
description='Native Kubernetes integration for Dask',
url='https://github.com/dask/daskernetes',
url='https://github.com/dask/dask-kubernetes',
keywords='dask,kubernetes,distributed',
license='BSD',
packages=find_packages(),
Expand Down

0 comments on commit 24872b2

Please sign in to comment.