Skip to content

Commit 46074f2

Browse files
committed
Merge remote-tracking branch 'origin/master' into release-schema
* origin/master: (24 commits) Add Python 3.13 and 3.14 to package metadata and test matrices Initial plan ci: remove last use of DANDI_ALLOW_LOCALHOST_URLS env var [pre-commit.ci] pre-commit autoupdate maint: drop Python 3.9 support, require Python >=3.10 [pre-commit.ci] pre-commit autoupdate fix: remove `readOnly` JSON Schema keyword on `sameAs` field of `Dandiset` test: provide tests for `Dandiset.sameAs` test: provide basic Dandiset metadata through fixture feat: add `sameAs` field to the `Dandiset` model feat: define `VERSION_NUM_PATTERN` and use it test: add wait time after DOI creation ci: update test configuration to vendorize dandiapi instance in tests ci(test): remove use of py3.9 in tests against dandi-cli [gh-actions](deps): Bump actions/checkout from 5 to 6 Update CHANGELOG.md [skip ci] BF: provide workdir for scripted steps to be within dandischema [pre-commit.ci] auto fixes from pre-commit.com hooks Add comments into the script to ease telling repos apart Fix trailing whitespace issues detected by pre-commit ... @ Conflicts: @ dandischema/metadata.py @ dandischema/tests/test_metadata.py
2 parents 43cb3f6 + e3ea45b commit 46074f2

File tree

17 files changed

+373
-117
lines changed

17 files changed

+373
-117
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010

1111
steps:
1212
- name: Set up environment
13-
uses: actions/checkout@v5
13+
uses: actions/checkout@v6
1414
with: # no need for the history
1515
fetch-depth: 1
1616
- name: Set up Python
1717
uses: actions/setup-python@v6
1818
with:
19-
python-version: '3.9'
19+
python-version: '3.10'
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip

.github/workflows/release.yml

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
auto-version: ${{ steps.auto-version.outputs.version }}
1919
steps:
2020
- name: Checkout source
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@v6
2222
with:
2323
# A full checkout is required so that auto will have access to tag
2424
# information.
@@ -43,8 +43,13 @@ jobs:
4343
needs: release-check
4444
if: needs.release-check.outputs.auto-version != ''
4545
steps:
46+
- name: Configure
47+
run: |
48+
git config --global user.email "team@dandiarchive.org"
49+
git config --global user.name "DANDI Bot"
50+
4651
- name: Checkout source
47-
uses: actions/checkout@v5
52+
uses: actions/checkout@v6
4853
with:
4954
fetch-depth: 0
5055
path: dandischema
@@ -58,23 +63,19 @@ jobs:
5863
- name: Set up Python
5964
uses: actions/setup-python@v6
6065
with:
61-
python-version: 3.9
66+
python-version: '3.10'
6267

6368
- name: Install dandischema
6469
run: python -m pip install .
6570
working-directory: dandischema
6671

6772
- name: Get schema version
6873
run: |
69-
SCHEMA_VERSION="$(python -c 'from dandischema.consts import DANDI_SCHEMA_VERSION; print(DANDI_SCHEMA_VERSION)')"
70-
if ! echo "$SCHEMA_VERSION" | grep -qP '^\d+\.\d+\.\d+$'
71-
then printf "[ERROR] Invalid schema version: '%s'\n" "$SCHEMA_VERSION"
72-
exit 1
73-
fi
74-
echo "SCHEMA_VERSION=$SCHEMA_VERSION" >> "$GITHUB_ENV"
74+
tools/get-schema-version # it will also check if schema version is ok
75+
working-directory: dandischema
7576

7677
- name: Checkout dandi/schema
77-
uses: actions/checkout@v5
78+
uses: actions/checkout@v6
7879
with:
7980
repository: dandi/schema
8081
path: schema
@@ -118,19 +119,7 @@ jobs:
118119

119120
- name: Commit schema changes and create new tag
120121
run: |
121-
LIBRARY_VERSION="$(git -C ../dandischema describe --tags --exact-match)"
122-
123-
git config --global user.email "team@dandiarchive.org"
124-
git config --global user.name "DANDI Bot"
125-
126-
git add releases
127-
if ! git diff --quiet --cached
128-
then git commit -m "Publish model schema v$SCHEMA_VERSION as of dandischema v$LIBRARY_VERSION"
129-
git push
130-
git -C ../dandischema tag -m "Schema v$SCHEMA_VERSION, released in dandischema v$LIBRARY_VERSION" schema-$SCHEMA_VERSION
131-
git -C ../dandischema push --tags
132-
else echo "No changes to commit"
133-
fi
134-
working-directory: schema
122+
tools/commit-and-push-schemata ../schema
123+
working-directory: dandischema
135124

