Skip to content

Commit

Permalink
Merge branch 'main' into neuroconv_aws
Browse files Browse the repository at this point in the history
  • Loading branch information
h-mayorquin authored Nov 28, 2024
2 parents bac3510 + c4afad3 commit 85c31fa
Show file tree
Hide file tree
Showing 68 changed files with 1,042 additions and 510 deletions.
1 change: 1 addition & 0 deletions .github/workflows/all_os_versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["ubuntu-latest", "macos-latest", "windows-latest", "macos-13"]
1 change: 1 addition & 0 deletions .github/workflows/all_python_versions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["3.9", "3.10", "3.11", "3.12"]
23 changes: 23 additions & 0 deletions .github/workflows/dailies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,55 @@ on:
- cron: "0 4 * * *" # Daily at 8PM PST, 11PM EST, 5AM CET to avoid working hours

jobs:
load_python_and_os_versions:
runs-on: ubuntu-latest
outputs:
ALL_PYTHON_VERSIONS: ${{ steps.load_python_versions.outputs.python_versions }}
ALL_OS_VERSIONS: ${{ steps.load_os_versions.outputs.os_versions }}
steps:
- uses: actions/checkout@v4
- id: load_python_versions
run: echo "python_versions=$(cat ./.github/workflows/all_python_versions.txt)" >> "$GITHUB_OUTPUT"
- id: load_os_versions
run: echo "os_versions=$(cat ./.github/workflows/all_os_versions.txt)" >> "$GITHUB_OUTPUT"

build-and-upload-docker-image-dev:
uses: ./.github/workflows/build_and_upload_docker_image_dev.yml
secrets:
DOCKER_UPLOADER_USERNAME: ${{ secrets.DOCKER_UPLOADER_USERNAME }}
DOCKER_UPLOADER_PASSWORD: ${{ secrets.DOCKER_UPLOADER_PASSWORD }}

run-daily-tests:
needs: load_python_and_os_versions
uses: ./.github/workflows/testing.yml
secrets:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_GIN_BUCKET: ${{ secrets.S3_GIN_BUCKET }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
python-versions: ${{ needs.load_python_and_os_versions.outputs.ALL_PYTHON_VERSIONS }}
os-versions: ${{ needs.load_python_and_os_versions.outputs.ALL_OS_VERSIONS }}

run-daily-dev-tests:
needs: load_python_and_os_versions
uses: ./.github/workflows/dev-testing.yml
secrets:
DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
S3_GIN_BUCKET: ${{ secrets.S3_GIN_BUCKET }}
with:
python-versions: ${{ needs.load_python_and_os_versions.outputs.ALL_PYTHON_VERSIONS }}

run-daily-live-service-testing:
needs: load_python_and_os_versions
uses: ./.github/workflows/live-service-testing.yml
secrets:
DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }}
with:
python-versions: ${{ needs.load_python_and_os_versions.outputs.ALL_PYTHON_VERSIONS }}
os-versions: ${{ needs.load_python_and_os_versions.outputs.ALL_OS_VERSIONS }}

run-daily-neuroconv-docker-testing:
uses: ./.github/workflows/neuroconv_docker_testing.yml
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/deploy-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ concurrency:
cancel-in-progress: true

jobs:
load_python_and_os_versions:
runs-on: ubuntu-latest
outputs:
ALL_PYTHON_VERSIONS: ${{ steps.load_python_versions.outputs.python_versions }}
ALL_OS_VERSIONS: ${{ steps.load_os_versions.outputs.os_versions }}
steps:
- uses: actions/checkout@v4
- id: load_python_versions
run: echo "python_versions=$(cat ./.github/workflows/all_python_versions.txt)" >> "$GITHUB_OUTPUT"
- id: load_os_versions
run: echo "os_versions=$(cat ./.github/workflows/all_os_versions.txt)" >> "$GITHUB_OUTPUT"

