Skip to content

Commit d8fcfb2

Browse files
committed
Merge branch 'main' into pr/selmanozleyen/1016
2 parents 6b294fc + 17341d0 commit d8fcfb2

File tree

12 files changed

+336
-334
lines changed

12 files changed

+336
-334
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ insert_final_newline = true
1010

1111
[Makefile]
1212
indent_style = tab
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.github/.codecov.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Based on pydata/xarray
22
codecov:
3-
require_ci_to_pass: false
3+
require_ci_to_pass: false
44

55
coverage:
6-
status:
7-
project:
8-
default:
9-
# Require 1% coverage, i.e., always succeed
10-
target: 1
11-
patch: false
12-
changes: false
6+
status:
7+
project:
8+
default:
9+
# Require 1% coverage, i.e., always succeed
10+
target: 1
11+
patch: false
12+
changes: false
1313

1414
comment:
15-
layout: "diff, flags, files"
16-
behavior: once
17-
require_base: false
15+
layout: "diff, flags, files"
16+
behavior: once
17+
require_base: false

.github/release.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
changelog:
2-
exclude:
3-
labels:
4-
- release-ignore
5-
authors:
6-
- pre-commit-ci
7-
categories:
8-
- title: Added
9-
labels:
10-
- "release-added"
11-
- title: Changed
12-
labels:
13-
- "release-changed"
14-
- title: Deprecated
15-
labels:
16-
- "release-deprecated"
17-
- title: Removed
18-
labels:
19-
- "release-removed"
20-
- title: Fixed
21-
labels:
22-
- "release-fixed"
23-
- title: Security
24-
labels:
25-
- "release-security"
26-
- title: Other Changes
27-
labels:
28-
- "*"
2+
exclude:
3+
labels:
4+
- release-ignore
5+
authors:
6+
- pre-commit-ci
7+
categories:
8+
- title: Added
9+
labels:
10+
- "release-added"
11+
- title: Changed
12+
labels:
13+
- "release-changed"
14+
- title: Deprecated
15+
labels:
16+
- "release-deprecated"
17+
- title: Removed
18+
labels:
19+
- "release-removed"
20+
- title: Fixed
21+
labels:
22+
- "release-fixed"
23+
- title: Security
24+
labels:
25+
- "release-security"
26+
- title: Other Changes
27+
labels:
28+
- "*"

.github/workflows/benchmark.yml

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,62 @@
11
name: Benchmark
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
88

99
env:
10-
FORCE_COLOR: "1"
10+
FORCE_COLOR: "1"
1111

1212
defaults:
13-
run:
14-
shell: bash -e {0} # -e to fail on error
13+
run:
14+
shell: bash -e {0} # -e to fail on error
1515

1616
jobs:
17-
benchmark:
18-
runs-on: ${{ matrix.os }}
19-
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
python: ["3.13"]
24-
os: [ubuntu-latest]
25-
26-
env:
27-
OS: ${{ matrix.os }}
28-
PYTHON: ${{ matrix.python }}
29-
ASV_DIR: "${{ github.workspace }}/benchmarks"
30-
31-
steps:
32-
- uses: actions/checkout@v4
33-
with:
34-
fetch-depth: 0
35-
36-
- name: Fetch main branch for `asv run`’s hash
37-
run: git fetch origin main:main
38-
if: ${{ github.ref_name != 'main' }}
39-
40-
- name: Set up Python ${{ matrix.python }}
41-
uses: actions/setup-python@v5
42-
with:
43-
python-version: ${{ matrix.python }}
44-
cache: "pip"
45-
46-
- name: Cache datasets
47-
uses: actions/cache@v4
48-
with:
49-
path: |
50-
~/.cache
51-
key: benchmark-state-${{ hashFiles('benchmarks/**') }}
52-
53-
- name: Install dependencies
54-
run: pip install 'asv>=0.6.4' packaging
55-
56-
- name: Configure ASV
57-
working-directory: ${{ env.ASV_DIR }}
58-
run: asv machine --yes
59-
60-
- name: Quick benchmark run
61-
working-directory: ${{ env.ASV_DIR }}
62-
run: asv run --dry-run --quick --show-stderr --verbose HEAD^!
17+
benchmark:
18+
runs-on: ${{ matrix.os }}
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
python: ["3.13"]
24+
os: [ubuntu-latest]
25+
26+
env:
27+
OS: ${{ matrix.os }}
28+
PYTHON: ${{ matrix.python }}
29+
ASV_DIR: "${{ github.workspace }}/benchmarks"
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Fetch main branch for `asv run`’s hash
37+
run: git fetch origin main:main
38+
if: ${{ github.ref_name != 'main' }}
39+
40+
- name: Set up Python ${{ matrix.python }}
41+
uses: actions/setup-python@v5
42+
with:
43+
python-version: ${{ matrix.python }}
44+
cache: "pip"
45+
46+
- name: Cache datasets
47+
uses: actions/cache@v4
48+
with:
49+
path: |
50+
~/.cache
51+
key: benchmark-state-${{ hashFiles('benchmarks/**') }}
52+
53+
- name: Install dependencies
54+
run: pip install 'asv>=0.6.4' packaging
55+
56+
- name: Configure ASV
57+
working-directory: ${{ env.ASV_DIR }}
58+
run: asv machine --yes
59+
60+
- name: Quick benchmark run
61+
working-directory: ${{ env.ASV_DIR }}
62+
run: asv run --dry-run --quick --show-stderr --verbose HEAD^!

