Skip to content

Commit e01ddc8

Browse files
authored
template update (#147)
* template update * py3.12 * remove rej
1 parent 0da0cfe commit e01ddc8

File tree

6 files changed

+33
-28
lines changed

6 files changed

+33
-28
lines changed

.cruft.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
3-
"commit": "6202049ef091f17ba01afa263cbd72ec99775bcf",
3+
"commit": "d8e38d412bfd81121857042e6b2b755b0bbac1c5",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {
@@ -13,7 +13,7 @@
1313
"integration_tests": "True",
1414
"pypi": true,
1515
"_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
16-
"_commit": "6202049ef091f17ba01afa263cbd72ec99775bcf"
16+
"_commit": "d8e38d412bfd81121857042e6b2b755b0bbac1c5"
1717
}
1818
},
1919
"directory": null

.github/workflows/on-push.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
pre-commit:
2323
runs-on: ubuntu-latest
2424
steps:
25-
- uses: actions/checkout@v4
25+
- uses: actions/checkout@v5
2626
- uses: actions/setup-python@v5
2727
with:
2828
python-version: 3.x
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333

3434
steps:
35-
- uses: actions/checkout@v4
35+
- uses: actions/checkout@v5
3636
- uses: actions/setup-python@v5
3737
with:
3838
python-version: 3.x
@@ -55,11 +55,11 @@ jobs:
5555
runs-on: ubuntu-latest
5656
strategy:
5757
matrix:
58-
python-version: ['3.11']
58+
python-version: ['3.11', '3.12']
5959

6060
steps:
61-
- uses: actions/checkout@v4
62-
- uses: actions/download-artifact@v4
61+
- uses: actions/checkout@v5
62+
- uses: actions/download-artifact@v5
6363
with:
6464
name: combined-environments
6565
path: ci
@@ -87,8 +87,8 @@ jobs:
8787
runs-on: ubuntu-latest
8888

8989
steps:
90-
- uses: actions/checkout@v4
91-
- uses: actions/download-artifact@v4
90+
- uses: actions/checkout@v5
91+
- uses: actions/download-artifact@v5
9292
with:
9393
name: combined-environments
9494
path: ci
@@ -103,7 +103,7 @@ jobs:
103103
cache-environment-key: environment-${{ steps.date.outputs.date }}
104104
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
105105
create-args: >-
106-
python=3.11
106+
python=3.12
107107
- name: Install package
108108
run: |
109109
python -m pip install --no-deps -e .
@@ -116,8 +116,8 @@ jobs:
116116
runs-on: ubuntu-latest
117117

118118
steps:
119-
- uses: actions/checkout@v4
120-
- uses: actions/download-artifact@v4
119+
- uses: actions/checkout@v5
120+
- uses: actions/download-artifact@v5
121121
with:
122122
name: combined-environments
123123
path: ci
@@ -132,7 +132,7 @@ jobs:
132132
cache-environment-key: environment-${{ steps.date.outputs.date }}
133133
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
134134
create-args: >-
135-
python=3.11
135+
python=3.12
136136
- name: Install package
137137
run: |
138138
python -m pip install --no-deps -e .
@@ -151,14 +151,14 @@ jobs:
151151
include:
152152
- python-version: '3.9'
153153
extra: -ci
154-
- python-version: '3.12'
154+
- python-version: '3.13'
155155
extra: -ci
156-
- python-version: '3.11'
156+
- python-version: '3.12'
157157
extra: -integration
158158

159159
steps:
160-
- uses: actions/checkout@v4
161-
- uses: actions/download-artifact@v4
160+
- uses: actions/checkout@v5
161+
- uses: actions/download-artifact@v5
162162
with:
163163
name: combined-environments
164164
path: ci
@@ -192,10 +192,10 @@ jobs:
192192
(needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped')
193193
194194
steps:
195-
- uses: actions/checkout@v4
195+
- uses: actions/checkout@v5
196196
- uses: actions/setup-python@v5
197197
with:
198-
python-version: '3.11'
198+
python-version: '3.12'
199199
- name: Install package
200200
run: |
201201
python -m pip install --upgrade pip
@@ -230,7 +230,7 @@ jobs:
230230
id-token: write # IMPORTANT: this permission is mandatory for trusted publish
231231

232232
steps:
233-
- uses: actions/download-artifact@v4
233+
- uses: actions/download-artifact@v5
234234
with:
235235
name: distribution
236236
path: dist

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: trailing-whitespace
66
- id: end-of-file-fixer
@@ -12,12 +12,12 @@ repos:
1212
- id: debug-statements
1313
- id: mixed-line-ending
1414
- repo: https://github.com/keewis/blackdoc
15-
rev: v0.3.9
15+
rev: v0.4.1
1616
hooks:
1717
- id: blackdoc
1818
additional_dependencies: [black==23.11.0]
1919
- repo: https://github.com/astral-sh/ruff-pre-commit
20-
rev: v0.9.7
20+
rev: v0.12.9
2121
hooks:
2222
- id: ruff
2323
args: [--fix, --show-fixes]
@@ -27,13 +27,13 @@ repos:
2727
hooks:
2828
- id: mdformat
2929
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
30-
rev: v2.14.0
30+
rev: v2.15.0
3131
hooks:
3232
- id: pretty-format-yaml
3333
args: [--autofix, --preserve-quotes]
3434
- id: pretty-format-toml
3535
args: [--autofix]
3636
- repo: https://github.com/gitleaks/gitleaks
37-
rev: v8.24.0
37+
rev: v8.28.0
3838
hooks:
3939
- id: gitleaks

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WORKDIR /src/cacholote
44

55
COPY environment.yml /src/cacholote/
66

7-
RUN conda install -c conda-forge gcc python=3.11 \
7+
RUN conda install -c conda-forge gcc python=3.12 \
88
&& conda env update -n base -f environment.yml
99

1010
COPY . /src/cacholote

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ Efficiently cache calls to functions
1212
>>> @cacholote.cacheable
1313
... def now():
1414
... import datetime
15+
...
1516
... return datetime.datetime.now()
17+
...
1618

1719
>>> now() == now()
1820
True
1921

2022
>>> with cacholote.config.set(use_cache=False):
2123
... now() == now()
24+
...
2225
False
2326

2427
```
@@ -66,6 +69,7 @@ True
6669
>>> @cacholote.cacheable
6770
... def dataset_from_dict(ds_dict):
6871
... return xr.Dataset(ds_dict)
72+
...
6973

7074
>>> ds = dataset_from_dict({"foo": 0})
7175
>>> ds
@@ -87,10 +91,10 @@ Defaults are controlled by environment variables and dotenv files. See `help(cac
8791

8892
## Workflow for developers/contributors
8993

90-
For best experience create a new conda environment (e.g. DEVELOP) with Python 3.11:
94+
For best experience create a new conda environment (e.g. DEVELOP) with Python 3.12:
9195

9296
```
93-
conda create -n DEVELOP -c conda-forge python=3.11
97+
conda create -n DEVELOP -c conda-forge python=3.12
9498
conda activate DEVELOP
9599
```
96100

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ classifiers = [
1414
"Programming Language :: Python :: 3.10",
1515
"Programming Language :: Python :: 3.11",
1616
"Programming Language :: Python :: 3.12",
17+
"Programming Language :: Python :: 3.13",
1718
"Topic :: Scientific/Engineering"
1819
]
1920
dependencies = [

0 commit comments

Comments
 (0)