assess-file-changes:
uses: ./.github/workflows/assess-file-changes.yml
Expand All @@ -31,7 +42,7 @@ jobs:
0
run-tests:
needs: assess-file-changes
needs: [assess-file-changes, load_python_and_os_versions]
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/testing.yml
secrets:
Expand All @@ -40,28 +51,28 @@ jobs:
S3_GIN_BUCKET: ${{ secrets.S3_GIN_BUCKET }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with: # Ternary operator: condition && value_if_true || value_if_false
python-versions: ${{ github.event.pull_request.draft == true && '["3.9"]' || '["3.9", "3.10", "3.11", "3.12"]' }}
os-versions: ${{ github.event.pull_request.draft == true && '["ubuntu-latest"]' || '["ubuntu-latest", "macos-latest", "macos-13", "windows-latest"]' }}
python-versions: ${{ github.event.pull_request.draft == true && '["3.9"]' || needs.load_python_and_os_versions.outputs.ALL_PYTHON_VERSIONS }}
os-versions: ${{ github.event.pull_request.draft == true && '["ubuntu-latest"]' || needs.load_python_and_os_versions.outputs.ALL_OS_VERSIONS }}

# If the conversion gallery is the only thing that changed, run doctests only
run-doctests-only:
needs: assess-file-changes
needs: [assess-file-changes, load_python_and_os_versions]
if: ${{ needs.assess-file-changes.outputs.CONVERSION_GALLERY_CHANGED == 'true' && needs.assess-file-changes.outputs.SOURCE_CHANGED != 'true' }}
uses: ./.github/workflows/doctests.yml
with: # Ternary operator: condition && value_if_true || value_if_false
python-versions: ${{ github.event.pull_request.draft == true && '["3.9"]' || '["3.9", "3.10", "3.11", "3.12"]' }}
os-versions: ${{ github.event.pull_request.draft == true && '["ubuntu-latest"]' || '["ubuntu-latest", "macos-latest", "macos-13", "windows-latest"]' }}
python-versions: ${{ github.event.pull_request.draft == true && '["3.9"]' || needs.load_python_and_os_versions.outputs.ALL_PYTHON_VERSIONS }}
os-versions: ${{ github.event.pull_request.draft == true && '["ubuntu-latest"]' || needs.load_python_and_os_versions.outputs.ALL_OS_VERSIONS }}


run-live-service-tests:
needs: assess-file-changes
needs: [assess-file-changes, load_python_and_os_versions]
if: ${{ needs.assess-file-changes.outputs.SOURCE_CHANGED == 'true' }}
uses: ./.github/workflows/live-service-testing.yml
secrets:
DANDI_API_KEY: ${{ secrets.DANDI_API_KEY }}
with: # Ternary operator: condition && value_if_true || value_if_false
python-versions: ${{ github.event.pull_request.draft == true && '["3.9"]' || '["3.9", "3.10", "3.11", "3.12"]' }}
os-versions: ${{ github.event.pull_request.draft == true && '["ubuntu-latest"]' || '["ubuntu-latest", "macos-latest", "macos-13", "windows-latest"]' }}
python-versions: ${{ github.event.pull_request.draft == true && '["3.9"]' || needs.load_python_and_os_versions.outputs.ALL_PYTHON_VERSIONS }}
os-versions: ${{ github.event.pull_request.draft == true && '["ubuntu-latest"]' || needs.load_python_and_os_versions.outputs.ALL_OS_VERSIONS }}


check-final-status:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/dev-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
description: 'List of Python versions to use in matrix, as JSON string'
required: true
type: string
default: '["3.9", "3.10", "3.11", "3.12"]'
secrets:
DANDI_API_KEY:
required: true
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/doctests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ on:
description: 'List of Python versions to use in matrix, as JSON string'
required: true
type: string
default: '["3.9", "3.10", "3.11", "3.12"]'
os-versions:
description: 'List of OS versions to use in matrix, as JSON string'
required: true
type: string
default: '["ubuntu-latest", "macos-latest", "windows-latest"]'


jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/live-service-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ on:
description: 'List of Python versions to use in matrix, as JSON string'
required: true
type: string
default: '["3.9", "3.10", "3.11", "3.12"]'
os-versions:
description: 'List of OS versions to use in matrix, as JSON string'
required: true
type: string
default: '["ubuntu-latest", "macos-latest", "windows-latest"]'

secrets:
DANDI_API_KEY:
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,10 @@ on:
description: 'List of Python versions to use in matrix, as JSON string'
required: true
type: string
default: '["3.9", "3.10", "3.11", "3.12"]'
os-versions:
description: 'List of OS versions to use in matrix, as JSON string'
required: true
type: string
default: '["ubuntu-latest", "macos-latest", "windows-latest"]'


secrets:
AWS_ACCESS_KEY_ID:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
exclude: ^docs/

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.5
rev: v0.7.1
hooks:
- id: ruff
args: [ --fix ]
Expand Down
23 changes: 19 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
# Upcoming
# v0.6.6 (Upcoming)

## Deprecations
* Completely removed compression settings from most places [PR #1126](https://github.com/catalystneuro/neuroconv/pull/1126)

## Bug Fixes
* datetime objects now can be validated as conversion options [#1139](https://github.com/catalystneuro/neuroconv/pull/1126)
* Fix a bug where data in `DeepLabCutInterface` failed to write when `ndx-pose` was not imported. [#1144](https://github.com/catalystneuro/neuroconv/pull/1144)

## Features
* Propagate the `unit_electrode_indices` argument from the spikeinterface tools to `BaseSortingExtractorInterface`. This allows users to map units to the electrode table when adding sorting data [PR #1124](https://github.com/catalystneuro/neuroconv/pull/1124)
* Imaging interfaces have a new conversion option `always_write_timestamps` that can be used to force writing timestamps even if neuroconv's heuristics indicates regular sampling rate [PR #1125](https://github.com/catalystneuro/neuroconv/pull/1125)
* Added .csv support to DeepLabCutInterface [PR #1140](https://github.com/catalystneuro/neuroconv/pull/1140)
* Added the `rclone_transfer_batch_job` helper function for executing Rclone data transfers in AWS Batch jobs. [PR #1085](https://github.com/catalystneuro/neuroconv/pull/1085)
* Added the `deploy_neuroconv_batch_job` helper function for deploying NeuroConv AWS Batch jobs. [PR #1086](https://github.com/catalystneuro/neuroconv/pull/1086)

## Improvements
* Use mixing tests for ecephy's mocks [PR #1136](https://github.com/catalystneuro/neuroconv/pull/1136)


## v0.6.4
# v0.6.5 (November 1, 2024)

## Deprecations

## Bug Fixes
* Fixed formatwise installation from pipy [PR #1118](https://github.com/catalystneuro/neuroconv/pull/1118)
* Fixed dailies [PR #1113](https://github.com/catalystneuro/neuroconv/pull/1113)

## Features
* Using in-house `GenericDataChunkIterator` [PR #1068](https://github.com/catalystneuro/neuroconv/pull/1068)
* Data interfaces now perform source (argument inputs) validation with the json schema [PR #1020](https://github.com/catalystneuro/neuroconv/pull/1020)
* Improve the error message when writing a recording extractor with multiple offsets [PR #1111](https://github.com/catalystneuro/neuroconv/pull/1111)
* Added `channels_to_skip` to `EDFRecordingInterface` so the user can skip non-neural channels [PR #1110](https://github.com/catalystneuro/neuroconv/pull/1110)

## Improvements
* Remove dev test from PR [PR #1092](https://github.com/catalystneuro/neuroconv/pull/1092)
Expand All @@ -41,7 +56,7 @@
* Added automated EFS volume creation and mounting to the `submit_aws_job` helper function. [PR #1018](https://github.com/catalystneuro/neuroconv/pull/1018)
* Added a mock for segmentation extractors interfaces in ophys: `MockSegmentationInterface` [PR #1067](https://github.com/catalystneuro/neuroconv/pull/1067)
* Added a `MockSortingInterface` for testing purposes. [PR #1065](https://github.com/catalystneuro/neuroconv/pull/1065)
* BaseRecordingInterfaces have a new conversion options `always_write_timestamps` that ca be used to force writing timestamps even if neuroconv heuristic indicates regular sampling rate [PR #1091](https://github.com/catalystneuro/neuroconv/pull/1091)
* BaseRecordingInterfaces have a new conversion options `always_write_timestamps` that can be used to force writing timestamps even if neuroconv heuristic indicates regular sampling rate [PR #1091](https://github.com/catalystneuro/neuroconv/pull/1091)


## Improvements
Expand Down
5 changes: 5 additions & 0 deletions docs/api/tools.aws.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. _api_docs_aws_tools:

AWS Tools
---------
.. automodule:: neuroconv.tools.aws
1 change: 1 addition & 0 deletions docs/api/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Tools
tools.signal_processing
tools.data_transfers
tools.nwb_helpers
tools.aws
5 changes: 3 additions & 2 deletions docs/conversion_examples_gallery/behavior/deeplabcut.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Install NeuroConv with the additional dependencies necessary for reading DeepLab
pip install "neuroconv[deeplabcut]"
Convert DeepLabCut pose estimation data to NWB using :py:class:`~neuroconv.datainterfaces.behavior.deeplabcut.deeplabcutdatainterface.DeepLabCutInterface`.
This interface supports both .h5 and .csv output files from DeepLabCut.

.. code-block:: python
Expand All @@ -16,8 +17,8 @@ Convert DeepLabCut pose estimation data to NWB using :py:class:`~neuroconv.datai
>>> from pathlib import Path
>>> from neuroconv.datainterfaces import DeepLabCutInterface
>>> file_path = BEHAVIOR_DATA_PATH / "DLC" / "m3v1mp4DLC_resnet50_openfieldAug20shuffle1_30000.h5"
>>> config_file_path = BEHAVIOR_DATA_PATH / "DLC" / "config.yaml"
>>> file_path = BEHAVIOR_DATA_PATH / "DLC" / "open_field_without_video" / "m3v1mp4DLC_resnet50_openfieldAug20shuffle1_30000.h5"
>>> config_file_path = BEHAVIOR_DATA_PATH / "DLC" / "open_field_without_video" / "config.yaml"
>>> interface = DeepLabCutInterface(file_path=file_path, config_file_path=config_file_path, subject_name="ind1", verbose=False)
Expand Down
Loading

0 comments on commit 85c31fa

Please sign in to comment.