Skip to content

Commit

Permalink
Merge c7a3848 into 2f1cba4
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgill86 committed Dec 9, 2022
2 parents 2f1cba4 + c7a3848 commit 57374a8
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/tests.yml
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install package from repository with docs dependencies
run: |
Expand All @@ -32,15 +32,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', '3.7', '3.8', '3.9']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
env:
DISPLAY: ':99.0'

steps:
- name: Set up virtual framebuffer (xvfb) for Qt GUI testing
# https://pytest-qt.readthedocs.io/en/latest/troubleshooting.html#github-actions
run: |
sudo apt-get install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -52,7 +52,7 @@ jobs:
# source activate test-environment

- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install package from repository with tests dependencies
run: |
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
- name: Run tests
run: |
nosetests --with-coverage --cover-package=neurotic
pytest -v --cov
- name: Report coverage to Coveralls
run: coveralls
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2021 Jeffrey Gill
Copyright (c) 2019-2022 Jeffrey Gill

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
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -100,7 +100,7 @@ share the *neurotic* experience with your colleagues! 🤪
Installing *neurotic*
---------------------

*neurotic* requires Python 3.6 or later.
*neurotic* requires Python 3.7 or later.

Standalone Installers (recommended for beginners)
.................................................
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Expand Up @@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------

project = 'neurotic'
copyright = '2021, Jeffrey Gill'
copyright = '2022, Jeffrey Gill'
author = 'Jeffrey Gill'

import neurotic
Expand Down Expand Up @@ -67,7 +67,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Expand Up @@ -3,7 +3,7 @@
Installing *neurotic*
=====================

*neurotic* requires Python 3.6 or later.
*neurotic* requires Python 3.7 or later.

.. _installation-installers:

Expand Down
12 changes: 6 additions & 6 deletions neurotic/gui/config.py
Expand Up @@ -874,7 +874,7 @@ def _neo_epoch_to_dataframe(neo_epochs, exclude_epoch_encoder_epochs=False):
for ep in neo_epochs:
if len(ep.times) > 0 and (not exclude_epoch_encoder_epochs or '(from epoch encoder file)' not in ep.labels):
data = np.array([ep.times, ep.times+ep.durations, ep.durations, [ep.name]*len(ep), ep.labels]).T
df = df.append(pd.DataFrame(data, columns=columns), ignore_index=True)
df = pd.concat([df, pd.DataFrame(data, columns=columns)], ignore_index=True)
return df.astype(dtype=dtypes).sort_values(['Start (s)', 'End (s)', 'Type', 'Label']).reset_index(drop=True)

def _estimate_video_jump_times(blk):
Expand All @@ -892,21 +892,21 @@ def _estimate_video_jump_times(blk):
else:

# obtain approximate start and stop times according to AxoGraph notes
note_start_times = np.array([0], dtype=np.int)
note_stop_times = np.array([], dtype=np.int)
note_start_times = np.array([0], dtype=int)
note_stop_times = np.array([], dtype=int)
for note_line in blk.annotations['notes'].split('\n'):
m = re.match('\d\d\d: Start at (\d*) s', note_line)
m = re.match(r'\d\d\d: Start at (\d*) s', note_line)
if m:
note_start_times = np.append(note_start_times, int(m.group(1)))
m = re.match('\d\d\d: Stop at (\d*) s', note_line)
m = re.match(r'\d\d\d: Stop at (\d*) s', note_line)
if m:
note_stop_times = np.append(note_stop_times, int(m.group(1)))

# calculate approximate pause durations
pause_durations = note_start_times[1:]-note_stop_times[:-1]

# obtain exact stop times (AxoGraph time, not video time)
event_stop_times = np.array([], dtype=np.float)
event_stop_times = np.array([], dtype=float)
ev = next((ev for ev in blk.segments[0].events if ev.name == 'AxoGraph Tags'), None)
if ev is not None:
for time, label in zip(ev.times, ev.labels):
Expand Down
6 changes: 2 additions & 4 deletions requirements-docs.txt
@@ -1,7 +1,5 @@
# these restricted versions are defaults on ReadTheDocs, so use the same in
# local builds and in tests
sphinx<2
readthedocs-sphinx-ext<2.2
sphinx
readthedocs-sphinx-ext

# for inserting CLI usage printout into docs
sphinxcontrib-programoutput
3 changes: 2 additions & 1 deletion requirements-tests.txt
@@ -1,2 +1,3 @@
coveralls
nose
pytest
pytest-cov
2 changes: 1 addition & 1 deletion requirements.txt
@@ -1,6 +1,6 @@
# av # required but typically not installable via pip, try `conda install -c conda-forge av`
ephyviewer>=1.3.0
neo>=0.7.2
neo>=0.7.2,<0.10.0 # TODO: fix for neo>=0.10
numpy
packaging
pandas
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -117,10 +117,11 @@
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering',
],
)

0 comments on commit 57374a8

Please sign in to comment.