136125
# vim:set sts=2:

.github/workflows/test-dandi-cli.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414
env:
1515
NO_ET: 1
16-
DANDI_ALLOW_LOCALHOST_URLS: 1
1716
DANDI_TESTS_PULL_DOCKER_COMPOSE: 0
1817
strategy:
1918
fail-fast: false
@@ -24,7 +23,6 @@ jobs:
2423
- macos-latest
2524
python:
2625
# Use the only Python which is ATM also used by dandi-api
27-
# - 3.9
2826
# - '3.10'
2927
- '3.11'
3028
# - '3.12'
@@ -33,20 +31,37 @@ jobs:
3331
- release
3432
mode:
3533
- normal
34+
vendored_dandiapi:
35+
# Allow vendor information for the dandi-api instance to default to
36+
# the default values specified in
37+
# dandi/tests/data/dandiarchive-docker/docker-compose.yml of the dandi-cli
38+
# repo.
39+
- default
3640
include:
3741
- os: ubuntu-latest
38-
python: 3.9
42+
python: "3.10"
3943
mode: dandi-devel
4044
version: master
4145
- os: ubuntu-latest
42-
python: 3.9
46+
python: "3.10"
4347
mode: dandi-devel
4448
version: release
45-
exclude:
46-
# Temporarily disabled due to h5py/hdf5 dependency issue
47-
# See <https://github.com/dandi/dandi-cli/pull/315>
48-
- os: windows-latest
49-
python: 3.9
49+
- os: ubuntu-latest
50+
python: "3.11"
51+
mode: normal
52+
version: master
53+
vendored_dandiapi: ember-dandi
54+
instance_name: EMBER-DANDI
55+
instance_identifier: 'RRID:SCR_026700'
56+
doi_prefix: '10.82754'
57+
- os: ubuntu-latest
58+
python: "3.11"
59+
mode: normal
60+
version: release
61+
vendored_dandiapi: ember-dandi
62+
instance_name: EMBER-DANDI
63+
instance_identifier: 'RRID:SCR_026700'
64+
doi_prefix: '10.82754'
5065
steps:
5166
- name: Set up Python ${{ matrix.python }}
5267
uses: actions/setup-python@v6
@@ -79,7 +94,7 @@ jobs:
7994
run: echo DANDI_DEVEL=1 >> "$GITHUB_ENV"
8095

8196
- name: Check out dandischema
82-
uses: actions/checkout@v5
97+
uses: actions/checkout@v6
8398
with:
8499
# Fetch all commits so that versioningit will return something
85100
# compatible with semantic-version
@@ -99,5 +114,20 @@ jobs:
99114
.
100115
working-directory: dandischema
101116

117+
# Set only if matrix.instance_name is defined
118+
- name: Set DANDI_TESTS_INSTANCE_NAME
119+
if: ${{ matrix.instance_name }}
120+
run: echo "DANDI_TESTS_INSTANCE_NAME=${{ matrix.instance_name }}" >> "$GITHUB_ENV"
121+
122+
# Set only if matrix.instance_identifier is defined
123+
- name: Set DANDI_TESTS_INSTANCE_IDENTIFIER
124+
if: ${{ matrix.instance_identifier }}
125+
run: echo "DANDI_TESTS_INSTANCE_IDENTIFIER=${{ matrix.instance_identifier }}" >> "$GITHUB_ENV"
126+
127+
# Set only if matrix.doi_prefix is defined
128+
- name: Set DANDI_TESTS_DOI_PREFIX
129+
if: ${{ matrix.doi_prefix }}
130+
run: echo "DANDI_TESTS_DOI_PREFIX=${{ matrix.doi_prefix }}" >> "$GITHUB_ENV"
131+
102132
- name: Run dandi-cli tests
103133
run: python -m pytest -s -v --pyargs dandi

.github/workflows/test-nonetwork.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ jobs:
1919
- ubuntu-latest
2020
- macos-latest
2121
python:
22-
- 3.9
2322
- '3.10'
2423
- '3.11'
2524
- '3.12'
25+
- '3.13'
26+
- '3.14'
2627
steps:
2728
- name: Set up environment
28-
uses: actions/checkout@v5
29+
uses: actions/checkout@v6
2930
with:
3031
# Fetch all commits so that versioningit will return something
3132
# compatible with semantic-version

.github/workflows/test-schema.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ jobs:
1111
if: contains(github.event.pull_request.labels.*.name, 'release')
1212
steps:
1313
- name: Checkout this repository
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v6
1515
with:
1616
fetch-depth: 0 # Need history for `git describe`
1717
path: dandischema
1818

1919
- name: Set up Python
2020
uses: actions/setup-python@v6
2121
with:
22-
python-version: '3.9'
22+
python-version: '3.10'
2323

