Skip to content

Commit 75fbff4

Browse files
authored
#236 Merge pull request from astropenguin/astropenguin/issue235
Update development environment
2 parents 5506e35 + 66f98a3 commit 75fbff4

31 files changed

+1465
-3874
lines changed

.devcontainer/devcontainer.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,25 @@
11
{
22
"name": "xarray-dataclasses",
3-
"image":"python:3.13",
4-
"onCreateCommand": "pip install poetry==1.8.5",
5-
"postCreateCommand": "poetry install",
3+
"image": "ghcr.io/astral-sh/uv:python3.12-bookworm",
4+
"runArgs": [
5+
"--name=xarray-dataclasses"
6+
],
67
"containerEnv": {
7-
"POETRY_VIRTUALENVS_CREATE": "false"
8+
"UV_PROJECT_ENVIRONMENT": "/usr/local"
89
},
10+
"postCreateCommand": "uv sync --frozen",
911
"customizations": {
1012
"vscode": {
1113
"extensions": [
12-
"github.vscode-pull-request-github",
13-
"mhutchie.git-graph",
14-
"ms-python.python",
14+
"ms-python.black-formatter",
1515
"streetsidesoftware.code-spell-checker",
1616
"tamasfe.even-better-toml"
1717
],
1818
"settings": {
19-
"files.insertFinalNewline": true,
20-
"files.trimTrailingWhitespace": true,
21-
"python.formatting.provider": "black",
2219
"python.languageServer": "Pylance",
2320
"[python]": {
24-
"editor.formatOnSave": true,
25-
"editor.insertSpaces": true,
26-
"editor.tabSize": 4
21+
"editor.defaultFormatter": "ms-python.black-formatter",
22+
"editor.formatOnSave": true
2723
}
2824
}
2925
}

.github/CODE_OF_CONDUCT.md

Lines changed: 0 additions & 76 deletions
This file was deleted.

.github/CONTRIBUTING.md

Lines changed: 0 additions & 107 deletions
This file was deleted.

.github/workflows/docs.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Docs
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
job:
10+
name: Docs
11+
runs-on: ubuntu-latest
12+
container: ghcr.io/astral-sh/uv:python3.12-bookworm
13+
env:
14+
UV_PROJECT_ENVIRONMENT: /usr/local
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: echo "::set-output name=tag::${GITHUB_REF##*/}"
18+
id: tag
19+
- run: uv sync --frozen
20+
- run: docs/build
21+
- uses: peaceiris/actions-gh-pages@v4
22+
with:
23+
destination_dir: ${{ steps.tag.outputs.tag }}
24+
force_orphan: true
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: ./docs/_build

.github/workflows/gh-pages.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/pypi.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
job:
10+
name: PyPI
11+
runs-on: ubuntu-latest
12+
container: ghcr.io/astral-sh/uv:python3.12-bookworm
13+
env:
14+
UV_PROJECT_ENVIRONMENT: /usr/local
15+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v4
18+
- run: uv build && uv publish

.github/workflows/pypi.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/tests.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
job:
13+
name: Test (${{ matrix.env }})
14+
runs-on: ubuntu-latest
15+
container: ghcr.io/astral-sh/uv:${{ matrix.env }}
16+
env:
17+
PYTHON_DIRS: docs tests xarray_dataclasses
18+
UV_PROJECT_ENVIRONMENT: /usr/local
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
env:
23+
- python3.9-bookworm
24+
- python3.10-bookworm
25+
- python3.11-bookworm
26+
- python3.12-bookworm
27+
- python3.13-bookworm
28+
steps:
29+
- uses: actions/checkout@v4
30+
- run: uv sync --frozen
31+
- run: black --check ${PYTHON_DIRS}
32+
- run: pyright ${PYTHON_DIRS}
33+
- run: docs/build

.github/workflows/tests.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)