xarray-behave 0.37.3__tar.gz → 0.37.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. xarray_behave-0.37.4/.github/workflows/test_install.yaml +46 -0
  2. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/PKG-INFO +11 -7
  3. xarray_behave-0.37.4/README.md +9 -0
  4. xarray_behave-0.37.4/env/xb.yml +10 -0
  5. xarray_behave-0.37.4/pyproject.toml +57 -0
  6. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/setup.py +3 -3
  7. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/__init__.py +1 -1
  8. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/movieparams.py +1 -3
  9. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/tests/test_annot.py +1 -3
  10. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/tests/test_imports.py +0 -3
  11. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/tests/test_io.py +1 -3
  12. xarray_behave-0.37.3/.github/workflows/publish.yaml +0 -55
  13. xarray_behave-0.37.3/README.md +0 -9
  14. xarray_behave-0.37.3/build_env.yml +0 -9
  15. xarray_behave-0.37.3/conda/xarray-behave/bld.bat +0 -10
  16. xarray_behave-0.37.3/conda/xarray-behave/build.sh +0 -11
  17. xarray_behave-0.37.3/conda/xarray-behave/meta.yaml +0 -57
  18. xarray_behave-0.37.3/condarc.yml +0 -9
  19. xarray_behave-0.37.3/pyproject.toml +0 -38
  20. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/.gitignore +0 -0
  21. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/LICENSE +0 -0
  22. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/doc/demo.ipynb +0 -0
  23. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/doc/demo_behavioral_features.ipynb +0 -0
  24. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/doc/demo_behavioral_features_large_group.ipynb +0 -0
  25. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/doc/ncb.mplstyle +0 -0
  26. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/annot.py +0 -0
  27. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/event_utils.py +0 -0
  28. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/__init__.py +0 -0
  29. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/app.py +0 -0
  30. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/audio_player.py +0 -0
  31. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/das.py +0 -0
  32. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/formbuilder.py +0 -0
  33. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/das_make.yaml +0 -0
  34. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/das_predict.yaml +0 -0
  35. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/das_train.yaml +0 -0
  36. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/envelope_computation.yaml +0 -0
  37. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/export_for_das.yaml +0 -0
  38. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/from_dir.yaml +0 -0
  39. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/from_file.yaml +0 -0
  40. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/from_zarr.yaml +0 -0
  41. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/forms/spec_freq.yaml +0 -0
  42. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/icon.png +0 -0
  43. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/table.py +0 -0
  44. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/utils.py +0 -0
  45. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/view_dialog.py +0 -0
  46. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/views.py +0 -0
  47. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/gui/widgets.py +0 -0
  48. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/__init__.py +0 -0
  49. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/annotations.py +0 -0
  50. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/annotations_manual.py +0 -0
  51. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/audio.py +0 -0
  52. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/balltracks.py +0 -0
  53. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/poses.py +0 -0
  54. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/samplestamps/__init__.py +0 -0
  55. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/samplestamps/samplestamps.py +0 -0
  56. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/samplestamps/utils.py +0 -0
  57. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/timestamps.py +0 -0
  58. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/io/tracks.py +0 -0
  59. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/loaders.py +0 -0
  60. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/metrics.py +0 -0
  61. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/src/xarray_behave/xarray_behave.py +0 -0
  62. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/tests/test_assemble.py +0 -0
  63. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/tests/test_assemble_metrics.py +0 -0
  64. {xarray_behave-0.37.3 → xarray_behave-0.37.4}/tests/test_sampstamps.py +0 -0
