Skip to content

Commit 046487b

Browse files
authored
Merge pull request #121 from kushalbakshi/staging
Add `memoized_result` + update calcium imaging utility functions
2 parents e1a1a86 + d7b6211 commit 046487b

18 files changed

+781
-148
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: mkdocs-release
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
mkdocs_release:
7+
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
8+
permissions:
9+
contents: write

.github/workflows/release.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
make_github_release:
6+
uses: datajoint/.github/.github/workflows/make_github_release.yaml@main
7+
mkdocs_release:
8+
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
9+
permissions:
10+
contents: write
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: semantic-release
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
call_semantic_release:
7+
uses: datajoint/.github/.github/workflows/semantic-release.yaml@main

.github/workflows/test.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Test
2+
on:
3+
push:
4+
pull_request:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "0 8 * * 1"
8+
jobs:
9+
devcontainer-build:
10+
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
11+
tests:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
py_ver: ["3.9", "3.10"]
16+
mysql_ver: ["8.0", "5.7"]
17+
include:
18+
- py_ver: "3.8"
19+
mysql_ver: "5.7"
20+
- py_ver: "3.7"
21+
mysql_ver: "5.7"
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up Python ${{matrix.py_ver}}
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{matrix.py_ver}}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install flake8 "black[jupyter]"
32+
- name: Run style tests
33+
run: |
34+
python_version=${{matrix.py_ver}}
35+
black element_interface --check --verbose --target-version py${python_version//.}

.github/workflows/u24_element_before_release.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/u24_element_release_call.yaml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/u24_element_tag_to_release.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@
33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
44
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
55

6+
## [0.7.0] - 2024-08-09
7+
8+
+ Add - `memoized_result` decorator to cache function results
9+
+ Update - `prairie_view_loader.py` to create big tiff files from `.ome.tif` files
10+
+ Update - `run_caiman.py` to run latest version of CaImAn
11+
+ Update - `caiman_loader.py` to process output of latest version of CaImAn
12+
+ Fix - general fixes and improvements
613

714
## [0.6.1] - 2023-08-02
815

916
+ Update DANDI upload funtionality to improve useability
1017

11-
1218
## [0.6.0] - 2023-07-26
1319

1420
+ Update - `prairieviewreader.py` -> `prairie_view_loader.py`
@@ -83,6 +89,8 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
8389

8490
+ Add - Readers for: `ScanImage`, `Suite2p`, `CaImAn`.
8591

92+
93+
[0.7.0]: https://github.com/datajoint/element-interface/releases/tag/0.7.0
8694
[0.6.0]: https://github.com/datajoint/element-interface/releases/tag/0.6.0
8795
[0.5.4]: https://github.com/datajoint/element-interface/releases/tag/0.5.4
8896
[0.5.3]: https://github.com/datajoint/element-interface/releases/tag/0.5.3

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 DataJoint NEURO
3+
Copyright (c) 2024 DataJoint
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/src/concepts.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ how to use various Elements.
2424
`utils.str_to_bool` converts a set of strings to boolean True or False. This is implemented
2525
as the equivalent item in Python's `distutils` which will be removed in future versions.
2626

27+
`utils.memoized_result` is a decorator that caches the result of a function call based
28+
on input parameters and the state of the output. If the function is called with the same
29+
parameters and the output files in the directory remain unchanged, it returns the
30+
cached results; otherwise, it executes the function and caches the new results along
31+
with metadata.
32+
2733
### Suite2p
2834

2935
This Element provides functions to independently run Suite2p's motion correction,
@@ -46,13 +52,15 @@ Requirements:
4652

4753
### PrairieView Reader
4854

49-
This Element provides a function to read the PrairieView Scanner's metadata file. The
50-
PrairieView software generates one `.ome.tif` imaging file per frame acquired. The
51-
metadata for all frames is contained in one `.xml` file. This function locates the
52-
`.xml` file and generates a dictionary necessary to populate the DataJoint ScanInfo and
53-
Field tables. PrairieView works with resonance scanners with a single field, does not
54-
support bidirectional x and y scanning, and the `.xml` file does not contain ROI
55-
information.
55+
This Element provides a `PrairieViewMeta` class to handle different types of output from
56+
the PrairieView Scanner. The PrairieView software either generates one `.ome.tif`
57+
imaging file per frame acquired or multi-page `.ome.tif` files. The metadata for all
58+
frames is contained in one `.xml` file. This class contains methods that locate the
59+
`.xml` file and generate a dictionary necessary to populate the DataJoint ScanInfo and
60+
Field tables. The class also contains methods to create a big tiff file from the
61+
individual `.ome.tif` files. PrairieView works with resonance scanners with a single
62+
field, does not support bidirectional x and y scanning, and the `.xml` file does not
63+
contain ROI information.
5664

5765
## Element Architecture
5866

0 commit comments

Comments
 (0)