Skip to content

Commit

Permalink
Merge branch 'main' of github.com:dask/dask-kubernetes into BitTheByt…
Browse files Browse the repository at this point in the history
…e/main
  • Loading branch information
jacobtomlinson committed Apr 30, 2024
2 parents 78ccc65 + 30c22a5 commit a5845c4
Show file tree
Hide file tree
Showing 70 changed files with 557 additions and 8,124 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
.*
Dockerfile
dist/
29 changes: 29 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# These will be overridden by the publish workflow and set to the new tag
name-template: 'Next Release'
tag-template: 'next'

# Optionally configure your categories and other templates
exclude-labels:
- dependencies
categories:
- title: 'Enhancements'
labels:
- 'feature'
- 'enhancement'
- title: 'Bug Fixes'
labels:
- 'bug'
- title: 'Documentation'
label: 'documentation'
- title: 'Project Hygiene'
labels:
- hygiene
- ci

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.

template: |
## Changes
$CHANGES
57 changes: 0 additions & 57 deletions .github/workflows/helmcluster.yaml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/kubecluster.yaml

This file was deleted.

18 changes: 2 additions & 16 deletions .github/workflows/operator.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
name: "Operator"
on:
pull_request:
paths:
- ".github/workflows/operator.yaml"
- "requirements*"
- "ci/**"
- "dask_kubernetes/operator/**"
- "dask_kubernetes/common/**"
- "dask_kubernetes/*"
push:
paths:
- ".github/workflows/operator.yaml"
- "requirements*"
- "ci/**"
- "dask_kubernetes/operator/**"
- "dask_kubernetes/common/**"
- "dask_kubernetes/*"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -39,7 +25,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
kubernetes-version: ["1.29.2"]
include:
- python-version: '3.10'
Expand All @@ -64,7 +50,7 @@ jobs:
KUBERNETES_VERSION: ${{ matrix.kubernetes-version }}
TEST_ISTIO: "true"
TEST_DASK_GATEWAY: "true"
run: pytest --maxfail=3 --reruns=5 dask_kubernetes/common dask_kubernetes/operator
run: pytest --maxfail=3 --reruns=5 dask_kubernetes
- name: Debug kubernetes resources
if: always()
run: kubectl get all -A
24 changes: 24 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Release Drafter

on:
push:
branches:
- main

permissions:
contents: read

jobs:
update_release_draft:
if: github.repository == 'dask/dask-kubernetes'
permissions:
# Write permission is required to create a GitHub release
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 33 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Publisher

on:
push:
tags:
- "*.*.*"

permissions:
contents: read

jobs:
publish_release:
if: github.repository == 'dask/dask-kubernetes'
permissions:
# Write permission is required to publish a GitHub release
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- name: Set version env
# Use a little bit of bash to extract the tag name from the GitHub ref
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- uses: release-drafter/release-drafter@v5
with:
disable-autolabeler: true
# Override the Release name/tag/version with the actual tag name
name: ${{ env.RELEASE_VERSION }}
tag: ${{ env.RELEASE_VERSION }}
version: ${{ env.RELEASE_VERSION }}
# Publish the Release
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,17 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v1
with:
python-version: "3.10"

- name: Install pypa/build and chartpress
run: python -m pip install build wheel chartpress pyyaml
run: python -m pip install hatch build wheel chartpress pyyaml

# chartpress pushes a packages Helm chart to dask/helm-chart's gh-pages
# branch, so we need to have a git user.email and user.name configured
Expand All @@ -27,14 +29,11 @@ jobs:
- name: Build distributions
shell: bash -l {0}
run: python setup.py sdist bdist_wheel
run: hatch build

- name: Publish package to PyPI
if: github.repository == 'dask/dask-kubernetes' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
uses: pypa/gh-action-pypi-publish@release/v1

- name: Get the version
id: get_version
Expand Down
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ instance/
.scrapy

# Sphinx documentation
doc/_build/
docs/_build/

# PyBuilder
target/
Expand Down Expand Up @@ -141,4 +141,7 @@ credentials.csv

# IDEs
.idea/
.vscode/
.vscode/

# Version
_version.py
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2

# Set the version of Python and other tools you might need
sphinx:
configuration: doc/source/conf.py
configuration: docs/source/conf.py

formats: all

Expand All @@ -20,7 +20,7 @@ python:
install:
- method: pip
path: .
- requirements: doc/requirements-docs.txt
- requirements: docs/requirements-docs.txt

submodules:
include: all
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Dask Kubernetes
:target: https://anaconda.org/conda-forge/dask-kubernetes
:alt: Conda Forge

.. image:: https://img.shields.io/badge/python%20support-3.9%7C3.10%7C3.11-blue
.. image:: https://img.shields.io/badge/python%20support-3.9%7C3.10%7C3.11%7C3.12-blue
:target: https://kubernetes.dask.org/en/latest/installing.html#supported-versions
:alt: Python Support

Expand Down
30 changes: 7 additions & 23 deletions dask_kubernetes/__init__.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
from importlib import import_module
from warnings import warn

from . import config
from . import _version
from .common.auth import (
AutoRefreshConfiguration,
AutoRefreshKubeConfigLoader,
ClusterAuth,
InCluster,
KubeAuth,
KubeConfig,
)
from .common.objects import clean_pod_template, make_pod_from_dict, make_pod_spec
from .helm import HelmCluster

__all__ = ["HelmCluster", "KubeCluster"]
__version__ = _version.get_versions()["version"]


def __getattr__(name):
if name == "KubeCluster":
new_module = import_module("dask_kubernetes.classic")
return getattr(new_module, name)
__all__ = []

raise AttributeError(f"module {__name__} has no attribute {name}")
try:
from ._version import version as __version__ # noqa
from ._version import version_tuple as __version_tuple__ # noqa
except ImportError:
__version__ = "0.0.0"
__version_tuple__ = (0, 0, 0)
Loading

0 comments on commit a5845c4

Please sign in to comment.