Skip to content

Commit

Permalink
Merge branch 'dev' into add_missing_api_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bendichter authored Nov 27, 2024
2 parents c9207be + 52b1707 commit 9a25065
Show file tree
Hide file tree
Showing 99 changed files with 2,589 additions and 1,532 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ body:
label: Python Version
options:
- earlier
- 3.8
- 3.9
- "3.10"
- "3.11"
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/add-to-dashboard.yml

This file was deleted.

14 changes: 1 addition & 13 deletions .github/workflows/assess-file-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,17 @@ on:
SOURCE_CHANGED:
description: "Whether or not the files under /src/ were changed."
value: ${{ jobs.build.outputs.SOURCE_CHANGED }}
TESTING_CHANGED:
description: "Whether or not to regenerate the testing files and reupload them to DANI staging."
value: ${{ jobs.build.outputs.TESTING_CHANGED }}

jobs:
build:
runs-on: ubuntu-latest
# Map the job outputs to step outputs
outputs:
SOURCE_CHANGED: ${{ steps.flagged-changes.outputs.SOURCE_CHANGED }}
TESTING_CHANGED: ${{ steps.flagged-changes.outputs.TESTING_CHANGED }}

name: Test changed-files
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -33,7 +29,6 @@ jobs:
id: flagged-changes
run: |
echo "::set-output name=SOURCE_CHANGED::false"
echo "::set-output name=TESTING_CHANGED::false"
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo $file
if [[ $file == "src/nwbinspector/"* || $file == "requirements.txt" || $file == "setup.py" || $file == "tests/"* ]]
Expand All @@ -43,11 +38,4 @@ jobs:
else
echo "Source not changed"
fi
if [[ $file == "src/nwbinspector/testing.py" ]]
then
echo "Testing changed"
echo "::set-output name=TESTING_CHANGED::true"
else
echo "Testing not changed"
fi
done
10 changes: 5 additions & 5 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
python -m pip install --upgrade build
- name: Build package
run: python setup.py sdist bdist_wheel
run: python -m build
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.4.2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dailies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
uses: neurodatawithoutborders/nwbinspector/.github/workflows/doc-link-checks.yml@dev

test-dandi-latest:
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_release.yml@dev
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-release.yml@dev

test-dandi-dev:
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_dev.yml@dev
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-dev.yml@dev

test-dandi-dev-live:
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi_dev_live_service.yml@dev
uses: neurodatawithoutborders/nwbinspector/.github/workflows/dandi-dev-live-services.yml@dev

notify:
runs-on: ubuntu-latest
Expand All @@ -36,6 +36,6 @@ jobs:
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
subject: NWB Inspector Daily Failure
to: cody.c.baker.phd@gmail.com,smprince@lbl.gov
to: smprince@lbl.gov, rly@lbl.gov
from: NWB Inspector
body: "The daily workflow for the NWB Inspector failed: please check status at https://github.com/NeurodataWithoutBorders/nwbinspector/actions/workflows/dailies.yml"
32 changes: 32 additions & 0 deletions .github/workflows/dandi-dev-live-services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test against DANDI dev branch - all tests, including live services
on: workflow_call

jobs:
build-and-test:
name: Testing against current DANDI release and dev branch
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout local branch of source repository
uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Test against DANDI dev
run: |
pip install virtualenv
virtualenv --system-site-packages --python=python3 venvs/dandi_dev_tests
source venvs/dandi_dev_tests/bin/activate
pip install -e .[dandi]
cd ..
git clone https://github.com/dandi/dandi-cli
cd dandi-cli
pip install -e .[test]
pip install hdmf==3.14.3 # temporary: https://github.com/dandi/dandi-cli/issues/1494
pytest -vv
35 changes: 35 additions & 0 deletions .github/workflows/dandi-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test against DANDI dev branch - no network
on: workflow_call

env:
DANDI_TESTS_NONETWORK: "1"

jobs:
build-and-test:
name: Testing against current DANDI release and dev branch
runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- name: Checkout local branch of source repository
uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Test local branch of NWB Inspector against DANDI dev branch
run: |
pip install virtualenv
virtualenv --system-site-packages --python=python3 venvs/dandi_dev_tests
source venvs/dandi_dev_tests/bin/activate
pip install -e .[dandi]
cd ..
git clone https://github.com/dandi/dandi-cli
cd dandi-cli
pip install -e .[test]
pip install hdmf==3.14.3 # temporary: https://github.com/dandi/dandi-cli/issues/1494
pytest -rsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test against latest DANDI release - no network
name: Run NWB Inspector tests against latest DANDI release - no network
on: workflow_call

env:
Expand All @@ -25,7 +25,7 @@ jobs:
- '3.11'

steps:
- name: Set up environment
- name: Checkout local branch of source repository
uses: actions/checkout@v4
with:
# Fetch all commits so that versioneer will return something compatible
Expand All @@ -43,7 +43,9 @@ jobs:
pip install "dandi[extras,test]"
- name: Install this branch of NWB Inspector
run: pip install -e .
run: |
pip install -e .
pip install hdmf==3.14.3 # temporary: https://github.com/dandi/dandi-cli/issues/1494
- name: Run all NWB Inspector tests
run: python -m pytest -s -v
run: pytest -rsx
38 changes: 0 additions & 38 deletions .github/workflows/dandi_dev.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/dandi_dev_live_service.yml

This file was deleted.

26 changes: 17 additions & 9 deletions .github/workflows/deploy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ name: Deploy tests
on:
pull_request:

jobs:
cancel-previous-runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
assess-file-changes:
uses: catalystneuro/neuroconv/.github/workflows/assess-file-changes.yml@main

Expand Down Expand Up @@ -40,6 +39,15 @@ jobs:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/streaming-tests.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

run-read-nwbfile-tests:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/read-nwbfile-tests.yml
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

run-dev-gallery:
needs: assess-file-changes
Expand All @@ -49,17 +57,17 @@ jobs:
test-dandi-latest:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/dandi_release.yml
uses: ./.github/workflows/dandi-release.yml

test-dandi-dev:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/dandi_dev.yml
uses: ./.github/workflows/dandi-dev.yml

test-dandi-dev-live:
needs: assess-file-changes
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/dandi_dev_live_service.yml
uses: ./.github/workflows/dandi-dev-live-services.yml

check-final-status:
name: All tests passing
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/dev-gallery.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
name: Development Version Gallery
on: workflow_call

env:
TESTING_FILES_FOLDER_PATH: ./204919/testing_files/

jobs:
build-and-test:
name: Testing against dev PyNWB version
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: s-weigand/setup-conda@v1
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags

- name: Setup Python
uses: actions/setup-python@v5
with:
update-conda: true
python-version: 3.9
conda-channels: conda-forge
- uses: actions/checkout@v3
- run: git fetch --prune --unshallow --tags

- name: Install ROS3
run: conda install -c conda-forge h5py
- name: Install pytest
run: |
pip install pytest
pip install pytest-cov
- name: Install package
run: |
pip install -e ".[dandi]"
pip install git+https://github.com/neurodatawithoutborders/pynwb@dev
- name: Download testing data and set config path
run: |
dandi download "https://gui-staging.dandiarchive.org/#/dandiset/204919"
python -c "from nwbinspector.testing import update_testing_config; update_testing_config(key='LOCAL_PATH', value='./204919/testing_files/')"
run: dandi download "https://gui-staging.dandiarchive.org/#/dandiset/204919"

- name: Run pytest with coverage
- name: Run pytest
run: pytest -rsx
Loading

0 comments on commit 9a25065

Please sign in to comment.