Skip to content

Commit

Permalink
Merge pull request #121 from kushalbakshi/staging
Browse files Browse the repository at this point in the history
Add `memoized_result` + update calcium imaging utility functions
  • Loading branch information
ttngu207 authored Aug 9, 2024
2 parents e1a1a86 + d7b6211 commit 046487b
Show file tree
Hide file tree
Showing 18 changed files with 781 additions and 148 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/mkdocs-release-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: mkdocs-release
on:
workflow_dispatch:

jobs:
mkdocs_release:
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
permissions:
contents: write
10 changes: 10 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Release
on:
workflow_dispatch:
jobs:
make_github_release:
uses: datajoint/.github/.github/workflows/make_github_release.yaml@main
mkdocs_release:
uses: datajoint/.github/.github/workflows/mkdocs_release.yaml@main
permissions:
contents: write
7 changes: 7 additions & 0 deletions .github/workflows/semantic-release-caller.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: semantic-release
on:
workflow_dispatch:

jobs:
call_semantic_release:
uses: datajoint/.github/.github/workflows/semantic-release.yaml@main
35 changes: 35 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: "0 8 * * 1"
jobs:
devcontainer-build:
uses: datajoint/.github/.github/workflows/devcontainer-build.yaml@main
tests:
runs-on: ubuntu-latest
strategy:
matrix:
py_ver: ["3.9", "3.10"]
mysql_ver: ["8.0", "5.7"]
include:
- py_ver: "3.8"
mysql_ver: "5.7"
- py_ver: "3.7"
mysql_ver: "5.7"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{matrix.py_ver}}
uses: actions/setup-python@v4
with:
python-version: ${{matrix.py_ver}}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 "black[jupyter]"
- name: Run style tests
run: |
python_version=${{matrix.py_ver}}
black element_interface --check --verbose --target-version py${python_version//.}
17 changes: 0 additions & 17 deletions .github/workflows/u24_element_before_release.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/u24_element_release_call.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/u24_element_tag_to_release.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.

## [0.7.0] - 2024-08-09

+ Add - `memoized_result` decorator to cache function results
+ Update - `prairie_view_loader.py` to create big tiff files from `.ome.tif` files
+ Update - `run_caiman.py` to run latest version of CaImAn
+ Update - `caiman_loader.py` to process output of latest version of CaImAn
+ Fix - general fixes and improvements

## [0.6.1] - 2023-08-02

+ Update DANDI upload funtionality to improve useability


## [0.6.0] - 2023-07-26

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

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


[0.7.0]: https://github.com/datajoint/element-interface/releases/tag/0.7.0
[0.6.0]: https://github.com/datajoint/element-interface/releases/tag/0.6.0
[0.5.4]: https://github.com/datajoint/element-interface/releases/tag/0.5.4
[0.5.3]: https://github.com/datajoint/element-interface/releases/tag/0.5.3
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 DataJoint NEURO
Copyright (c) 2024 DataJoint

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 15 additions & 7 deletions docs/src/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ how to use various Elements.
`utils.str_to_bool` converts a set of strings to boolean True or False. This is implemented
as the equivalent item in Python's `distutils` which will be removed in future versions.

`utils.memoized_result` is a decorator that caches the result of a function call based
on input parameters and the state of the output. If the function is called with the same
parameters and the output files in the directory remain unchanged, it returns the
cached results; otherwise, it executes the function and caches the new results along
with metadata.

### Suite2p

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

### PrairieView Reader

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

## Element Architecture

Expand Down
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ a number of other Elements.

- Data ingestion, see [`ingest_csv_to_table` API](./api/element_interface/utils/#element_interface.utils.ingest_csv_to_table)

- Code execution, see [`memoized_result` API](./api/element_interface/utils/#element_interface.utils.memoized_result)

Visit the [Concepts page](./concepts.md) for more information on these tools.
Loading

0 comments on commit 046487b

Please sign in to comment.