Skip to content

Commit

Permalink
Merge branch 'master' into gh-977
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic authored Feb 13, 2025
2 parents f75e916 + 94a426c commit 5afe8e4
Show file tree
Hide file tree
Showing 116 changed files with 6,800 additions and 3,241 deletions.
4 changes: 0 additions & 4 deletions .codespellignore

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dandi/_version.py export-subst
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
config-file: codeql.yml

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{ matrix.language }}"
8 changes: 3 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,18 @@ jobs:
fail-fast: false
matrix:
python:
- 3.8
#- 3.9
#- 3.10
- '3.10'
#- 3.11
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all commits so that versioneer will return something compatible
# with semantic-version
fetch-depth: 0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up environment
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
# Annotate codespell within PR
- uses: codespell-project/codespell-problem-matcher@v1
- name: Run linters
run: |
tox -e lint
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -23,9 +23,9 @@ jobs:
chmod a+x ~/auto
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.9

- name: Install build & twine
run: python -m pip install build twine
Expand Down
44 changes: 32 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,37 @@ jobs:
- ubuntu-latest
- macos-latest
python:
- 3.8
- 3.9
- '3.10' # Needs quotes so YAML doesn't think it's 3.1
- '3.11'
- '3.12'
- '3.13'
mode:
- normal
include:
- os: ubuntu-latest
python: 3.8
python: 3.9
mode: dandi-api
- os: ubuntu-latest
python: 3.8
python: 3.9
mode: dev-deps
- os: ubuntu-latest
python: 3.8
python: 3.13
mode: dev-deps
- os: ubuntu-latest
python: 3.9
mode: nfs

steps:
- name: Set up environment
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# Fetch all commits so that versioneer will return something compatible
# with semantic-version
fetch-depth: 0

- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

Expand All @@ -72,7 +76,9 @@ jobs:
run: |
pip install git+https://github.com/jaraco/keyring
pip install git+https://github.com/NeurodataWithoutBorders/nwbinspector
pip install git+https://github.com/NeurodataWithoutBorders/pynwb
pip install git+https://github.com/NeurodataWithoutBorders/pynwb \
git+https://github.com/hdmf-dev/hdmf \
git+https://github.com/hdmf-dev/hdmf-zarr
- name: Create NFS filesystem
if: matrix.mode == 'nfs'
Expand All @@ -87,6 +93,10 @@ jobs:
echo HOME=/tmp/nfsmount/home >> "$GITHUB_ENV"
echo DANDI_DEVEL_INSTRUMENT_REQUESTS_SUPERLEN=1 >> "$GITHUB_ENV"
- name: Use scheduled test configuration
if: github.event_name == 'schedule'
run: echo PYTEST_ADDOPTS=--scheduled >> "$GITHUB_ENV"

- name: Run all tests
if: matrix.mode != 'dandi-api'
run: |
Expand All @@ -101,30 +111,40 @@ jobs:
do python "$f"
done
- name: Run Dandi API tests only
- name: Run DANDI API tests only
if: matrix.mode == 'dandi-api'
run: |
export DANDI_TESTS_AUDIT_CSV=/tmp/audit.csv
python -m pytest -s -v --cov=dandi --cov-report=xml --dandi-api dandi
if [ ! -e /tmp/audit.csv ]
then echo Audit file not created
exit 1
fi
lines="$(wc -l /tmp/audit.csv | awk '{print $1}')"
if [ "$lines" -lt 100 ]
then echo Audit file shorter than expected - only "$lines" lines
exit 1
fi
- name: Dump Docker Compose logs
if: failure() && startsWith(matrix.os, 'ubuntu')
run: |
docker-compose \
docker compose \
-f dandi/tests/data/dandiarchive-docker/docker-compose.yml \
logs --timestamps
- name: Shut down Docker Compose
if: startsWith(matrix.os, 'ubuntu')
run: |
docker-compose \
docker compose \
-f dandi/tests/data/dandiarchive-docker/docker-compose.yml \
down -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
files: ./coverage.xml
flags: unittests
# name: codecov-umbrella
# yml: ./codecov.yml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.9'

- name: Install dependencies
run: |
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/update-year.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update year

on:
# We would not trigger update until actual changes are done
# to our code, or we explicitly request
push:
branches:
- 'master'
workflow_dispatch:


jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: FantasticFiasco/action-update-license-year@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ pip-wheel-metadata/
sandbox/
venv/
venvs/
.DS_Store
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: codespell
exclude: ^(dandi/_version\.py|dandi/due\.py|versioneer\.py)$
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
rev: 7.0.0
hooks:
- id: flake8
exclude: ^(dandi/_version\.py|dandi/due\.py|versioneer\.py)$
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.10"
python:
install:
- requirements: docs/requirements.txt
Expand Down
Loading

0 comments on commit 5afe8e4

Please sign in to comment.