Skip to content

Commit 2f3668f

Browse files
authored
Merge branch 'master' into update-ci
2 parents 8869a6f + 7e1f8f7 commit 2f3668f

File tree

12 files changed

+549
-347
lines changed

12 files changed

+549
-347
lines changed

.github/workflows/plexon2-testing.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@ name: NeoPlexon2Test
22

33
on:
44
workflow_dispatch:
5-
schedule:
6-
- cron: "0 12 * * 0" # weekly at noon UTC on Sundays
5+
schedule:
6+
- cron: "0 12 * * 0" # weekly at noon UTC on Sundays
77

88

99
jobs:
1010
build-and-test:
11-
name: Test on (${{ inputs.os }}) (${{ matrix.python-version}}) (${{ matrix.numpy-version }})
12-
runs-on: ${{ inputs.os }}
11+
name: Test on (${{ matrix.os }}) (${{ matrix.python-version}}) (${{ matrix.numpy-version }})
12+
runs-on: ${{ matrix.os }}
1313
strategy:
1414
fail-fast: true
1515
matrix:
16+
os: [windows-latest, ubuntu-latest]
1617
python-version: ['3.9', '3.12']
1718
numpy-version: ['1.26', '2.0']
1819
defaults:

CODE_OF_CONDUCT.md

Lines changed: 9 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,16 @@
1-
# Contributor Covenant Code of Conduct
1+
# [The NumFOCUS Code of Conduct](https://numfocus.org/code-of-conduct)
22

3-
## Our Pledge
3+
Neo subscribes to the NumFOCUS Code of Conduct.
44

5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
## The Short Version
6+
Be kind to others. Do not insult or put down others. Behave professionally. Remember that harassment and sexist, racist, or exclusionary jokes are not appropriate for NumFOCUS.
67

7-
## Our Standards
8+
All communication should be appropriate for a professional audience including people of many different backgrounds. Sexual language and imagery is not appropriate.
89

9-
Examples of behavior that contributes to creating a positive environment include:
10+
NumFOCUS is dedicated to providing a harassment-free community for everyone, regardless of gender, sexual orientation, gender identity and expression, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of community members in any form.
1011

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
12+
Thank you for helping make this a welcoming, friendly community for all.
1613

17-
Examples of unacceptable behavior by participants include:
14+
## The Complete Version
1815

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
24-
25-
## Our Responsibilities
26-
27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28-
29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30-
31-
## Scope
32-
33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34-
35-
## Enforcement
36-
37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38-
39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40-
41-
## Attribution
42-
43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44-
45-
[homepage]: http://contributor-covenant.org
46-
[version]: http://contributor-covenant.org/version/1/4/
16+
The full version of the NumFOCUS Code of Conduct is available at the [NumFOCUS website](https://numfocus.org/code-of-conduct)

README.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Neo objects behave just like normal NumPy arrays, but with additional metadata,
2727
checks for dimensional consistency and automatic unit conversion.
2828

2929
A project with similar aims but for neuroimaging file formats is `NiBabel`_.
30+
Neo is a `NumFocus Affiliated Project`_.
3031

3132
Code status
3233
-----------
@@ -82,3 +83,4 @@ and by the European Union's Research and Innovation Program Horizon Europe Grant
8283
.. _`issue tracker`: https://github.c
8384
.. _tridesclous: https://github.com/tridesclous/tridesclous
8485
.. _ephyviewer: https://github.com/NeuralEnsemble/ephyviewer
86+
.. _`NumFocus Affiliated Project`: https://numfocus.org/sponsored-projects/affiliated-projects

doc/source/governance.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Governance
55
Neo is a community-developed project,
66
we welcome contributions from anyone who is interested in the project.
77
The project maintainers are the members of the `Neo maintainers team`_.
8-
All contributors agree to abide by the Code of Conduct, see the file `CODE_OF_CONDUCT.md`_.
8+
All contributors agree to abide by the `NumFocus Code of Conduct`_,
9+
see the file `CODE_OF_CONDUCT.md`_.
910

1011
Contributions
1112
=============
@@ -49,3 +50,4 @@ The current maintainers are:
4950
.. _`@mdenker`: https://github.com/mdenker
5051
.. _`@alejoe91`: https://github.com/alejoe91
5152
.. _`@zm711`: https://github.com/zm711
53+
.. _`NumFocus Code of Conduct`: https://numfocus.org/code-of-conduct

neo/rawio/neuralynxrawio/ncssections.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,20 @@
3737
import math
3838
import numpy as np
3939

40+
from enum import IntEnum, auto
41+
42+
43+
class AcqType(IntEnum):
44+
PRE4 = auto()
45+
BML = auto()
46+
DIGITALLYNX = auto()
47+
DIGITALLYNXSX = auto()
48+
CHEETAH64 = auto()
49+
RAWDATAFILE = auto()
50+
CHEETAH560 = auto()
51+
ATLAS = auto()
52+
UNKNOWN = auto()
53+
4054

4155
class NcsSections:
4256
"""
@@ -250,7 +264,7 @@ def build_for_ncs_file(ncsMemMap, nlxHdr, gapTolerance=None, strict_gap_mode=Tru
250264
acqType = nlxHdr.type_of_recording()
251265
freq = nlxHdr["sampling_rate"]
252266

253-
if acqType == "PRE4":
267+
if acqType == AcqType.PRE4:
254268
# Old Neuralynx style with truncated whole microseconds for actual sampling. This
255269
# restriction arose from the sampling being based on a master 1 MHz clock.
256270
microsPerSampUsed = math.floor(NcsSectionsFactory.get_micros_per_samp_for_freq(freq))
@@ -266,7 +280,13 @@ def build_for_ncs_file(ncsMemMap, nlxHdr, gapTolerance=None, strict_gap_mode=Tru
266280
ncsSects.sampFreqUsed = sampFreqUsed
267281
ncsSects.microsPerSampUsed = microsPerSampUsed
268282

269-
elif acqType in ["DIGITALLYNX", "DIGITALLYNXSX", "CHEETAH64", "CHEETAH560", "RAWDATAFILE"]:
283+
elif acqType in [
284+
AcqType.DIGITALLYNX,
285+
AcqType.DIGITALLYNXSX,
286+
AcqType.CHEETAH64,
287+
AcqType.CHEETAH560,
288+
AcqType.RAWDATAFILE,
289+
]:
270290
# digital lynx style with fractional frequency and micros per samp determined from block times
271291
if gapTolerance is None:
272292
if strict_gap_mode:
@@ -293,7 +313,7 @@ def build_for_ncs_file(ncsMemMap, nlxHdr, gapTolerance=None, strict_gap_mode=Tru
293313
ncsSects.sampFreqUsed = sampFreqUsed
294314
ncsSects.microsPerSampUsed = NcsSectionsFactory.get_micros_per_samp_for_freq(sampFreqUsed)
295315

296-
elif acqType == "BML" or acqType == "ATLAS":
316+
elif acqType == AcqType.BML or acqType == AcqType.ATLAS:
297317
# BML & ATLAS style with fractional frequency and micros per samp
298318
if strict_gap_mode:
299319
# this is the old behavior, maybe we could put 0.9 sample interval no ?

neo/rawio/neuralynxrawio/neuralynxrawio.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
_spike_channel_dtype,
5454
_event_channel_dtype,
5555
)
56-
from operator import itemgetter
5756
import numpy as np
5857
import os
5958
import pathlib

0 commit comments

Comments
 (0)