Skip to content

Commit

Permalink
Merge pull request #324 from murthylab/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ntabris committed Mar 11, 2020
2 parents 41431de + 7f81146 commit a1c15a7
Show file tree
Hide file tree
Showing 31 changed files with 871 additions and 492 deletions.
2 changes: 1 addition & 1 deletion .conda/bld.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rem # this out myself, ughhh.
set PIP_NO_INDEX=False
set PIP_NO_DEPENDENCIES=False
set PIP_IGNORE_INSTALLED=False
pip install cattrs==1.0.0rc opencv-python-headless==3.4.1.15 PySide2==5.12.0 imgaug==0.3.0 qimage2ndarray==1.8 imgstore jsmin
pip install cattrs==1.0.0rc opencv-python-headless==3.4.1.15 PySide2>=5.12 imgaug==0.3.0 qimage2ndarray==1.8 imgstore jsmin

rem # Use and update environment.yml call to install pip dependencies. This is slick.
rem # While environment.yml contains the non pip dependencies, the only thing left
Expand Down
2 changes: 1 addition & 1 deletion .conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export PIP_NO_INDEX=False
export PIP_NO_DEPENDENCIES=False
export PIP_IGNORE_INSTALLED=False

pip install cattrs==1.0.0rc opencv-python-headless==3.4.1.15 PySide2==5.12.0 imgaug==0.3.0 qimage2ndarray==1.8 imgstore jsmin
pip install cattrs==1.0.0rc opencv-python-headless==3.4.1.15 PySide2>=5.12 imgaug==0.3.0 qimage2ndarray==1.8 imgstore jsmin

pip install setuptools-scm

Expand Down
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
Social LEAP Estimates Animal Pose (SLEAP)
=========================================

.. image:: docs/_static/sleap_movie.gif
.. image:: https://sleap.ai/docs/_static/sleap_movie.gif
:alt: SLEAP demo movie
:width: 600px

|
Expand Down
19 changes: 17 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ environment:
access_token:
secure: T7XuBtHDu85Tk/d1AeyfhW3CVyzaoddTWmR4xsPIdQ3di0R6x8ncWqw3KrYXkWJm

TWINE_USERNAME: ntabris
TWINE_PASSWORD:
secure: wZhRRgqJ8AdK4LpRBLPg8kA/udXvNrOpeMaaEGnUdUQ=
# use the test PyPi server until we're ready for public release
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/

BUILD_DIR: "build"

conda_access_token:
Expand Down Expand Up @@ -72,6 +78,12 @@ test_script:

on_success:
- cmd: coveralls
# Remove package tarballs so there's less to cache
- conda clean -a

cache:
- C:\Miniconda36-x64\pkgs -> environment.yml
- '%LOCALAPPDATA%\pip\Cache'

# here we are going to override common configuration
for:
Expand Down Expand Up @@ -104,10 +116,13 @@ for:
- cd ..\..\sleap\docs
- make html push

