-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
318 additions
and
1,139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
name: ruff check | ||
with: | ||
args: 'check --output-format=github' | ||
- uses: chartboost/ruff-action@v1 | ||
name: ruff format | ||
with: | ||
args: 'format --check' | ||
tests: | ||
name: unit tests (${{ matrix.python-version }}, ${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 6 | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
python-version: ["3.10", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install deps | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -e . | ||
- name: Test with pytest | ||
run: | | ||
pytest -k 'test_' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,4 +162,5 @@ cython_debug/ | |
#.idea/ | ||
|
||
# local scripts | ||
src/local | ||
src/local | ||
src/analysis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ibllib | ||
ibllib @ git+https://github.com/int-brain-lab/ibllib@develop | ||
numpy | ||
matplotlib | ||
pytest | ||
scipy | ||
pandera | ||
pandera |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions
5
src/tests/test_loaders.py → src/iblphotometry_tests/test_loaders.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
src/tests/test_metrics.py → src/iblphotometry_tests/test_metrics.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
from pathlib import Path | ||
import iblphotometry.io as fio | ||
from iblphotometry.pipelines import ( | ||
run_pipeline, | ||
sliding_mad_pipeline, | ||
isosbestic_correction_pipeline, | ||
) | ||
from iblphotometry.synthetic import generate_dataframe | ||
from iblphotometry_tests.base_tests import PhotometryDataTestCase | ||
|
||
|
||
class TestPipelines(PhotometryDataTestCase): | ||
def test_single_band_pipeline(self): | ||
# on synthetic data | ||
raw_dfs = generate_dataframe() | ||
run_pipeline(sliding_mad_pipeline, raw_dfs['raw_calcium']) | ||
|
||
Path(__file__).parent.joinpath() | ||
# on real data | ||
raw_dfs = fio.from_pqt( | ||
self.paths['photometry_signal_pqt'], | ||
self.paths['photometryROI_locations_pqt'], | ||
) | ||
signal_bands = list(raw_dfs.keys()) | ||
run_pipeline(sliding_mad_pipeline, raw_dfs[signal_bands[0]]) | ||
|
||
def test_isosbestic_pipeline(self): | ||
# on synthetic data | ||
raw_dfs = generate_dataframe() | ||
|
||
# run pipeline | ||
run_pipeline( | ||
isosbestic_correction_pipeline, | ||
raw_dfs['raw_calcium'], | ||
raw_dfs['raw_isosbestic'], | ||
) |
Oops, something went wrong.