Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MacOSX support without hardware #1859

Merged
merged 17 commits into from
Dec 1, 2023
Merged

Conversation

t-b
Copy link
Collaborator

@t-b t-b commented Aug 22, 2023

Close #1639

@t-b t-b self-assigned this Aug 22, 2023
@t-b t-b force-pushed the feature/1859-add-macosx-support branch 6 times, most recently from 1c62be9 to 7165a4d Compare August 25, 2023 18:45
@t-b t-b marked this pull request as ready for review August 25, 2023 18:54
@t-b t-b requested a review from timjarsky as a code owner August 25, 2023 18:54
@t-b t-b assigned t-b and unassigned t-b Aug 25, 2023
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from 1a265ae to 6f0863b Compare September 5, 2023 16:56
@t-b t-b removed their assignment Sep 7, 2023
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from 6f0863b to 51f74d4 Compare September 25, 2023 12:16
@t-b t-b mentioned this pull request Oct 13, 2023
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from 1ceed46 to 2ecbb85 Compare October 13, 2023 21:34
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from 2ecbb85 to a89b8f0 Compare October 25, 2023 13:25
@t-b
Copy link
Collaborator Author

t-b commented Oct 26, 2023

Works now -> #1851 (reply in thread)

README.md Outdated Show resolved Hide resolved
@timjarsky timjarsky assigned t-b and unassigned timjarsky Oct 31, 2023
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from d4656e3 to ff48c8c Compare November 1, 2023 21:27
@t-b
Copy link
Collaborator Author

t-b commented Nov 1, 2023

Diff:

 -:  --------- >  1:  d7470dfd2 CI: Rename TestITC job to TestITC18
 -:  --------- >  2:  6f983d27b CI: Add testing with ITC1600
 -:  --------- >  3:  ea371e1d2 DeviceNameGeneratorMD1: Use ITC1600 device zero
 -:  --------- >  4:  ec36e2e11 Tests/UnassociatedChannelsAndTTLs: Fix stimset length test assertion for ITC1600
 -:  --------- >  5:  761a18b8a GetActiveChannelsTTL: Add parantheses around operators of different precedence
 -:  --------- >  6:  a88075499 GetActiveChannelsTTL: Fix TTLbits for TTL rack one
 -:  --------- >  7:  edf99d7d8 EP_GetEpochs/EP_FetchEpochs: Improve documentation
 -:  --------- >  8:  b1271f37f NWB_AppendSweepLowLevel: Fix exporting TTL epoch information for ITC hardware
 -:  --------- >  9:  675690df6 tests/UnassociatedChannelsAndTTLs: Use different channels and stimsets for ITC rack one
 -:  --------- > 10:  bd630527e Packages/IPNWB: Update
 -:  --------- > 11:  0bcb9db47 MIES_MiesUtilities.ipf: Make some more helper routines threadsafe
 -:  --------- > 12:  a884ff57c SplitSweepIntoComponents: Make backup creation optional
 -:  --------- > 13:  f4b5a0f63 NWB_AppendSweepLowLevel: Fix and rework TTL channel saving
 -:  --------- > 14:  ec0213b66 SplitSweepIntoComponents: Workaround IP bug in preemptive thread
 -:  --------- > 15:  7ddaa4419 FindRightMostHighBit: Add it
 -:  --------- > 16:  b7afd53ba MIES_NeuroDataWithoutBorders.ipf: Introduce functions for TTL channel suffix generation in NWB
 -:  --------- > 17:  24d2e848d Fix: Testpulse calculation failed if TP data is NaN
 -:  --------- > 18:  ea4ab90c6 UTF_PA_Tests.ipf: Remove duplicated ModifyBrowser call
 -:  --------- > 19:  c9f939f98 Tests: Only close Databrowser in CI
 -:  --------- > 20:  859042cb0 Format: Add brackets around operation value division
 -:  --------- > 21:  dd6eb9dff Format: Prevent variable name "as"
 -:  --------- > 22:  ade5479eb Format: Add brackets around operation flag arguments
 1:  f6f5899ed = 23:  b2f49fa83 XOPs-MacOSX-IP9-64bit/JSON-64.xop: Add it
 2:  44f958c48 = 24:  087701c07 XOPs-MacOSX-IP9-64bit/TUF-64.xop: Add it
 3:  c6a3442df = 25:  f0551f12f XOPs-MacOSX-IP9-64bit/ZeroMQ-64.xop: Add it
 4:  4725e4234 = 26:  918cdf78c .pre-commit-config.yaml: Ignore MacOSX XOP folder
 5:  727fffd14 ! 27:  a58d2dbfa installation.rst: Document how to manually install on MacOSX
    @@ Packages/doc/installation.rst: hardware related XOPs present.
     +MacOSX (without hardware)
     +~~~~~~~~~~~~~~~~~~~~~~~~~
     +
    -+We do support analysis on MacOSX only. We neither support data acquisition nor
    -+export into NWBv2.
    ++Analysis support only. Data acquisition and NWBv2 export are not supported on MacOSx.
     +
     +-  Quit Igor Pro
    ++-  Get the MIES source code, see
    ++   `here <https://alleninstitute.github.io/MIES/developers.html#latest-development-version-from-main-branch>`__
    ++   for instructions.
     +-  Create the following symlinks in
     +   ``/Users/$username/Documents/WaveMetrics/Igor Pro 9 User Files``
     +
 6:  89975804e = 28:  80b3cfa88 Add support for nightly IP versions on MacOSX
 7:  35ff5d66c ! 29:  956bb5bca Add stubs for MiesUtils XOP functions on MacOSX
    @@ Commit message
         can be conveniently reimplemented with the TUF XOP.
     
      ## Packages/MIES/MIES_Utilities.ipf ##
    -@@ Packages/MIES/MIES_Utilities.ipf: threadsafe Function/S UpperCaseFirstChar(string str)
    +@@ Packages/MIES/MIES_Utilities.ipf: threadsafe Function FindRightMostHighBit(uint64 value)
      
    - 	return UpperStr(str[0]) + str[1, len - 1]
    + 	return NaN
      End
     +
     +#ifdef MACINTOSH
 8:  66752b31c = 30:  ff4a13c7d GetHFSPath: Add support for MacOSX
 9:  4618b8d9c = 31:  6a607523e UTF_AnalysisBrowserTest.ipf: Make them work on MacOSX
