|
| 1 | +Developer |
| 2 | +========= |
| 3 | + |
| 4 | +Getting MIES |
| 5 | +------------ |
| 6 | + |
| 7 | +Latest development version from master branch |
| 8 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 9 | + |
| 10 | +- ``git clone https://github.com/AllenInstitute/MIES`` |
| 11 | +- ``./tools/initial-repo-config.sh`` (Requires a Git Bash shell, named |
| 12 | + Git terminal in SourceTree) |
| 13 | + |
| 14 | +Installation |
| 15 | +------------ |
| 16 | + |
| 17 | +Select the installer for the latest release in the next section (Support |
| 18 | +statement). For manual installation instructions see `here <manualinstallation>`_. |
| 19 | + |
| 20 | +Pressure control may be implemented with ITC and/or NIDAQ hardware. For |
| 21 | +NIDAQ hardware, install the `NIDAQ Tool |
| 22 | +MX <https://www.wavemetrics.com/products/nidaqtools/nidaqtools.htm>`__ |
| 23 | +package from Wavemetrics. |
| 24 | + |
| 25 | +Depending on the bitness (64 or 32) of the Igor Pro version you plan to |
| 26 | +use (64-bit is recommended) install either version 2.2.2 of the |
| 27 | +Multiclamp Commander (64bit) or version 2.1.0.16 (32-bit). Both can be |
| 28 | +downloaded from |
| 29 | +`here <http://mdc.custhelp.com/app/answers/detail/a_id/20059>`__. |
| 30 | + |
| 31 | +Arduino |
| 32 | +------- |
| 33 | + |
| 34 | +Setup |
| 35 | +~~~~~ |
| 36 | + |
| 37 | +Advanced measurement modes like Yoking require an Arduino for triggering |
| 38 | +the DAC hardware. The following steps have to be performed in order to |
| 39 | +get a working setup: |
| 40 | + |
| 41 | +- Get an `Arduino |
| 42 | + UNO <https://www.arduino.cc/en/Main/ArduinoBoardUno>`__, for easier |
| 43 | + PIN access a `screw |
| 44 | + shield <http://www.robotshop.com/en/dfrobot-arduino-compatible-screw-shield.html>`__ |
| 45 | + comes in handy too |
| 46 | +- Connect the device to the PC via USB |
| 47 | +- Install the Arduino studio from |
| 48 | + "Packages\\Arduino\\arduino-1.6.8-windows.exe" |
| 49 | +- Extract "Packages\\Arduino\\Arduino-libraries-and-sequencer.zip" into |
| 50 | + "C:\\Users\\$username\\Documents\\Arduino" |
| 51 | +- Start Arduino studio and try connecting to the device |
| 52 | +- Load and compile the installed sequence "Igor\_Sequencer3.ino" |
| 53 | +- Connect Pin 12 and GND to the trigger input of the DAC hardware |
| 54 | + |
| 55 | +Usage |
| 56 | +~~~~~ |
| 57 | + |
| 58 | +- Connect Arduino |
| 59 | +- Start Arduino studio and upload "Igor\_Sequencer3.ino" |
| 60 | +- Start Igor Pro |
| 61 | +- Open the panel from the Arduino menu |
| 62 | +- Connect |
| 63 | +- Upload Sequence |
| 64 | +- The start of DAQ is done by MIES itself |
| 65 | + |
| 66 | +Building the documentation |
| 67 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 68 | + |
| 69 | +Required 3rd party tools |
| 70 | +^^^^^^^^^^^^^^^^^^^^^^^^ |
| 71 | + |
| 72 | +- `Doxygen <http://doxygen.org>`__ 1.8.15 |
| 73 | +- `Gawk <http://sourceforge.net/projects/ezwinports/files/gawk-4.1.3-w32-bin.zip/download>`__ |
| 74 | + 4.1.3 or later |
| 75 | +- `Dot <http://www.graphviz.org>`__ 2.38 or later |
| 76 | +- `python <http://www.python.org>`__ 2.7 or later |
| 77 | +- ``pip install -r Packages\doc\requirements-doc.txt`` |
| 78 | + |
| 79 | +Execute ``tools/build-documentation.sh``. |
| 80 | + |
| 81 | +Release Handling |
| 82 | +---------------- |
| 83 | + |
| 84 | +If guidelines are not followed, the MIES version will be unknown, and |
| 85 | +data acquisition is blocked. |
| 86 | + |
| 87 | +Cutting a new release |
| 88 | +~~~~~~~~~~~~~~~~~~~~~ |
| 89 | + |
| 90 | +- Checkout the master branch |
| 91 | +- Check that MIES compiles |
| 92 | +- Check that doxygen/sphinx/breathe returns neither errors nor warnings |
| 93 | +- Paste the contents of ``Packages\doc\releasenotes_template.rst`` to |
| 94 | + the top of ``Packages\doc\releasenotes.rst`` |
| 95 | +- Call ``tools\create-changelog.sh`` which generate a raw changelog and |
| 96 | + fill ``releasenotes.rst`` with a cleaned up version of it. |
| 97 | +- Tag the current state with ``git tag Release_X.Y_*``, see ``git tag`` |
| 98 | + for how the asterisk should look like |
| 99 | +- Push the tag: ``git push --tags`` |
| 100 | +- Create the release branches: |
| 101 | + |
| 102 | + - ``git checkout -b release/X.Y`` |
| 103 | + - ``git push -u origin release/X.Y`` |
| 104 | + |
| 105 | +- Change the bamboo jobs using release branches to use the branch |
| 106 | + release/X.Y |
| 107 | + |
| 108 | +Creating a release package manually |
| 109 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 110 | + |
| 111 | +- Open a git bash terminal by choosing Actions->"Open in terminal" in |
| 112 | + SourceTree |
| 113 | +- Checkout the release branch ``git checkout release/$myVersion`` |
| 114 | +- If none exists create one with ``git checkout -b release/$myVersion`` |
| 115 | +- Change to the ``tools`` directory in the worktree root folder |
| 116 | +- Execute ``./create-release.sh`` |
| 117 | +- The release package including the version information is then |
| 118 | + available as zip file |
| 119 | + |
| 120 | +Installing a release |
| 121 | +~~~~~~~~~~~~~~~~~~~~ |
| 122 | + |
| 123 | +- Extract the zip archive into a folder on the target machine |
| 124 | +- Follow the steps outlined in the section "Full Installation" |
| 125 | + |
| 126 | +Continuous integration server |
| 127 | +----------------------------- |
| 128 | + |
| 129 | +Our `CI server <http://bamboo.corp.alleninstitute.org/browse/MIES>`__, |
| 130 | +called bamboo, provides the following services for MIES: |
| 131 | + |
| 132 | +Automatic release package building |
| 133 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 134 | + |
| 135 | +- The release branch, ``release/$number`` with the highest ``$number``, |
| 136 | + is polled every 3 minutes for changes |
| 137 | +- If changes are detected, a clone is fetched, and inside a checked out |
| 138 | + git working tree, the release script ``tools/create-release.sh`` is |
| 139 | + executed. |
| 140 | +- The result of the release script, called an artifact in CI-speech, is |
| 141 | + then available as zip package from the `Package |
| 142 | + section <http://bamboo.corp.alleninstitute.org/browse/MIES-RELEASE/latestSuccessful>`__. |
| 143 | +- The release packaging job can be run on a linux box or on a windows |
| 144 | + box with git for windows installed. This is ensured by a platform |
| 145 | + requirement for the job. |
| 146 | + |
| 147 | +Compilation testing (Igor Pro 7.x 64bit only) |
| 148 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 149 | + |
| 150 | +The full MIES installation and the partial installations are IGOR Pro |
| 151 | +compiled using a bamboo job. This allows to catch compile time errors |
| 152 | +early on. For testing compilation manually perform the following steps: |
| 153 | + |
| 154 | +- Create in ``User Procedures`` a shortcut pointing to |
| 155 | + ``Packages\MIES_Include.ipf`` and ``Packages\unit-testing`` |
| 156 | +- Remove the shortcut ``Packages\MIES_Include.ipf`` in |
| 157 | + ``Igor Procedures`` |
| 158 | +- Close all Igor Pro instances |
| 159 | +- Execute ``tools\compilation-testing\check_mies_compilation.bat`` |
| 160 | +- Watch the output |
| 161 | + |
| 162 | +Unit testing |
| 163 | +~~~~~~~~~~~~ |
| 164 | + |
| 165 | +One of the bamboo jobs is responsible for executing our unit tests. All |
| 166 | +tests must be written using the `Igor Unit Testing |
| 167 | +Framework <http://www.igorexchange.com/project/unitTesting>`__ and |
| 168 | +referenced in the main test experiment located in |
| 169 | +``tools\unit-testing\RunAllTests.pxp`` For executing the tests manually |
| 170 | +perform the followings steps: |
| 171 | + |
| 172 | +- Create in ``User Procedures`` a shortcut pointing to |
| 173 | + ``Packages\MIES_Include.ipf``, ``Packages\unit-testing`` and |
| 174 | + ``Packages\Testing-MIES`` |
| 175 | +- Remove the shortcut ``Packages\MIES_Include.ipf`` in |
| 176 | + ``Igor Procedures`` |
| 177 | +- Close all Igor Pro instances |
| 178 | +- Execute ``tools\unit-testing\autorun-test.bat`` |
| 179 | +- Watch the output |
| 180 | + |
| 181 | +Documentation building |
| 182 | +~~~~~~~~~~~~~~~~~~~~~~ |
| 183 | + |
| 184 | +The documentation for the master branch is automatically built and |
| 185 | +uploaded by |
| 186 | +`this <http://bamboo.corp.alleninstitute.org/browse/MIES-CM>`__ bamboo |
| 187 | +job. |
| 188 | + |
| 189 | +Setting up a continous integration server (Linux) |
| 190 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 191 | + |
| 192 | +Preliminaries |
| 193 | +^^^^^^^^^^^^^ |
| 194 | + |
| 195 | +- Linux box with fixed IP |
| 196 | +- Choose a user, here named ``john``, for running the tests. |
| 197 | + |
| 198 | +Enable remote access and auto login |
| 199 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 200 | + |
| 201 | +- Setup autologin into X for this user. E.g. for ``mdm`` add the |
| 202 | + following lines to ``/etc/mdm/mdm.conf``: |
| 203 | + |
| 204 | + .. code:: text |
| 205 | +
|
| 206 | + [daemon] |
| 207 | + AutomaticLoginEnable=true |
| 208 | + AutomaticLogin=john |
| 209 | +
|
| 210 | +- Restart the PC and test that autologin works. |
| 211 | +- Setup remote SSH access with public keys. On the client (your PC!) |
| 212 | + try logging into using SSH. Enable port forwarding |
| 213 | + (``local: 5900 to localhost:5900``). |
| 214 | +- ``apt-get install gawk graphviz pandoc apache2 texlive-full tmux git x11vnc wget``. |
| 215 | +- Checkout the mies repository |
| 216 | +- Copy the scripts ``tools/start*.sh`` to ``/home/john``. |
| 217 | +- Open a ssh terminal, execute ``~/start_x11vnc.sh`` and try connecting |
| 218 | + to the remote X session using e.g. TightVNC and ``localhost:5900`` as |
| 219 | + destination address. |
| 220 | +- Install Multi Clamp Commander from |
| 221 | + `here <http://mdc.custhelp.com/app/answers/detail/a_id/20059/session/L2F2LzIvdGltZS8xNTIyMTU1MzY1L3NpZC9jc3NxKkZJbg%3D%3D>`__ |
| 222 | + via ``env WINEPREFIX=$HOME/.wine-igor wine MultiClamp_2_2_2.exe`` |
| 223 | + |
| 224 | +Install required software |
| 225 | +^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 226 | + |
| 227 | +- (Relevant for Linux Mint 17 Qiana only) Add a file with the following |
| 228 | + sources in ``/etc/apt/sources.list.d/``: |
| 229 | + |
| 230 | + .. code:: text |
| 231 | +
|
| 232 | + deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main |
| 233 | + deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu trusty main |
| 234 | + deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu trusty main |
| 235 | + deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu trusty main |
| 236 | +
|
| 237 | +- ``sudo apt-get update`` |
| 238 | +- ``sudo apt-get install wine openjdk-8-jre`` |
| 239 | +- Download and install doxygen (version 1.8.12 or later) from |
| 240 | + `here <http://www.doxygen.org>`__. |
| 241 | +- ``pip install -U breathe sphinx sphinxcontrib-fulltoc`` |
| 242 | +- Test if building the mies documentation works. |
| 243 | +- Install the script ``tools/mies_deploy_documentation.sh`` as |
| 244 | + described in its file header comment. |
| 245 | + |
| 246 | +Install Igor Pro |
| 247 | +^^^^^^^^^^^^^^^^ |
| 248 | + |
| 249 | +- Install Igor Pro 7 using wine as described |
| 250 | + `here <http://www.igorexchange.com/node/1098#comment-12432>`__. The |
| 251 | + last tested version was 7.01. |
| 252 | + |
| 253 | +Setup bamboo agent |
| 254 | +^^^^^^^^^^^^^^^^^^ |
| 255 | + |
| 256 | +- ``wget http://bamboo.corp.alleninstitute.org/agentServer/agentInstaller/atlassian-bamboo-agent-installer-5.14.1.jar`` |
| 257 | +- ``~/start_bamboo_agent.sh`` |
| 258 | +- In the bamboo web app search the agents list and add the capability |
| 259 | + ``Igor`` to the newly created agent. |
| 260 | +- Add the line ``su -c /home/john/start_bamboo_agent_wrapper.sh john`` |
| 261 | + to ``/etc/rc.local``. This ensures that the bamboo agent |
| 262 | + automatically starts after a reboot. |
| 263 | +- Reboot the PC and check that ``tmux attach bamboo-agent`` opens an |
| 264 | + existing tmux session and that the bamboo agent is running. |
| 265 | + |
| 266 | +Bamboo jobs |
| 267 | +^^^^^^^^^^^ |
| 268 | + |
| 269 | +- Add bamboo jobs requiring the capability ``Igor``. |
| 270 | +- Done! |
| 271 | + |
| 272 | +Setting up a continous integration server (Windows) |
| 273 | +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 274 | + |
| 275 | +- Windows 10 with "Remote Desktop" enabled user |
| 276 | +- Install the folllowing programs: |
| 277 | +- Java 8 |
| 278 | +- Git (choose the installer option which will make the Unix tools |
| 279 | + available in cmd as well) |
| 280 | +- Multiclamp Commander (see above for specifics) |
| 281 | +- NIDAQ-mx driver package 19.0 or later |
| 282 | +- NIDAQ-mx XOP from WaveMetrics |
| 283 | +- HEKA Harware Drivers 2014-03 Windows.zip |
| 284 | +- Igor Pro 7 and 8 |
| 285 | +- Install bamboo remote agent according to |
| 286 | + http://bamboo.corp.alleninstitute.org/admin/agent/addRemoteAgent.action. |
| 287 | +- Start Igor Pro and open a DA\_Ephys panel, lock the device. This will |
| 288 | + not work, so follow the posted suggestions to get it working. |
| 289 | +- Start the bamboo agent as normal user (not using the NT service) |
| 290 | +- Add a new "Igor Pro" style capability to the agent in bamboo |
| 291 | +- Be sure that the "git" capability and the "bash" capability are |
| 292 | + present as well |
0 commit comments