Skip to content

Commit

Permalink
SLEAP 1.3.2
Browse files Browse the repository at this point in the history
commit 734283a
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Sun Sep 10 08:19:36 2023 -0700

    Bump to 1.3.2 (#1482)

    * Bump to 1.3.2

    * Run manual build w/o pip upload

    * Use `importlib.resources` if available

    * Rebuild mac conda package

    * Lint

    * Build/upload pip wheel

    * Reset build_manual and up build number

commit e424501
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Sat Sep 9 10:32:29 2023 -0700

    Add pip extras (#1481)

    * Rename pip to pypi, add tensorflow

    * Move out jupyter requirements from dev

    * Add extras for conda/pip jupyter and dev

    * Rename `pip` extra to `pypi`

    * Add build_ci workflow

    * Install pip package using extras

    * Rerun notebooks with new pip wheel

    * Internal import after adding relative path to sys

    * Build develop docs on this branch

    * Add comments to setup.py extras

    * Update installation docs

    * Add wget bypass for apple silicon mambaforge

    * Create func to combine req

    * Italicize jupyter instead of bold

    ---------

    Co-authored-by: modularizer <modularizer@gmail.com>
    Co-authored-by: roomrys <>

commit 93ef288
Author: Shrivaths Shyam <52810689+shrivaths16@users.noreply.github.com>
Date:   Sat Sep 9 03:12:58 2023 +0530

    Limit max tracks via track-local queues (#1447)

    * Initial commit

    * format files

    * [wip] adding local deque for tracks

    * format files

    * [wip] adding local deque for tracks

    * [wip] Add max tracking for simpletracker

    * [wip] Add max tracking for simple tracker

    * [wip] add missing argument

    * [wip] Add and modify test functions

    * [wip] Add and modify test functions

    * Bug fix and refactoring code

    * [wip] Add max tracking for flow tracker.

    * [wip] Including suggested changes

    * [wip] refactor code

    * Add test function to check max tracks

    * Added suggestions and feedback

    * Prevent the creation of more than max tracks when we have unmatched detections

    * Add tests

    * Use maximum tracking by default when loading model via high level API

    * Lint

    * Fix integration test

    * Refactor max tracker tests

    * Add integration test for CLI

    * typo

    * Add max tracks to the tracking GUI

    * Update CLI docs and add examples

    ---------

    Co-authored-by: Talmo Pereira <talmo@princeton.edu>
    Co-authored-by: Talmo Pereira <talmo@salk.edu>

commit 64655d6
Author: DivyaSesh <64513125+gitttt-1234@users.noreply.github.com>
Date:   Wed Sep 6 09:50:35 2023 -0700

    Fix Auto-select GPU (#1474)

    * Fix Auto-select GPU

    * Format file

    * Add variable in init

    * Format files

    * Add small test to ensure environment variable is set

    * Make linter happy

    ---------

    Co-authored-by: roomrys <lmaree@ucsd.edu>

commit 0ef52cd
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Thu Aug 17 11:03:51 2023 -0700

    Migrate to `importlib_resources` backport (#1458)

    * Switch to  backport

    * Remove `pkg_resources`

    * Clean-up function (non-logical)

    * Make linter happy

    * Fix-up path for last few stragglers

    * Use `Path.as_posix` method instead of `str`

commit e0eebb2
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Tue Aug 15 13:10:06 2023 -0700

    Handle error message edge case when finding yaml paths (#1456)

commit 6858563
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Fri Aug 11 11:33:14 2023 -0700

    Add message if drag drop fails (#1451)

    * Fix drag and drop

    * Feedback when user drops invalid file type

    * Change wording on message

commit 88fdb68
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Fri Aug 11 11:27:57 2023 -0700

    Pin `tensorflow-hub<0.14.0` (#1446)

    * Pin pynwb 2.3.3

    * Remove pynwb pin, add comments

commit 4730788
Author: Talmo Pereira <talmo@salk.edu>
Date:   Fri Aug 11 10:52:09 2023 -0700

    Fix drag and drop (#1449)

commit 47f8096
Author: DivyaSesh <64513125+gitttt-1234@users.noreply.github.com>
Date:   Thu Aug 10 16:29:39 2023 -0700

    Add Option to Export CSV (#1438)

    * Add Option to Export CSV

    * Add Test Functions

    * Fomat Files

    * Change FormatID

commit 5ba6bc1
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Thu Aug 10 10:17:45 2023 -0700

    Add model folder to the unzip path (#1445)

    * Add model folder to the unzip path

    * Handle cases where zipped model either has no extra directory

    * Add test

    * Fix-up test and implementation

    * Manually lint

commit d61a184
Author: KevinZ0217 <96039456+KevinZ0217@users.noreply.github.com>
Date:   Wed Aug 9 14:47:21 2023 -0700

    Change the hotkey for exporting h5 analysis (#1444)

    * Change the hotkey for export h5 files to Ctrl+Alt+E

commit ad7529e
Author: KevinZ0217 <96039456+KevinZ0217@users.noreply.github.com>
Date:   Wed Aug 9 14:46:09 2023 -0700

    Add a button for copying model config to clipboard (#1433)

    * Add shortcur for export_analysis_current

    * Fix the linting issue

    * Add the button without copy method'

    * Add button for copying model config to clipboard

    * Fix linting by reformatting

    * Use Qtpy for clipboard rather than pyperclip

    * Pretty print model config json to clipboard and fix missing command

    * Fix the overwriting problem for dict object

    * Delete unnecessary print statement

    * Add a few comments & Remove unnecessary variables & remove unused function

commit 2611e7d
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Wed Aug 9 11:52:57 2023 -0700

    Improve error message for detecting video backend (#1441)

    * Improve error message for detecting video backend

    * Lint

    * Add small test

commit 1151a95
Author: Shrivaths Shyam <52810689+shrivaths16@users.noreply.github.com>
Date:   Wed Aug 2 17:08:38 2023 -0700

    Fix error thrown when last video is deleted  (#1421)

    * Handle None Video case during callbacks

    * format files

    * remove unused comments

    * Disable remove video button when there are no videos

    * Display default background when all videos are removed

    * Format files

    * Remove overlay error after removing last video

    * Redraw overlays on plot change (#1435)

    * Redraw overlays after changedPlot, changedPlot on reset

    * Update instance state on player reset

    ---------

    Co-authored-by: Liezl Maree <38435167+roomrys@users.noreply.github.com>

commit 6002332
Author: Shrivaths Shyam <52810689+shrivaths16@users.noreply.github.com>
Date:   Mon Jul 31 13:28:53 2023 -0700

    Update status message on status bar (#1411)

    * Update status message on status bar

    * Update statusbar to show correct video count

    * remove additional conditional check

commit 3a01ef3
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Mon Jul 31 12:09:50 2023 -0700

    Correct GUI state emulation (#1422)

commit e94b516
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Thu Jul 27 12:11:41 2023 -0700

    Add video path and frame indices to metrics (#1396)

    * Add `Instance`s and `PredictedInstance`s to metrics

    * Add tests

    * Add frame/video info to metrics, wip: test writing

    * Fix metrics save test

commit b2ad203
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Thu Jul 27 12:08:19 2023 -0700

    Fix labels export for json (#1410)

    * wip: fix labels export for json

    * Add test for json.zip labels pkg

    * Add test for .slp labels pkg

    * Make linter happy

commit 90c012d
Author: KevinZ0217 <96039456+KevinZ0217@users.noreply.github.com>
Date:   Wed Jul 26 13:30:22 2023 -0700

    Add shortcut to export analysis for current video (#1414)

    * Add shortcur for export_analysis_current

    * Fix the linting issue

commit f9d0a22
Author: Shrivaths Shyam <52810689+shrivaths16@users.noreply.github.com>
Date:   Tue Jul 25 09:37:52 2023 -0700

    Modify compute OKS function (#1399)

    * Update compute OKS function

    * Update compute OKS function

    * Modify compute OKS function

    * Added suggested changes

    * Added further suggestions and comments

    * Added the permalink to the cocoeval function

    * Added permalink to cocoeval function

    ---------

    Co-authored-by: Liezl Maree <38435167+roomrys@users.noreply.github.com>
    Co-authored-by: Talmo Pereira <talmo@salk.edu>

commit 904338c
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Tue Jul 25 06:34:25 2023 -0700

    Add `Video` to cache when adding `Track` (#1407)

    * Add `Video` to cache when adding `Track`

    * Use methods instead of rewriting code

    * Simplify code

commit 845214c
Author: DivyaSesh <64513125+gitttt-1234@users.noreply.github.com>
Date:   Mon Jul 24 21:20:02 2023 -0700

    Fix Remove Videos in Batch (#1406)

    * Fix Remove Videos in Batch

    * Remove Unused Testing Code

commit 0afbb9b
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Mon Jul 24 17:37:42 2023 -0700

    Add `Track` when add `Instance` (#1408)

commit d173303
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Mon Jul 24 08:25:09 2023 -0700

    Fix skeleton templates (#1404)

commit 0e7a372
Author: DivyaSesh <64513125+gitttt-1234@users.noreply.github.com>
Date:   Fri Jul 21 09:49:51 2023 -0700

    Fix panning bounding box (#1398)

commit fb61b6c
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Wed Jul 19 15:30:43 2023 -0700

    Fix `Filedialog` to work across (mac)OS (#1393)

    * Always use dir instead of directory

    * Wrap `FileDialog` methods for OS-specific calls

    * Clean-up os-specific wrapper to check for linux only

    * Lint

    * Fix test for non native `FileDialog`

commit 19cd2b5
Author: DivyaSesh <64513125+gitttt-1234@users.noreply.github.com>
Date:   Mon Jul 17 17:55:29 2023 -0700

    Add option to remove videos in batch (#1382)

    * add option to remove videos in batch

    * Add option to remove videos in batch

    * Add option to remove videos in batches

    * Modify Lint format

    * Add Test cases

    * Modify Test Cases for Removing Videos in Batch

    * Add Comment to test_docks

    * Remove commented line

    * Format files

commit 3b5c4ff
Author: Shrivaths Shyam <52810689+shrivaths16@users.noreply.github.com>
Date:   Fri Jul 14 17:06:58 2023 -0700

    Minor fix in computation of OKS (#1383)

    * fix compute oks

    * Update the oks fix

commit 1c2be11
Author: Liezl Maree <38435167+roomrys@users.noreply.github.com>
Date:   Thu Jul 6 14:44:01 2023 -0700

    Pin micromamba version (#1376)

    * Pin micromamba version

    * Add build number to pin
  • Loading branch information
roomrys committed Sep 10, 2023
1 parent c94c755 commit bbc43c1
Show file tree
Hide file tree
Showing 75 changed files with 4,748 additions and 2,581 deletions.
2 changes: 1 addition & 1 deletion .conda/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set PIP_IGNORE_INSTALLED=False

@REM Install the pip dependencies. Note: Using urls to wheels might be better:
@REM https://docs.conda.io/projects/conda-build/en/stable/user-guide/wheel-files.html)
pip install -r .\requirements.txt
pip install --no-cache-dir -r .\requirements.txt

@REM Install sleap itself. This does not install the requirements, but will list which
@REM requirements are missing (see "install_requires") when user attempts to install.
Expand Down
2 changes: 1 addition & 1 deletion .conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export PIP_IGNORE_INSTALLED=False

# Install the pip dependencies. Note: Using urls to wheels might be better:
# https://docs.conda.io/projects/conda-build/en/stable/user-guide/wheel-files.html)
pip install -r ./requirements.txt
pip install --no-cache-dir -r ./requirements.txt


# Install sleap itself. This does not install the requirements, but will list which
Expand Down
4 changes: 2 additions & 2 deletions .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source:
path: ../

build:
number: 9
number: 1

requirements:
host:
Expand Down Expand Up @@ -83,7 +83,7 @@ requirements:
- conda-forge::scikit-video
- conda-forge::seaborn
- sleap::tensorflow >=2.6.3,<2.11 # No windows GPU support for >2.10, sleap channel has 2.6.3
- conda-forge::tensorflow-hub
- conda-forge::tensorflow-hub <0.14.0 # Causes pynwb conflicts on linux GH-1446

test:
imports:
Expand Down
2 changes: 1 addition & 1 deletion .conda_mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export PIP_NO_INDEX=False
export PIP_NO_DEPENDENCIES=False
export PIP_IGNORE_INSTALLED=False

pip install -r requirements.txt
pip install --no-cache-dir -r requirements.txt

python setup.py install --single-version-externally-managed --record=record.txt
2 changes: 1 addition & 1 deletion .conda_mac/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ about:
summary: {{ data.get('description') }}

build:
number: 5
number: 1

source:
path: ../
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Please include information about how you installed.
- OS:
<!-- [e.g. ubuntu 20.04, macOS 11.0] -->
- Version(s):
<!-- e.g. [SLEAP v1.3.1, python 3.8] --->
<!-- e.g. [SLEAP v1.3.2, python 3.8] --->
- SLEAP installation method (listed [here](https://sleap.ai/installation.html#)):
- [ ] [Conda from package](https://sleap.ai/installation.html#conda-package)
- [ ] [Conda from source](https://sleap.ai/installation.html#conda-from-source)
Expand Down
155 changes: 155 additions & 0 deletions .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# Run tests using built conda packages and wheels.
name: Build CI (no upload)

# Run when changes to pip wheel
on:
push:
paths:
- 'setup.py'
- 'requirements.txt'
- 'dev_requirements.txt'
- 'jupyter_requirements.txt'
- 'pypi_requirements.txt'
- 'environment_build.yml'
- '.github/workflows/build_ci.yml'

jobs:
build:
name: Build wheel (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04"]
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
include:
# Use this condarc as default
- condarc: .conda/condarc.yaml
- wheel_name: sleap-wheel-linux
steps:
# Setup
- uses: actions/checkout@v2

- name: Cache conda
uses: actions/cache@v1
env:
# Increase this value to reset cache if environment_build.yml has not changed
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment_build.yml', 'pyproject.toml') }}

- name: Setup Miniconda for Build
# https://github.com/conda-incubator/setup-miniconda
uses: conda-incubator/setup-miniconda@v2.0.1
with:
python-version: 3.7
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
environment-file: environment_build.yml
condarc-file: ${{ matrix.condarc }}
activate-environment: sleap_ci

- name: Print build environment info
shell: bash -l {0}
run: |
which python
conda list
pip freeze
# Build pip wheel
- name: Build pip wheel
shell: bash -l {0}
run: |
python setup.py bdist_wheel
# Upload artifact "tests" can use it
- name: Upload wheel artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.wheel_name }}
path: dist/*.whl
retention-days: 1

tests:
name: Run tests using wheel (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: build # Ensure the build job has completed before starting this job.
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04", "windows-2022", "macos-latest"]
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
include:
# Default values
- wheel_name: sleap-wheel-linux
- venv_cmd: source venv/bin/activate
- pip_cmd: |
wheel_path=$(find dist -name "*.whl")
echo $wheel_path
pip install '$wheel_path'[dev]
- test_args: pytest --durations=-1 tests/
- condarc: .conda/condarc.yaml
# Use special condarc if macos
- os: "macos-latest"
condarc: .conda_mac/condarc.yaml
# Ubuntu specific values
- os: ubuntu-22.04
# Otherwise core dumped in github actions
test_args: |
sudo apt install xvfb libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
sudo Xvfb :1 -screen 0 1024x768x24 </dev/null &
export DISPLAY=":1"
pytest tests -k 'not exclude_from_linux_pip_test'
# Windows specific values
- os: windows-2022
venv_cmd: .\venv\Scripts\activate

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Set up Python 3.7
uses: actions/setup-python@v4
with:
python-version: 3.7

# Download wheel
- name: Download wheel artifact
uses: actions/download-artifact@v3
id: download
with:
name: ${{ matrix.wheel_name }}
path: dist

- name: Create virtual environment
run: python -m venv venv

- name: Activate virtual environment
run: ${{ matrix.venv_cmd }}

- name: Install the built wheel (not Mac)
if: runner.os != 'macOS'
shell: bash -l {0}
run: |
wheel_path=$(find dist -name "*.whl")
echo wheel_path
pip install "$wheel_path"[dev]
- name: Install the built wheel (Mac)
if: runner.os == 'macOS'
shell: bash -e {0}
run: |
wheel_path=$(find dist -name "*.whl")
echo wheel_path
pip install "$wheel_path"[dev]
- name: Print test environment info
shell: bash -l {0}
run: |
which python
pip freeze
# Install and test the wheel
- name: Test the built wheel
run: |
${{ matrix.test_args}}
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
# https://github.com/mamba-org/setup-micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.4.6-0'
environment-file: ${{ matrix.env_file }}
environment-name: sleap_ci
init-shell: >-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
# 'main' triggers updates to 'sleap.ai', all others to 'sleap.ai/develop'
- main
- develop
- liezl/update_installation_docs
- liezl/add-pip-extras
paths:
- "docs/**"
- "README.rst"
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Quick install

.. code-block:: bash
pip install sleap
pip install sleap[pypi]
See the docs for `full installation instructions <https://sleap.ai/installation.html>`_.
Expand Down
2 changes: 0 additions & 2 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ black==21.6b0
pre-commit
twine==3.3.0
PyGithub
jupyterlab
jedi==0.17.2
ipykernel
click==8.0.4
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import os
import sys
import shutil
import docs.utils
from datetime import date

sys.path.insert(0, os.path.abspath(".."))
import docs.utils


# -- Project information -----------------------------------------------------
Expand All @@ -28,15 +28,15 @@
copyright = f"2019–{date.today().year}, Talmo Lab"

# The short X.Y version
version = "1.3.1"
version = "1.3.2"

# Get the sleap version
# with open("../sleap/version.py") as f:
# version_file = f.read()
# version = re.search("\d.+(?=['\"])", version_file).group(0)

# Release should be the full branch name
release = "v1.3.1"
release = "v1.3.2"

html_title = f"SLEAP ({release})"
html_short_title = "SLEAP"
Expand Down
Loading

0 comments on commit bbc43c1

Please sign in to comment.