Skip to content

Commit

Permalink
Normalize YAML formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardob90 committed Nov 18, 2024
1 parent 2d1352c commit edcfed5
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 74 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
name: Build Tutorial Container
on:
push:
branches:
- main
paths-ignore:
- '*.md'
- slides/**
- images/**
- .gitignore
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '*.md'
- slides/**
- images/**
- .gitignore
workflow_dispatch:

jobs:
repo2docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: checkout files in repo
uses: actions/checkout@main
repo2docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: checkout files in repo
uses: actions/checkout@main

- name: update jupyter dependencies with repo2docker
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
FORCE_REPO2DOCKER_VERSION: jupyter-repo2docker==2023.06.0
- name: update jupyter dependencies with repo2docker
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
FORCE_REPO2DOCKER_VERSION: jupyter-repo2docker==2023.06.0
70 changes: 39 additions & 31 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,45 @@
---
ci:
autoupdate_schedule: quarterly
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=6000]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=6000]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
hooks:
# Ruff fix
- id: ruff
types_or: [python, pyi]
args: [--fix]
name: ruff (fix)
- id: ruff
types_or: [python, pyi]
args: [--fix]
name: ruff (fix)
# Ruff formatter
- id: ruff-format
types_or: [python, pyi]
name: ruff (format)
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.7.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
- id: ruff-format
types_or: [python, pyi]
name: ruff (format)
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
args: [--format, parsable]
name: YAML (check)
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2']
name: YAML (format)
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.7.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout
38 changes: 19 additions & 19 deletions binder/environment.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
name: python-tutorial
channels:
- conda-forge
- conda-forge
dependencies:
- python=3.10
- pip
- pip:
- numpy
- matplotlib
- pandas
- ipywidgets
- ipynbname
- jupyterlab
- pytest
- pytest-timeout
- markdown
- pre-commit
- geostatspy
- gstools
- scikit-learn
- attrs
- multiprocess
- python=3.10
- pip
- pip:
- numpy
- matplotlib
- pandas
- ipywidgets
- ipynbname
- jupyterlab
- pytest
- pytest-timeout
- markdown
- pre-commit
- geostatspy
- gstools
- scikit-learn
- attrs
- multiprocess

0 comments on commit edcfed5

Please sign in to comment.