10:  6486c2264 = 32:  01dcfafde CreateMiesVersion: Add support for MacOSX
11:  9d2e381d9 = 33:  01948807a Tests/FR_FolderExistsWorks/FR_FileExistsWorks: Make it work on MacOSX
12:  9b618f8e6 = 34:  b37c95b51 DAP_GetITCDeviceList/DAP_GetNIDeviceList: Make them failsafe on MacOSX
13:  783e3d4fd = 35:  deb148109 MEN_CreateIssueOnGithub: Workaround issue on MacOSX
14:  d5637922f = 36:  82cb0f37e Tests/CheckCompilation_IGNORE: Make it pass on MacOSX
15:  a89b8f09c = 37:  dd9a02786 CHI_CheckInstallation: Add preliminary support for MacOSX
16:  9f35ff17f = 38:  03b7be7fb GetDrive: Make it work on Macintosh
17:  d4656e3e7 ! 39:  ff48c8c98 README.md: Mention MacOSX support
    @@ README.md: for new hardware.
      - [Download](https://github.com/AllenInstitute/MIES/releases/tag/latest) the latest release
     -- Run the installer
     +- Windows: Run the installer
    -+- MacOSX: [Manual installation](https://alleninstitute.github.io/MIES/installation.html#manual-installation)
    ++- MacOSX (Analysis only): [Manual installation](https://alleninstitute.github.io/MIES/installation.html#manual-installation)
      - [View](https://alleninstitute.github.io/MIES/user.html) the documentation
      
      ## Support statement

@t-b t-b enabled auto-merge November 1, 2023 21:29
@t-b t-b assigned timjarsky and unassigned t-b Nov 1, 2023
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from ff48c8c to 0ef3291 Compare November 14, 2023 22:00
Version: version-879-ge747620
t-b added 8 commits November 30, 2023 23:46
Version: version-163-g3a5c925
Version: d82030e6 (Merge pull request #46 from AllenInstitute/add-timestamp-to-logging, 2023-05-24)
We don't have the nightly from April for MacOSX so we just take the latest
and hope that it works.
We don't need MU_GetFreeDiskSpace for analysis but MU_RunningInMainThread
can be conveniently reimplemented with the TUF XOP.
The IP routine ParseFilePath with mode 5 can convert from Windows to HFS,
but not from posix to HFS. So let's change the input file paths to HFS to
avoid that issue.
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from 0ef3291 to dc08795 Compare November 30, 2023 22:46
t-b added 8 commits November 30, 2023 23:52
This adds support for gathering the MIES git version on MacOSX.

Switching to HFS paths and then converting to the native path for
Windows/MacOSX makes it easier to handle.

The "do shell script" for MacOSX was taken straight from the
documentation of ExecuteScriptText.
We neither have an ITCXOP2 on MACOSX nor a NIDAQmx XOP so we always know
that we don't have any devices.

Let's shortcut then in this case. This avoids some tests errors
Somehow the operation BrowseURL does not work on MacOSX catalina of the
author.

This could be some security feature issue, so let's just inform the user
what to do.
We have not compiled the NWBv2 compound XOP for MacOSX so we also can not
check that one of its operations are available.
This avoids to check for XOPs which never exist. Some checks still fail as
XOPs are folders on MacOSX but files on Windows.

Also the versions of the XOPs are not correct.
The function returns the volume name on MacOSX and that can be a multi-letter string.

Bug present since at least c143784 (MIES_Utilities.ipf: Factor out
windows drive parsing into GetDrive, 2021-01-21).
@t-b t-b force-pushed the feature/1859-add-macosx-support branch from dc08795 to ec0a2c1 Compare November 30, 2023 22:52
@t-b
Copy link
Collaborator Author

t-b commented Nov 30, 2023

Will merge once CI passes.

@t-b t-b disabled auto-merge December 1, 2023 11:25
@t-b t-b merged commit cfbd238 into main Dec 1, 2023
18 checks passed
@t-b t-b deleted the feature/1859-add-macosx-support branch December 1, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get it working on Mac without hardware
2 participants