Skip to content

Commit

Permalink
MAINT - Miscellaneous maintenance tasks (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
trallard authored Dec 1, 2022
1 parent c702b75 commit 4187f03
Show file tree
Hide file tree
Showing 50 changed files with 1,546 additions and 1,093 deletions.
52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE/RFD.md

This file was deleted.

18 changes: 9 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:

steps:
- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Upgrade pip
run: python -m pip install --upgrade pip build

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand All @@ -41,10 +41,10 @@ jobs:

- name: Test install from Test PyPI
run: |
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
nebari==${{ env.NEBARI_TAG }}
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
nebari==${{ env.NEBARI_TAG }}
release-pypi:
name: Publish Nebari on PyPi
Expand All @@ -53,22 +53,22 @@ jobs:

steps:
- name: Set up python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Upgrade pip
run: python -m pip install --upgrade pip build

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Build source and binary
run: python -m build --sdist --wheel .

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@v1.5.1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/run-pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Run pre-commit
on:
push:
branches:
- main
- release/\d{4}.\d{1,2}.\d{1,2}
- main
- release/\d{4}.\d{1,2}.\d{1,2}
pull_request:

jobs:
Expand All @@ -16,7 +16,7 @@ jobs:
shell: bash -l {0}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install pre-commit
run: pip install pre-commit
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/test-provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ env:
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}


jobs:
test-render-providers:
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name != 'pull_request'
name: 'Test Nebari Provider'
name: "Test Nebari Provider"
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -59,8 +58,8 @@ jobs:
- github-actions
- gitlab-ci
steps:
- name: 'Checkout Infrastructure'
uses: actions/checkout@main
- name: "Checkout Infrastructure"
uses: actions/checkout@v3

- name: Checkout the branch from the PR that triggered the job
if: ${{ github.event_name == 'issue_comment' }}
Expand All @@ -69,7 +68,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Set up Cloud SDK
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ on:

jobs:
test-general:
name: 'Pytest'
name: "Pytest"
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -37,8 +37,8 @@ jobs:
- "3.9"
- "3.10"
steps:
- name: 'Checkout Infrastructure'
uses: actions/checkout@main
- name: "Checkout Infrastructure"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
Expand Down
136 changes: 77 additions & 59 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,87 @@
# pre-commit is a tool to perform a predefined set of tasks manually and/or
# automatically before git commits are made.
#
# Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
#
# Common tasks
#
# - Register git hooks: pre-commit install --install-hooks
# - Run on all files: pre-commit run --all-files
#
# These pre-commit hooks are run as CI.

#
# NOTE: if it can be avoided, add configs/args in pyproject.toml, setup.cfg or below instead of creating a new `.config.file`.


repos:
# general
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: check-yaml
# jinja2 templates for helm charts
exclude: 'nebari/template/stages/07-kubernetes-services/modules/kubernetes/services/(clearml/chart/templates/.*|prefect/chart/templates/.*)'
args: [--allow-multiple-documents]
# general
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-json
- id: check-yaml
# jinja2 templates for helm charts
exclude: "nebari/template/stages/07-kubernetes-services/modules/kubernetes/services/(clearml/chart/templates/.*|prefect/chart/templates/.*)"
args: [--allow-multiple-documents]
- id: check-toml
# Lint: Checks that non-binary executables have a proper shebang.
- id: check-executables-have-shebangs
exclude: "^nebari/template/"

- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
# --write (-w) enabled here
# see setup.cfg for more config options
entry: codespell -w
language: python
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell
# --write (-w) enabled here
# see setup.cfg for more config options
entry: codespell -w
language: python

# python
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
# python
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 3.8.4
hooks:
- id: flake8
args: [
"--builtins=c"
]
- repo: https://github.com/pycqa/flake8
rev: 5.0.4
hooks:
- id: flake8
args:
[
"--builtins=c",
"--ignore=E203,E266,E501,W503",
"--exclude=[.git,__pycache__,docs/source/conf.py,nebari/template,build,dist,docs,home]",
]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
args: ["--profile", "black"]
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort
additional_dependencies: [toml]
files: \.py$
args: ["--profile", "black"]

# terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.71.0
hooks:
- id: terraform_fmt
args:
- --args=-write=true
# terraform
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.76.0
hooks:
- id: terraform_fmt
args:
- --args=-write=true

# markdown
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.14
hooks:
- id: mdformat
files: ^docs/
name: mdformat
entry: mdformat --wrap=180 --number --end-of-line=lf
language: python
types: [markdown]
minimum_pre_commit_version: '2.0.0'
additional_dependencies:
- mdformat-tables
# markdown
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.16
hooks:
- id: mdformat
files: ^docs/
name: mdformat
entry: mdformat --wrap=120 --number --end-of-line=lf
language: python
types: [markdown]
minimum_pre_commit_version: "2.0.0"
additional_dependencies:
- mdformat-tables
8 changes: 5 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ Open source tooling for data science research, development, and deployment.

# What is QHub?

QHUb is an integrated data science environment designed and developed by scientists at [**Quansight**](https://www.quansight.com/). It enables teams to build and maintain a cost
effective and scalable compute/data science platform in the Cloud, providing an [**Infrastructure as Code**](https://en.wikipedia.org/wiki/Infrastructure_as_code) platform that
streamlines the deployment of data science infrastructure.
QHUb is an integrated data science environment designed and developed by scientists at
[**Quansight**](https://www.quansight.com/). It enables teams to build and maintain a cost effective and scalable
compute/data science platform in the Cloud, providing an
[**Infrastructure as Code**](https://en.wikipedia.org/wiki/Infrastructure_as_code) platform that streamlines the
deployment of data science infrastructure.

```{toctree}
:maxdepth: 1
Expand Down
16 changes: 10 additions & 6 deletions docs/source/admin_guide/argo-workflows.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Argo Workflows

Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Argo workflows comes enabled by default with Qhub deployments.
Argo Workflows is an open source container-native workflow engine for orchestrating parallel jobs on Kubernetes. Argo
workflows comes enabled by default with Qhub deployments.

## Accessing Argo Server

If Argo Workflows is enabled, users can access argo workflows server at: `your-qhub-domain.com/argo`. Log in via Keycloak with your usual credentials.
If Argo Workflows is enabled, users can access argo workflows server at: `your-qhub-domain.com/argo`. Log in via
Keycloak with your usual credentials.

Refer to the [Argo documentation](https://argoproj.github.io/argo-workflows/) for further details on Argo Workflows.

Expand All @@ -16,9 +18,10 @@ You can submit a workflow by clicking "SUBMIT NEW WORKFLOW" on the landing page.

## Overrides of Argo Workflows Helm Chart values

Argo Workflows is deployed using Argo Workflows Helm Chart version 0.13.1. The values.yaml for the helm chart can be overridden as needed via the overrides flag. The default values
file can be found [here](https://github.com/argoproj/argo-helm/blob/argo-workflows-0.13.1/charts/argo-workflows/values.yaml). For example, the following could be done to add
additional environment variables to the controller container.
Argo Workflows is deployed using Argo Workflows Helm Chart version 0.13.1. The values.yaml for the helm chart can be
overridden as needed via the overrides flag. The default values file can be found
[here](https://github.com/argoproj/argo-helm/blob/argo-workflows-0.13.1/charts/argo-workflows/values.yaml). For example,
the following could be done to add additional environment variables to the controller container.

```yaml
argo_workflows:
Expand All @@ -32,7 +35,8 @@ argo_workflows:
## Disabling Argo Workflows
To turn off the cluster monitoring on QHub deployments, simply turn off the feature flag within your `qhub-config.yaml` file. For example:
To turn off the cluster monitoring on QHub deployments, simply turn off the feature flag within your `qhub-config.yaml`
file. For example:

```yaml
argo_workflows:
Expand Down
Loading

0 comments on commit 4187f03

Please sign in to comment.