.github/workflows/build.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
name: build
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
88

99
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1212

1313
jobs:
14-
package:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v3
18-
- name: Set up Python 3.10
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: "3.10"
22-
cache: "pip"
23-
cache-dependency-path: "**/pyproject.toml"
24-
- name: Install build dependencies
25-
run: python -m pip install --upgrade pip wheel twine build
26-
- name: Build package
27-
run: python -m build
28-
- name: Check package
29-
run: twine check --strict dist/*.whl
14+
package:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.10"
22+
cache: "pip"
23+
cache-dependency-path: "**/pyproject.toml"
24+
- name: Install build dependencies
25+
run: python -m pip install --upgrade pip wheel twine build
26+
- name: Build package
27+
run: python -m build
28+
- name: Check package
29+
run: twine check --strict dist/*.whl

.github/workflows/deployment.yml

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,60 @@
11
name: Deployment
22

33
on:
4-
push:
5-
branches: [main]
6-
tags: [v*]
7-
workflow_dispatch:
8-
inputs:
9-
reason:
10-
description: Reason for the workflow dispatch. Only "release" is valid.
11-
required: true
12-
default: release
4+
push:
5+
branches: [main]
6+
tags: [v*]
7+
workflow_dispatch:
8+
inputs:
9+
reason:
10+
description: Reason for the workflow dispatch. Only "release" is valid.
11+
required: true
12+
default: release
1313

1414
jobs:
15-
deploy:
16-
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.reason == 'release') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) }}
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v3
21-
with:
22-
fetch-depth: 0
23-
24-
- name: Set up Python 3.10
25-
uses: actions/setup-python@v4
26-
with:
27-
python-version: "3.10"
28-
29-
- name: Install hatch
30-
run: pip install hatch
31-
32-
# this will fail if the last commit is not tagged
33-
- name: Build project for distribution
34-
run: hatch build
35-
36-
- name: Publish on PyPI
37-
uses: pypa/gh-action-pypi-publish@release/v1
38-
with:
39-
user: __token__
40-
password: ${{ secrets.PYPI_TOKEN }}
41-
skip_existing: true
42-
verbose: true
43-
44-
sync-branches:
45-
if: ${{ github.event_name == 'workflow_dispatch' }}
46-
needs: deploy
47-
runs-on: ubuntu-latest
48-
steps:
49-
- uses: actions/checkout@v3
50-
- name: Extract branch name
51-
id: vars
52-
run: |
53-
echo ::set-output name=branch::${GITHUB_REF#refs/*/}
54-
55-
- name: Merge release into main
56-
uses: everlytic/[email protected]
57-
with:
58-
github_token: ${{ secrets.RELEASE_DISPATCH_TOKEN }}
59-
target_branch: main
60-
commit_message_template: ${{ format('[auto][ci skip] Merge branch ''{0}'' into main', steps.vars.outputs.branch) }}
15+
deploy:
16+
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.reason == 'release') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Set up Python 3.10
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: "3.10"
28+
29+
- name: Install hatch
30+
run: pip install hatch
31+
32+
# this will fail if the last commit is not tagged
33+
- name: Build project for distribution
34+
run: hatch build
35+
36+
- name: Publish on PyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1
38+
with:
39+
user: __token__
40+
password: ${{ secrets.PYPI_TOKEN }}
41+
skip-existing: true
42+
verbose: true
43+
44+
sync-branches:
45+
if: ${{ github.event_name == 'workflow_dispatch' }}
46+
needs: deploy
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v3
50+
- name: Extract branch name
51+
id: vars
52+
run: |
53+
echo ::set-output name=branch::${GITHUB_REF#refs/*/}
54+
55+
- name: Merge release into main
56+
uses: everlytic/[email protected]
57+
with:
58+
github_token: ${{ secrets.RELEASE_DISPATCH_TOKEN }}
59+
target_branch: main
60+
commit_message_template: ${{ format('[auto][ci skip] Merge branch ''{0}'' into main', steps.vars.outputs.branch) }}

0 commit comments

Comments
 (0)