@@ -0,0 +1,46 @@
1
+ name: Test install
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - published
7
+ workflow_dispatch:
8
+ inputs:
9
+ logLevel:
10
+ description: 'Log level'
11
+ required: true
12
+ default: 'warning'
13
+ tags:
14
+ description: 'manual run'
15
+
16
+ jobs:
17
+ test:
18
+ runs-on: ${{ matrix.os }}
19
+ strategy:
20
+ fail-fast: False
21
+ matrix:
22
+ os: [ubuntu-latest, windows-latest, macOS-latest]
23
+ defaults: # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
24
+ run:
25
+ shell: bash -l {0}
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - name: Setup miniconda # https://github.com/marketplace/actions/setup-miniconda
29
+ uses: conda-incubator/setup-miniconda@v3
30
+ with:
31
+ auto-update-conda: true
32
+ auto-activate-base: true
33
+ channels: conda-forge
34
+ python-version: 3.13
35
+ - name: Install OpenGL dependencies
36
+ run: sudo apt-get update && sudo apt-get install -qq -y libx11-dev libgl1-mesa-dev libxkbcommon-x11-0
37
+ if: runner.os == 'Linux'
38
+ - name: Test
39
+ run: |
40
+ conda env create -n xb_test -y -f https://raw.githubusercontent.com/janclemenslab/xarray-behave/refs/heads/master/env/xb.yml
41
+ conda activate xb_test
42
+ python -c "import xarray_behave; print(xarray_behave.__version__)"
43
+ python -c "import xarray_behave.gui.app"
44
+ python tests/test_imports.py
45
+ python tests/test_io.py
46
+ python tests/test_sampstamps.py
@@ -1,17 +1,18 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: xarray-behave
3
- Version: 0.37.3
3
+ Version: 0.37.4
4
4
  Summary: xarray tools for behavioral data.
5
5
  Author-email: Jan Clemens <clemensjan@googlemail.com>
6
- Requires-Python: >3.9
6
+ Requires-Python: >=3.10
7
7
  Description-Content-Type: text/markdown
8
8
  Classifier: License :: OSI Approved :: Apache Software License
9
+ License-File: LICENSE
9
10
  Requires-Dist: defopt==6.3
10
11
  Requires-Dist: rich
11
12
  Requires-Dist: flammkuchen
12
13
  Requires-Dist: h5py
13
14
  Requires-Dist: pyyaml
14
- Requires-Dist: zarr
15
+ Requires-Dist: zarr<3
15
16
  Requires-Dist: dask
16
17
  Requires-Dist: pandas
17
18
  Requires-Dist: xarray
@@ -25,20 +26,23 @@ Requires-Dist: soundfile
25
26
  Requires-Dist: librosa>0.8
26
27
  Requires-Dist: opencv-python-headless
27
28
  Requires-Dist: pyvideoreader
28
- Requires-Dist: PySide6-Essentials
29
+ Requires-Dist: PySide6-Essentials==6.8.*
29
30
  Requires-Dist: pyqtgraph>0.12.2
30
31
  Requires-Dist: qtpy
31
32
  Requires-Dist: superqt
32
33
  Requires-Dist: colorcet
34
+ Requires-Dist: pytest ; extra == "dev"
35
+ Requires-Dist: flit ; extra == "dev"
33
36
  Project-URL: documentation, https://janclemenslab.org/das/
34
37
  Project-URL: source, https://github.com/janclemenslab/xarray-behave
38
+ Provides-Extra: dev
35
39
 
36
40
  # xarray-behave
37
41
 
