Skip to content

Commit

Permalink
Updates for migration to snirf remote
Browse files Browse the repository at this point in the history
  • Loading branch information
sstucker committed Aug 4, 2022
1 parent f65381d commit 3f80d86
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gen/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
hosted at SPEC_SRC.
"""

LIB_VERSION = '0.6.2' # Version for this script
LIB_VERSION = '0.7.2' # Version for this script

if __name__ == '__main__':

cwd = os.path.abspath(os.getcwd())
if not cwd.endswith('pysnirf2'):
sys.exit('The gen script must be run from the pysnirf2 project root, not ' + cwd)

output_path = cwd + '/pysnirf2/' + 'pysnirf2.py'
output_path = cwd + '/snirf/' + 'pysnirf2.py'

try:
os.remove(output_path)
Expand Down
4 changes: 2 additions & 2 deletions gen/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Example:
Load a file:
>>> from pysnirf2 import Snirf
>>> from snirf import Snirf
>>> with Snirf(<filename>) as s:
...
Expand All @@ -33,7 +33,7 @@
import copy

try:
from pysnirf2.__version__ import __version__ as __version__
from snirf.__version__ import __version__ as __version__
except Exception:
warn('Failed to load pysnirf2 library version')
__version__ = '0.0.0'
Expand Down
6 changes: 3 additions & 3 deletions snirf/pysnirf2.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Example:
Load a file:
>>> from pysnirf2 import Snirf
>>> from snirf import Snirf
>>> with Snirf(<filename>) as s:
...
Expand All @@ -33,7 +33,7 @@
import copy

try:
from pysnirf2.__version__ import __version__ as __version__
from snirf.__version__ import __version__ as __version__
except Exception:
warn('Failed to load pysnirf2 library version')
__version__ = '0.0.0'
Expand Down Expand Up @@ -1384,7 +1384,7 @@ def _recursive_hdf5_copy(g_dst: Group, g_src: Group):
return g_dst


# generated by sstucker on 2022-08-03
# generated by sstucker on 2022-08-04
# version v1.1 SNIRF specification parsed from https://raw.githubusercontent.com/fNIRS/snirf/v1.1/snirf_specification.md


Expand Down
2 changes: 1 addition & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def test_assignment(self):
# Reassignment of same probe
with Snirf(file, 'r+', dynamic_loading=mode) as s:
same_probe = s.nirs[0].probe
self.assertTrue(isinstance(same_probe, pysnirf2.Probe), msg="Could not assign Probe reference")
self.assertTrue(isinstance(same_probe, snirf.Probe), msg="Could not assign Probe reference")
same_probe.sourcePos3D = np.random.random([31, 3])
try:
s.nirs[0].probe = "foo"
Expand Down

0 comments on commit 3f80d86

Please sign in to comment.