Skip to content

Commit 3378e9a

Browse files
committed
Merge branch 'main' into pr/selmanozleyen/1016
2 parents 159bb5f + 17341d0 commit 3378e9a

File tree

10 files changed

+275
-273
lines changed

10 files changed

+275
-273
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/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) }}

.github/workflows/release.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
name: Release
22

33
on:
4-
release:
5-
types: [published]
4+
release:
5+
types: [published]
66

77
jobs:
8-
package_and_release:
9-
runs-on: ubuntu-latest
10-
if: startsWith(github.ref, 'refs/tags/v')
11-
steps:
12-
- uses: actions/checkout@v3
13-
- name: Set up Python 3.12
14-
uses: actions/setup-python@v5
15-
with:
16-
python-version: "3.12"
17-
cache: pip
18-
- name: Install build dependencies
19-
run: python -m pip install --upgrade pip wheel twine build
20-
- name: Build package
21-
run: python -m build
22-
- name: Check package
23-
run: twine check --strict dist/*.whl
24-
- name: Install hatch
25-
run: pip install hatch
26-
- name: Build project for distribution
27-
run: hatch build
28-
- name: Publish a Python distribution to PyPI
29-
uses: pypa/gh-action-pypi-publish@release/v1
30-
with:
31-
password: ${{ secrets.PYPI_TOKEN }}
8+
package_and_release:
9+
runs-on: ubuntu-latest
10+
if: startsWith(github.ref, 'refs/tags/v')
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Set up Python 3.12
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.12"
17+
cache: pip
18+
- name: Install build dependencies
19+
run: python -m pip install --upgrade pip wheel twine build
20+
- name: Build package
21+
run: python -m build
22+
- name: Check package
23+
run: twine check --strict dist/*.whl
24+
- name: Install hatch
25+
run: pip install hatch
26+
- name: Build project for distribution
27+
run: hatch build
28+
- name: Publish a Python distribution to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
with:
31+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)