38
- Install a working conda installation (see [here](https://docs.conda.io/en/latest/miniconda.html)).
42
+ Install a working conda installation (see [here](https://docs.conda.io/en/latest/miniconda.html)).
39
43
 
40
44
  ```shell
41
- conda create -c conda-forge -c ncb -n xb python=3.12 xarray-behave
45
+ conda env create -n xb -y -f https://raw.githubusercontent.com/janclemenslab/xarray-behave/refs/heads/master/env/xb.yml
42
46
  ```
43
47
 
44
48
  See `demo.ipynb` for usage examples.
@@ -0,0 +1,9 @@
1
+ # xarray-behave
2
+
3
+ Install a working conda installation (see [here](https://docs.conda.io/en/latest/miniconda.html)).
4
+
5
+ ```shell
6
+ conda env create -n xb -y -f https://raw.githubusercontent.com/janclemenslab/xarray-behave/refs/heads/master/env/xb.yml
7
+ ```
8
+
9
+ See `demo.ipynb` for usage examples.
@@ -0,0 +1,10 @@
1
+ name: xb
2
+ channels:
3
+ - conda-forge
4
+ - nodefaults
5
+ dependencies:
6
+ - python>=3.10
7
+ - pip
8
+ - ffmpeg
9
+ - pip:
10
+ - xarray-behave
@@ -0,0 +1,57 @@
1
+ [build-system]
2
+ requires = ["flit_core >=3.2"]
3
+ build-backend = "flit_core.buildapi"
4
+
5
+ [project]
6
+ name = "xarray-behave"
7
+ authors = [{ name = "Jan Clemens", email = "clemensjan@googlemail.com" }]
8
+ classifiers = ["License :: OSI Approved :: Apache Software License"]
9
+ dynamic = ["version", "description"]
10
+ requires-python = ">=3.10"
11
+ dependencies = [
12
+ 'defopt==6.3',
13
+ 'rich',
14
+ 'flammkuchen',
15
+ 'h5py',
16
+ 'pyyaml',
17
+ 'zarr<3',
18
+ 'dask',
19
+ 'pandas',
20
+ 'xarray',
21
+ 'scikit-image',
22
+ 'peakutils',
23
+ 'numba',
24
+ 'numpy',
25
+ 'scipy>1.9',
26
+ 'sounddevice',
27
+ 'soundfile',
28
+ 'librosa>0.8',
29
+ 'opencv-python-headless',
30
+ 'pyvideoreader',
31
+ 'PySide6-Essentials==6.8.*',
32
+ 'pyqtgraph>0.12.2',
33
+ 'qtpy',
34
+ 'superqt',
35
+ 'colorcet',
36
+ ]
37
+ readme = "README.md"
38
+
39
+ [project.optional-dependencies]
40
+ dev = ["pytest", "flit"]
41
+
42
+ [project.urls]
43
+ source = "https://github.com/janclemenslab/xarray-behave"
44
+ documentation = "https://janclemenslab.org/das/"
45
+
46
+ [tool.flit.module]
47
+ name = "xarray_behave"
48
+
49
+ [tool.pytest.ini_options]
50
+ minversion = "6.0"
51
+ testpaths = ["tests"]
52
+
53
+ [tool.ruff]
54
+ extend-select = ["C4", "NPY", "PD", "TCH"]
55
+ ignore = ["E501"]
56
+ show-fixes = true
57
+ line-length = 196
@@ -7,7 +7,7 @@ here = os.path.abspath(os.path.dirname(__file__))
7
7
 
8
8
 
9
9
  def read(*parts):
10
- with codecs.open(os.path.join(here, *parts), 'r') as fp:
10
+ with codecs.open(os.path.join(here, *parts), "r") as fp:
11
11
  return fp.read()
12
12
 
13
13
 
@@ -20,6 +20,6 @@ def find_version(*file_paths):
20
20
 
21
21
 
22
22
  setup(
23
- name='xarray-behave',
23
+ name="xarray-behave",
24
24
  version=find_version("src/xarray_behave/__init__.py"),
25
- )
25
+ )
@@ -1,6 +1,6 @@
1
1
  """xarray tools for behavioral data."""
2
2
 
3
- __version__ = "0.37.3"
3
+ __version__ = "0.37.4"
4
4
 
5
5
  from .xarray_behave import assemble, assemble_metrics, load, save
6
6
  import os
@@ -1,6 +1,4 @@
1
- """Load parameters for DLP movies
2
-
3
- """
1
+ """Load parameters for DLP movies"""
4
2
 
5
3
  import numpy as np
6
4
  import pandas as pd
@@ -56,9 +56,7 @@ def test_from_ds(test_data):
56
56
  ],
57
57
  )
58
58
  names.attrs["allowed_names"] = list(set(names.data))
59
- times = xr.DataArray(
60
- name="event_times", data=times, dims=["index", "event_time"], coords={"event_time": ["start_seconds", "stop_seconds"]}
61
- )
59
+ times = xr.DataArray(name="event_times", data=times, dims=["index", "event_time"], coords={"event_time": ["start_seconds", "stop_seconds"]})
62
60
  names, times
63
61
  ds = xr.Dataset({da.name: da for da in [names, times]})
64
62
  ds.attrs["pulse"] = "event"
@@ -1,6 +1,3 @@
1
- import pytest
2
-
3
-
4
1
  def test_imports():
5
2
  import xarray_behave as xb
6
3
  import xarray_behave.event_utils
@@ -1,10 +1,8 @@
1
- import pytest
2
-
3
1
  import numpy as np
4
2
  import xarray as xr
5
3
  import pandas as pd
6
4
  from xarray_behave import io
7
5
 
6
+
8
7
  def test_call():
9
8
  io
10
-
@@ -1,55 +0,0 @@
1
- name: Publish to Anaconda.org
2
-
3
- on:
4
- release:
5
- types:
6
- - published
7
- workflow_dispatch:
8
- inputs:
9
- logLevel:
10
- description: 'Log level'
11
- required: true
12
- default: 'warning'
13
- tags:
14
- description: 'manual run'
15
-
16
- jobs:
17
- publish:
18
- runs-on: ${{ matrix.os }}
19
- strategy:
20
- fail-fast: False
21
- matrix:
22
- python-version: ['3.10', '3.11', '3.12']
23
- os: [ubuntu-latest, windows-latest, macOS-14]
24
- defaults: # https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
25
- run:
26
- shell: bash -l {0}
27
- steps:
28
- - uses: actions/checkout@v4
29
- - name: Setup miniconda # https://github.com/marketplace/actions/setup-miniconda
30
- uses: conda-incubator/setup-miniconda@v3
31
- with:
32
- auto-update-conda: true
33
- channels: conda-forge,ncb
34
- python-version: 3.12
35
- auto-activate-base: false
36
- activate-environment: anaconda-client-env
37
- environment-file: build_env.yml
38
- condarc-file: condarc.yml
39
- - name: Build
40
- run: |
41
- mkdir ./build
42
- conda build conda/xarray-behave --no-test --no-anaconda-upload --python ${{ matrix.python-version }} --output-folder ./build
43
- - name: Test
44
- run: |
45
- conda deactivate
46
- conda create -n xb_test python=${{ matrix.python-version }} xarray-behave -c ./build -c local -c conda-forge -c ncb -y
47
- conda activate xb_test
48
- python -c "import xarray_behave; print(xarray_behave.__version__)"
49
- python -c "import xarray_behave.gui.app"
50
- # xb --help
51
- - name: Upload
52
- run: |
53
- conda build conda/xarray-behave --no-test --python ${{ matrix.python-version }} --output-folder ./build --user ncb --token ${{ secrets.ANACONDA_TOKEN }}
54
- env:
55
- ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
@@ -1,9 +0,0 @@
1
- # xarray-behave
2
-
3
- Install a working conda installation (see [here](https://docs.conda.io/en/latest/miniconda.html)).
4
-
5
- ```shell
6
- conda create -c conda-forge -c ncb -n xb python=3.12 xarray-behave
7
- ```
8
-
9
- See `demo.ipynb` for usage examples.
@@ -1,9 +0,0 @@
1
- name: anaconda-client-env
2
- channels:
3
- - conda-forge
4
- dependencies:
5
- - conda
6
- - anaconda-client
7
- - conda-build
8
- - pip
9
- - git
@@ -1,10 +0,0 @@
1
- # We need to turn pip index back on because Anaconda turns
2
- # it off for some reason.
3
- set PIP_NO_INDEX=False
4
- set PIP_NO_DEPENDENCIES=False
5
- set PIP_IGNORE_INSTALLED=False
6
-
7
- "%PYTHON%" -m pip install simpleaudio -vv --no-dependencies
8
- "%PYTHON%" -m pip install pkgutil_resolve_name -vv --no-dependencies
9
- "%PYTHON%" -m pip install xarray-behave[gui] -vv --no-dependencies
10
- if errorlevel 1 exit 1
@@ -1,11 +0,0 @@
1
- # We need to turn pip index back on because Anaconda turns
2
- # it off for some reason.
3
- export PIP_NO_INDEX=False
4
- export PIP_NO_DEPENDENCIES=False
5
- export PIP_IGNORE_INSTALLED=False
6
-
7
- if [[ "$OSTYPE" == "darwin"* ]]; then
8
- $PYTHON -m pip install simpleaudio -vv --no-dependencies
9
- fi
10
- $PYTHON -m pip install pkgutil_resolve_name -vv --no-dependencies
11
- $PYTHON -m pip install xarray-behave[gui] -vv --no-dependencies
@@ -1,57 +0,0 @@
1
- {% set data = load_setup_py_data(setup_file='../../setup.py', from_recipe_dir=True) %}
2
- {% set name = data.get('name') %}
3
- {% set version = data.get('version') %}
4
-
5
- package:
6
- name: "{{ name }}"
7
- version: "{{ version }}"
8
-
9
- source:
10
- url: https://pypi.org/packages/source/x/xarray-behave/xarray_behave-{{ version }}.tar.gz
11
- build:
12
- number: 0
13
-
14
- requirements:
15
- host:
16
- - python {{ python }}
17
- - pip
18
- run:
19
- - python {{ python }}
20
- - defopt=6.3
21
- - rich
22
- - flammkuchen
23
- - h5py
24
- - pyyaml
25
- - zarr
26
- - numba
27
- - xarray
28
- - dask
29
- - librosa>0.8
30
- - pysoundfile
31
- - python-sounddevice
32
- - matplotlib
33
- - colorcet
34
- - pandas
35
- - scipy>=1.9
36
- - scikit-image
37
- - scikit-learn
38
- - peakutils
39
- - pyside6
40
- - pyqtgraph>0.12
41
- - qtpy
42
- - superqt
43
- - ffmpeg
44
- - pyvideoreader
45
-
46
- about:
47
- home: "http://github.com/janclemenslab/xarray-behave"
48
- license: MIT
49
- license_family: MIT
50
- license_file:
51
- summary: "xarray behave"
52
- doc_url: "https://janclemenslab.org/xarray-behave"
53
- dev_url: "http://github.com/janclemenslab/xarray-behave"
54
-
55
- extra:
56
- recipe-maintainers:
57
- - postpop
@@ -1,9 +0,0 @@
1
- anaconda_upload: yes
2
- always_yes: yes
3
- changeps1: no
4
- channel_priority: flexible
5
- channels:
6
- - conda-forge
7
- - ncb
8
- conda-build:
9
- pkg_format: 2
@@ -1,38 +0,0 @@
1
- [build-system]
2
- requires = ["flit_core >=3.2"]
3
- build-backend = "flit_core.buildapi"
4
-
5
- [project]
6
- name = "xarray-behave"
7
- authors = [
8
- {name = "Jan Clemens", email = "clemensjan@googlemail.com"},
9
- ]
10
- classifiers = ["License :: OSI Approved :: Apache Software License"]
11
- dynamic = ["version", "description"]
12
- requires-python = ">3.9"
13
- dependencies = ['defopt==6.3', 'rich',
14
- 'flammkuchen', 'h5py', 'pyyaml', 'zarr', 'dask', 'pandas', 'xarray',
15
- 'scikit-image', 'peakutils', 'numba', 'numpy', 'scipy>1.9',
16
- 'sounddevice', 'soundfile', 'librosa>0.8',
17
- 'opencv-python-headless', 'pyvideoreader',
18
- 'PySide6-Essentials', 'pyqtgraph>0.12.2', 'qtpy', 'superqt', 'colorcet'
19
- ]
20
-
21
- readme = "README.md"
22
-
23
- [project.urls]
24
- source = "https://github.com/janclemenslab/xarray-behave"
25
- documentation = "https://janclemenslab.org/das/"
26
-
27
- [tool.flit.module]
28
- name = "xarray_behave"
29
-
30
- [tool.pytest.ini_options]
31
- minversion = "6.0"
32
- testpaths = ["tests",]
33
-
34
- [tool.ruff]
35
- extend-select = ["C4", "NPY", "PD", "TCH"]
36
- ignore = ["E501"]
37
- show-fixes = true
38
- line-length = 196
File without changes