Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nwb insert config #1

Merged
merged 61 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
ade48ea
Fix failing chains pytests (#867)
CBroz1 Mar 18, 2024
6152f09
Hhmi notebook check (#876)
samuelbray32 Mar 20, 2024
440601f
Remove curation notebook
edeno Mar 20, 2024
b7a2986
Refine query of upstream tables on FigURL populate (#871)
CBroz1 Mar 21, 2024
3de6cdc
Fix dlc video and kachery cloud config (#882)
samuelbray32 Mar 21, 2024
e858cae
Edits for docs (#883)
CBroz1 Mar 21, 2024
c94335d
Hhmi notebook check (#888)
samuelbray32 Mar 22, 2024
70e4914
Update call to get_template_extremum (#893)
samuelbray32 Mar 26, 2024
448f9f4
Add spyglass version to created analysis nwb files (#897)
samuelbray32 Mar 27, 2024
309bde5
Change existing source script to spyglass version (#900)
samuelbray32 Mar 28, 2024
65745f8
Add pynapple support (#898)
edeno Mar 29, 2024
9d5900a
Hot fixes for clusterless `get_ahead_behind_distance` and `get_spike_…
edeno Mar 29, 2024
5d57902
fix bugs in fetch_nwb (#913)
samuelbray32 Apr 3, 2024
aa4ab8e
Check for entry in merge part table prior to insert (#922)
samuelbray32 Apr 11, 2024
d40424f
Kachery fixes (#918)
samuelbray32 Apr 11, 2024
a9eb28a
remove old tables from init (#925)
samuelbray32 Apr 11, 2024
4460d26
Fix improper uses of strip (#929)
edeno Apr 12, 2024
201c670
Update CHANGELOG.md
edeno Apr 12, 2024
995f4cd
Misc Issues (#903)
CBroz1 Apr 19, 2024
6f1e900
Export logger (#875)
CBroz1 Apr 19, 2024
696dee7
Spikesorting quality of life helpers (#910)
samuelbray32 Apr 19, 2024
6763d79
Add logging of AnalysisNwbfile creation time and file size (#937)
CBroz1 Apr 21, 2024
664f051
Log when file accessed (#941)
CBroz1 Apr 22, 2024
96691c3
Fix bug on empty delete in merge table (#940)
samuelbray32 Apr 22, 2024
e23d1fd
Remove master restriction
edeno Apr 22, 2024
2027aba
Add system requirements and typical installation time (#945)
edeno Apr 25, 2024
435b0f3
Group part delete propagation (#899)
samuelbray32 May 6, 2024
35335fb
Fix bug report template html (#955)
CBroz1 May 7, 2024
faf8a80
fix curation fetch bug in make function (#960)
samuelbray32 May 8, 2024
a508b57
Fix tests/doc build (#967)
CBroz1 May 10, 2024
280406b
Pin `mkdocstrings-python<=1.9.0`
CBroz1 May 10, 2024
fcde4c7
Fix relative pathing for mkdocstrings>=1.9.1 (#968)
CBroz1 May 10, 2024
2f6634b
Long distance restrictions (#949)
CBroz1 May 10, 2024
042fd1c
Transaction on `populate_all_common` (#957)
CBroz1 May 10, 2024
a6e2ea6
Permit multiple restrict_by (#969)
CBroz1 May 10, 2024
113ce9a
Allow dlc pipeline to run without prior position tracking (#970)
samuelbray32 May 13, 2024
9d8b19a
Revert "Allow dlc pipeline to run without prior position tracking (#9…
edeno May 13, 2024
97373ea
Fix test fails related to #957 (#971)
CBroz1 May 13, 2024
00bd5d8
Allow dlc pipeline to run without prior position tracking (#973)
edeno May 13, 2024
8872043
Cleanup of dlc video (#975)
samuelbray32 May 15, 2024
26e74a4
Replace old `join` call with `cascade` (#982)
CBroz1 May 20, 2024
ae4a7b8
Check existence of optional fields during `Electrode` table populatio…
khl02007 May 21, 2024
bb4ce89
Add pytests to position (#966)
CBroz1 May 29, 2024
00ce118
Don't insert lab member when creating lab team (#983)
khl02007 May 29, 2024
04ec37a
Add ability to set smoothing sigma in get_firing_rate (#994)
samuelbray32 Jun 3, 2024
6b49c2d
Add docstrings to SortedSpikesGroup and Decoding methods (#996)
samuelbray32 Jun 4, 2024
7edff6a
Add Common Errors doc (#997)
CBroz1 Jun 4, 2024
d8e5196
Mua notebook (#998)
denissemorales Jun 5, 2024
3e7d35a
Dandi export and read (#956)
samuelbray32 Jun 6, 2024
2de1d2b
Minor fixes (#999)
samuelbray32 Jun 6, 2024
4a1b40e
Fix bug in change in analysis_file object_id (#1004)
samuelbray32 Jun 10, 2024
5d957f1
Remove classes for usused tables (#1003)
CBroz1 Jun 11, 2024
8eadc30
Non-daemon parallel populate (#1001)
samuelbray32 Jun 14, 2024
97933e7
Give UUID to artifact interval (#993)
khl02007 Jun 18, 2024
d4f61af
Fix artifact `list_triggers` (#1009)
khl02007 Jun 25, 2024
b5ba05a
remove problem key in DLCPosV1 fetch_nwb attrs (#1011)
samuelbray32 Jun 25, 2024
fc41167
Tidy position (#870)
CBroz1 Jun 26, 2024
b89ea99
Prevent delete orphans (#1002)
CBroz1 Jun 26, 2024
3ba5d0a
remove kachery_client dependency (#1014)
samuelbray32 Jun 27, 2024
fd917b7
merge master
samuelbray32 Jul 1, 2024
14daa3b
add default config to arguments
samuelbray32 Jul 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,20 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. This error is on file '....' at file path '....'
2. Click on '....'
3. Scroll down to '....'
4. See error

<details><summary>Error Stack</summary>

```python
# Paste the error stack trace here
```

</details>

**Expected behavior**
A clear and concise description of what you expected to happen.

Expand All @@ -25,4 +34,3 @@ If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
A clear and concise description of what the problem is.
For example, I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
A clear and concise description of any alternative solutions or features you've
considered.

**Additional context**
Add any other context or screenshots about the feature request here.
31 changes: 25 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,34 @@ include relevant motivation and context. Please list issues fixed or closed by
This PR.

- Fixes #000: How this PR fixes the issue
- `path/file.py`: Description of the change
- `path/file.py`: Description of the change
- `path/file.py`: Description of the change
- `path/file.py`: Description of the change
- Fixes #000: How this PR fixes the issue
- `path/file.py`: Description of the change
- `path/file.py`: Description of the change
- `path/file.py`: Description of the change
- `path/file.py`: Description of the change

# Checklist:

<!--
For items below with choices, select one (e.g., yes, no)
and check the box to indicate that a choice was selected.
If not applicable, check the box and add `N/A` after the box.
For example:
- [X] This has a choice: no
- [X] N/A. If choice, other item.
This comment may be deleted on submission.

Alter notes example:
```python
from spyglass.example import Table
Table.alter() # Comment regarding the change
```
-->

- [ ] This PR should be accompanied by a release: (yes/no/unsure)
- [ ] (If release) I have updated the `CITATION.cff`
- [ ] I have updated the `CHANGELOG.md`
- [ ] If release, I have updated the `CITATION.cff`
- [ ] This PR makes edits to table definitions: (yes/no)
- [ ] If table edits, I have included an `alter` snippet for release notes.
- [ ] If this PR makes changes to position, I ran the relevant tests locally.
- [ ] I have updated the `CHANGELOG.md` with PR number and description.
- [ ] I have added/edited docs/notebooks to reflect the changes
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Lint

on: [push, pull_request]
on:
push:
branches:
- '!documentation'
pull_request:

jobs:
black:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
- "*.*.*" # For docs bump, use X.X.XaX
branches:
- test_branch
workflow_dispatch: # Manually trigger with 'Run workflow' button

permissions:
contents: write
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:

- name: Deploy
run: |
FULL_VERSION=${{ github.ref }}
FULL_VERSION=${{ github.ref_name }}
export MAJOR_VERSION=${FULL_VERSION:0:3}
echo "OWNER: ${REPO_OWNER}. BUILD: ${MAJOR_VERSION}"
bash ./docs/build-docs.sh push $REPO_OWNER
Expand Down
75 changes: 49 additions & 26 deletions .github/workflows/test-conda.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,80 @@
name: Test conda env and run tests
name: Tests

on:
push:
branches:
- '!test_branch'
- '!documentation'
schedule: # once a day at midnight UTC
- cron: '0 0 * * *'
workflow_dispatch: # Manually trigger with 'Run workflow' button

concurrency: # Replace Cancel Workflow Action
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run-tests:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
os: [ubuntu-latest] #, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
PYTHON: '3.8'
OS: ubuntu-latest
PYTHON: '3.9'
UCSF_BOX_TOKEN: ${{ secrets.UCSF_BOX_TOKEN }} # for download and testing
UCSF_BOX_USER: ${{ secrets.UCSF_BOX_USER }}
services:
mysql:
image: datajoint/mysql:8.0
env: # args: mysql -h 127.0.0.1 -P 3308 -uroot -ptutorial -e "CMD;"
MYSQL_DATABASE: localhost
MYSQL_ROOT_PASSWORD: tutorial
ports:
- 3308:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
all_but_latest: true
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON }}
- name: Set up conda environment
uses: conda-incubator/setup-miniconda@v2
- name: Set up conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: spyglass
environment-file: environment.yml
miniforge-variant: Mambaforge
miniforge-version: latest
- name: Install spyglass
use-mamba: true
- name: Install apt dependencies
run: |
pip install -e .[test]
sudo apt-get update # First mysql options
sudo apt-get install mysql-client libmysqlclient-dev libgirepository1.0-dev -y
sudo apt-get install ffmpeg libsm6 libxext6 -y # non-dlc position deps
- name: Run pip install for test deps
run: |
pip install --quiet .[test]
- name: Download data
env:
UCSF_BOX_TOKEN: ${{ secrets.UCSF_BOX_TOKEN }}
UCSF_BOX_USER: ${{ secrets.UCSF_BOX_USER }}
WEBSITE: ftps://ftp.box.com/trodes_to_nwb_test_data/minirec20230622.nwb
BASEURL: ftps://ftp.box.com/trodes_to_nwb_test_data/
NWBFILE: minirec20230622.nwb # Relative to Base URL
VID_ONE: 20230622_sample_01_a1/20230622_sample_01_a1.1.h264
VID_TWO: 20230622_sample_02_a1/20230622_sample_02_a1.1.h264
RAW_DIR: /home/runner/work/spyglass/spyglass/tests/_data/raw/
VID_DIR: /home/runner/work/spyglass/spyglass/tests/_data/video/
run: |
mkdir -p $RAW_DIR
wget --recursive --no-verbose --no-host-directories --no-directories \
--user $UCSF_BOX_USER --password $UCSF_BOX_TOKEN \
-P $RAW_DIR $WEBSITE
mkdir -p $RAW_DIR $VID_DIR
wget_opts() { # Declare func with download options
wget \
--recursive --no-verbose --no-host-directories --no-directories \
--user "$UCSF_BOX_USER" --password "$UCSF_BOX_TOKEN" \
-P "$1" "$BASEURL""$2"
}
wget_opts $RAW_DIR $NWBFILE
wget_opts $VID_DIR $VID_ONE
wget_opts $VID_DIR $VID_TWO
- name: Run tests
run: |
pytest -rP # env vars are set within certain tests
pytest --no-docker --no-dlc
30 changes: 15 additions & 15 deletions .github/workflows/test-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,38 +6,42 @@ on:
- master
- maint/*
- '!test_branch'
- '!documentation'
tags:
- "*"
pull_request:
branches:
- master
- maint/*
workflow_dispatch: # Manually trigger with 'Run workflow' button
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: pip install --upgrade build twine
- run: |
pip install --upgrade build twine
pip install importlib_metadata==7.2.1 # twine #977
- name: Build sdist and wheel
run: python -m build
- run: twine check dist/*
- name: Upload sdist and wheel artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
- name: Build git archive
run: mkdir archive && git archive -v -o archive/archive.tgz HEAD
- name: Upload git archive artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: archive
path: archive/
Expand All @@ -50,13 +54,13 @@ jobs:
steps:
- name: Download sdist and wheel artifacts
if: matrix.package != 'archive'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Download git archive artifact
if: matrix.package == 'archive'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: archive
path: archive/
Expand All @@ -73,13 +77,9 @@ jobs:
- name: Install sdist
if: matrix.package == 'sdist'
run: pip install dist/*.tar.gz
- name: Install archive
if: matrix.package == 'archive'
- name: Install archive # requires tag
if: matrix.package == 'archive' && startsWith(github.ref, 'refs/tags/')
run: pip install archive/archive.tgz
# - name: Install test extras
# run: pip install spyglass[test]
# - name: Run tests
# run: pytest --doctest-modules -v --pyargs spyglass
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
Expand All @@ -89,9 +89,9 @@ jobs:
url: https://pypi.org/p/spyglass-neuro
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && github.ref == 'refs/heads/master'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
tests/_data/*
wget-log*

# Translations
*.mo
Expand Down Expand Up @@ -127,6 +129,7 @@ dmypy.json
.pyre/

# Test Data Files
tests/_data/*
*.dat
*.mda
*.rec
Expand All @@ -136,6 +139,7 @@ dmypy.json
*.videoTimeStamps
*.cameraHWSync
*.stateScriptLog
tests/_data/*

*.nwb
*.DS_Store
Expand Down
Loading