2424
- name: Install dandischema
2525
run: python -m pip install .
2626
working-directory: dandischema
2727

2828
- name: Checkout dandi/schema
29-
uses: actions/checkout@v5
29+
uses: actions/checkout@v6
3030
with:
3131
repository: dandi/schema
3232
path: schema

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,28 @@ jobs:
1616
fail-fast: false
1717
matrix:
1818
os: [windows-latest, ubuntu-latest, macos-latest]
19-
python: ['3.9', '3.10', '3.11', '3.12']
19+
python: ['3.10', '3.11', '3.12', '3.13', '3.14']
2020
vendored_env: [unvendored]
2121
include:
2222
- os: ubuntu-latest
23-
python: '3.9'
23+
python: '3.10'
2424
vendored_env: dandi
2525
instance_name: DANDI
2626
instance_identifier: 'RRID:SCR_017571'
2727
doi_prefix: '10.80507'
2828
- os: ubuntu-latest
29-
python: '3.9'
29+
python: '3.10'
3030
vendored_env: ember-dandi
3131
instance_name: EMBER-DANDI
3232
instance_identifier: 'RRID:SCR_026700'
3333
doi_prefix: '10.82754'
3434
- os: ubuntu-latest
35-
python: '3.9'
35+
python: '3.10'
3636
vendored_env: ember-dandi-no-doi
3737
instance_name: EMBER-DANDI
3838
steps:
3939
- name: Set up environment
40-
uses: actions/checkout@v5
40+
uses: actions/checkout@v6
4141
with:
4242
# Fetch all commits so that versioningit will return something
4343
# compatible with semantic-version

.github/workflows/typing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Check out repository
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@v6
1313
with:
1414
fetch-depth: 0
1515

1616
- name: Set up Python
1717
uses: actions/setup-python@v6
1818
with:
19-
python-version: '3.9'
19+
python-version: '3.10'
2020

2121
- name: Install dependencies
2222
run: |

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: trailing-whitespace
88
- id: end-of-file-fixer
99
- id: check-yaml
1010
- id: check-added-large-files
11-
- repo: https://github.com/psf/black
12-
rev: 24.10.0
11+
- repo: https://github.com/psf/black-pre-commit-mirror
12+
rev: 26.1.0
1313
hooks:
1414
- id: black
1515
- repo: https://github.com/PyCQA/isort
16-
rev: 5.13.2
16+
rev: 8.0.1
1717
hooks:
1818
- id: isort
1919
- repo: https://github.com/codespell-project/codespell
20-
rev: v2.3.0
20+
rev: v2.4.1
2121
hooks:
2222
- id: codespell
2323
- repo: https://github.com/pycqa/flake8
24-
rev: 7.1.1
24+
rev: 7.3.0
2525
hooks:
2626
- id: flake8

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 0.12.1 (Wed Nov 26 2025)
2+
3+
#### 🐛 Bug Fix
4+
5+
- Fix migrate() to update schemaVersion for all migrations, not just pre-0.6.0 [#354](https://github.com/dandi/dandi-schema/pull/354) ([@Copilot](https://github.com/Copilot))
6+
7+
#### 🏠 Internal
8+
9+
- fix(ci): provide workdir for scripted steps to be within dandischema [#357](https://github.com/dandi/dandi-schema/pull/357) ([@yarikoptic](https://github.com/yarikoptic))
10+
- chore: refactor release action to move schemata related code into scripts [#349](https://github.com/dandi/dandi-schema/pull/349) ([@yarikoptic](https://github.com/yarikoptic) [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot]))
11+
12+
#### Authors: 3
13+
14+
- [@Copilot](https://github.com/Copilot)
15+
- [@pre-commit-ci[bot]](https://github.com/pre-commit-ci[bot])
16+
- Yaroslav Halchenko ([@yarikoptic](https://github.com/yarikoptic))
17+
18+
---
19+
120
# 0.12.0 (Thu Nov 20 2025)
221

322
### Release Notes

dandischema/datacite/tests/test_datacite.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import os
44
import random
5+
from time import sleep
56
from typing import TYPE_CHECKING, Any, Dict, Tuple, cast
67

78
from jsonschema import Draft7Validator
@@ -158,6 +159,10 @@ def datacite_post(datacite: dict, doi: str) -> None:
158159
)
159160
rp.raise_for_status()
160161

162+
# Wait for DataCite to correctly process the DOI creation
163+
# to avoid the bug documented in https://github.com/datacite/datacite/issues/2307
164+
sleep(3)
165+
161166
# checking if i'm able to get the url
162167
rg = requests.get(url=f"https://api.test.datacite.org/dois/{doi}/activities")
163168
rg.raise_for_status()

0 commit comments

Comments
 (0)