# Deploy the windows conda package to the sleap channel, only on tagged
# builds though.
# Deploy packages on tagged builds
after_deploy:
- cmd: cd ..\
# Deploy wheel to PyPi
- cmd: IF "%APPVEYOR_REPO_TAG%" == "true" (python setup.py bdist_wheel)
- cmd: IF "%APPVEYOR_REPO_TAG%" == "true" (python -m twine upload dist/* --non-interactive --skip-existing --disable-progress-bar)
# Deploy (Windows) Conda package to anaconda sleap channel
- cmd: IF "%APPVEYOR_REPO_TAG%" == "true" (conda build .conda --output-folder %BUILD_DIR%)
- cmd: IF "%APPVEYOR_REPO_TAG%" == "true" (anaconda upload --force %BUILD_DIR%\win-64\*.tar.bz2)
- cmd: IF "%APPVEYOR_REPO_TAG%" == "true" (anaconda logout)
Expand Down
1 change: 1 addition & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ sphinx_rtd_theme
coveralls
black
pre-commit
twine
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
- pip
- pip:
- opencv-python-headless==3.4.1.15
- PySide2==5.12.0
- PySide2>=5.12.0
- imgaug==0.3.0
- cattrs==1.0.0rc0
- qimage2ndarray==1.8
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python-rapidjson
opencv-python-headless==3.4.1.15
pandas
psutil
PySide2
PySide2>=5.12
pyzmq
pyyaml
imgaug==0.3.0
Expand Down
61 changes: 36 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,43 +6,54 @@
from codecs import open
from os import path

import re

here = path.abspath(path.dirname(__file__))

# Get the long description from the README file
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
with open(path.join(here, "README.rst"), encoding="utf-8") as f:
long_description = f.read()

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


def get_requirements(require_name=None):
prefix = require_name + '_' if require_name is not None else ''
with open(path.join(here, prefix + 'requirements.txt'), encoding='utf-8') as f:
return f.read().strip().replace('-gpu','').split('\n')
prefix = require_name + "_" if require_name is not None else ""
with open(path.join(here, prefix + "requirements.txt"), encoding="utf-8") as f:
return f.read().strip().replace("-gpu", "").split("\n")


setup(
name='sleap',
use_scm_version=True,
setup_requires=['setuptools_scm'],
name="sleap",
version=sleap_version,
setup_requires=["setuptools_scm"],
install_requires=get_requirements(),
extras_require={
'dev': get_requirements('dev'),
},
description='SLEAP (Social LEAP Estimates Animal Pose) is a deep learning framework for estimating animal pose.',
extras_require={"dev": get_requirements("dev"),},
description="SLEAP (Social LEAP Estimates Animal Pose) is a deep learning framework for estimating animal pose.",
long_description=long_description,
author='Talmo Pereira, David Turner, Nat Tabris',
author_email='talmo@princeton.edu',
url='https://github.com/murthylab/sleap',
keywords='deep learning, pose estimation, tracking, neuroscience',
license='BSD 3-Clause License',
packages=find_packages(exclude=['tensorflow']),
long_description_content_type="text/x-rst",
author="Talmo Pereira, David Turner, Nat Tabris",
author_email="talmo@princeton.edu",
project_urls={
"Documentation": "https://sleap.ai/#sleap",
"Bug Tracker": "https://github.com/murthylab/sleap/issues",
"Source Code": "https://github.com/murthylab/sleap",
},
url="https://sleap.ai",
keywords="deep learning, pose estimation, tracking, neuroscience",
license="BSD 3-Clause License",
packages=find_packages(exclude=["tensorflow"]),
include_package_data=True,
entry_points = {
'console_scripts': [
'sleap-label=sleap.gui.app:main',
'sleap-train=sleap.nn.training:main',
'sleap-track=sleap.nn.inference:main'
entry_points={
"console_scripts": [
"sleap-label=sleap.gui.app:main",
"sleap-train=sleap.nn.training:main",
"sleap-track=sleap.nn.inference:main",
"sleap-diagnostic=sleap.diagnostic:main",
],
},
python_requires='>=3.6'

python_requires=">=3.6",
)

2 changes: 2 additions & 0 deletions sleap/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
from sleap.io.video import Video
from sleap.instance import LabeledFrame, Instance, PredictedInstance
from sleap.skeleton import Skeleton

from sleap.version import __version__
19 changes: 4 additions & 15 deletions sleap/config/colors.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
alphabet:
# 26 visually distinct colors
# Source: "A Colour Alphabet and the Limits of Colour Coding", Paul Green-Armytage
# https://graphicdesign.stackexchange.com/questions/3682/where-can-i-find-a-large-palette-set-of-contrasting-colors-for-coloring-many-d
# https://github.com/Netflix/atlas/wiki/Color-Palettes#armytage (Apache 2.0 license)
- 240,163,255
- 0,117,220
- 153,63,0
Expand Down Expand Up @@ -38,6 +40,8 @@ five+:
- 255,127,0

solarized:
# Solarized copyright (c) 2011 Ethan Schoonover (MIT license)
# source: https://github.com/altercation/solarized
- 181,137,0
- 203,75,22
- 220,50,47
Expand All @@ -55,18 +59,3 @@ standard:
- 119,172,48
- 77,190,238
- 162,20,47

twelve:
# Source: http://colorbrewer2.org/#type=qualitative&scheme=Paired&n=12
- 31,120,180
- 51,160,44
- 227,26,28
- 255,127,0
- 106,61,154
- 177,89,40
- 166,206,227
- 178,223,138
- 251,154,153
- 253,191,111
- 202,178,214
- 255,255,153
6 changes: 6 additions & 0 deletions sleap/config/shortcuts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@ show edges: Ctrl+Shift+Tab
show labels: Ctrl+Tab
show trails:
transpose: Ctrl+T
frame next: Right
frame prev: Left
frame next medium step: Down
frame prev medium step: Up
frame next large step: Space
frame prev large step: /
Loading

0 comments on commit a1c15a7

Please sign in to comment.