Skip to content

Commit fcf24cb

Browse files
committed
[skip ci] Updates
1 parent c783697 commit fcf24cb

File tree

7 files changed

+71
-26
lines changed

7 files changed

+71
-26
lines changed

_sources/contributing.rst.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ following command from the root of the package:
3131
3232
.. code-block:: bash
3333
34-
$ ruff check eyelinkio
34+
$ ruff check src/eyelinkio
3535
3636
To build the docs:
3737

_sources/index.rst.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ A lightweight library to import SR Research EDF files into Python.
55

66
.. important::
77
**This Software is pre-alpha, meaning it is currently being developed**: Changes to the
8-
API (function names, etc.) may occur without warning. This library has been tested with
9-
MacOS and Linux, but not Windows.
8+
API (function names, etc.) may occur without warning.
109

1110
About the EyeLink Data Format
1211
=============================
@@ -15,8 +14,10 @@ The EyeLink Data Format (EDF; not to be confused with the
1514
`European Data Format <https://www.edfplus.info>`_) is used for storing eyetracking data
1615
from EyeLink eyetrackers. It was put forward by the company
1716
`SR Research <https://www.sr-research.com>`_. SR Research EDF files store data in a
18-
binary format, and reading these files currently requires the `eyelink-edfapi` C
19-
library that is included in the Eyelink Software Developers Kit.
17+
binary format, and reading these files currently relies on the `eyelink-edfapi` C
18+
library that is included in the Eyelink Developers Kit. EyeLinkIO includes
19+
the binary files necessary to read EDF files, so the end-user does not need to install
20+
the Eyelink Software Developers Kit to use EyeLinkIO.
2021

2122
Dependencies
2223
============

_sources/usage.rst.txt

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,6 @@
33
User Guide
44
==========
55

6-
.. important::
7-
- You must have the `EyeLink Software Development Kit <https://www.sr-research.com/support/forum-3.html>`_ installed on your computer
8-
- You must register an account on the forum to access the download (registration is free)
9-
10-
116
Installation
127
------------
138

@@ -44,9 +39,12 @@ For contributors to EyeLinkIO:
4439
pip install --editable ./eyelinkio
4540
4641
.. important::
42+
43+
To install the package in editable mode, you must:
44+
4745
- Fork the repository on GitHub first.
4846
- Clone your forked repository to your computer.
49-
- Make sure you're in the directory *containing* the cloned ``eyelinkio`` folder when you run the command above.
47+
- Make sure you're in the directory *containing* the cloned ``eyelinkio`` folder when you run the command provided above.
5048

5149
Example Usage
5250
-------------
@@ -133,4 +131,31 @@ You can convert an instance of EDF to a pandas DataFrame or an MNE Raw instance
133131
134132
.. seealso::
135133

136-
`Working with eyetracking data in MNE <https://mne.tools/stable/auto_tutorials/preprocessing/90_eyetracking_data.html>`_
134+
`Working with eyetracking data in MNE <https://mne.tools/stable/auto_tutorials/preprocessing/90_eyetracking_data.html>`_
135+
136+
137+
Using the EDF API Library installed on your system
138+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139+
140+
If you have the EDF API Library installed on your system, you can explicitly direct
141+
EyeLinkIO to rely on it when reading your EDF files. This can be done by setting the
142+
``EYELINKIO_USE_INSTALLED_EDFAPI`` parameter to ``true`` before importing EyeLinkIO.
143+
144+
.. code:: python
145+
146+
import os
147+
os.environ["EYELINKIO_USE_INSTALLED_EDFAPI"] = "true"
148+
149+
from eyelinkio.io import read_edf
150+
151+
fname = _get_test_fnames()[0] # Replace this function with the path to your EDF file
152+
edf_file = read_edf(fname)
153+
print(edf_file)
154+
155+
Otherwise, EyeLinkIO will rely on the EDF API Library that comes with the package.
156+
157+
.. note::
158+
159+
If you want to install the EyeLink Developers Kit, you can download it from the
160+
`SR Research website <https://www.sr-research.com/support/forum-3.html>`_. You will
161+
need to register an account to access the download page (registration is free).

contributing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ <h2>Running the tests<a class="headerlink" href="#running-the-tests" title="Link
367367
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>pytest
368368
</pre></div>
369369
</div>
370-
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ruff<span class="w"> </span>check<span class="w"> </span>eyelinkio
370+
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$<span class="w"> </span>ruff<span class="w"> </span>check<span class="w"> </span>src/eyelinkio
371371
</pre></div>
372372
</div>
373373
<p>To build the docs:</p>

index.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ <h1>EyeLinkIO<a class="headerlink" href="#eyelinkio" title="Link to this heading
318318
<div class="admonition important">
319319
<p class="admonition-title">Important</p>
320320
<p><strong>This Software is pre-alpha, meaning it is currently being developed</strong>: Changes to the
321-
API (function names, etc.) may occur without warning. This library has been tested with
322-
MacOS and Linux, but not Windows.</p>
321+
API (function names, etc.) may occur without warning.</p>
323322
</div>
324323
</section>
325324
<section id="about-the-eyelink-data-format">
@@ -328,8 +327,10 @@ <h1>About the EyeLink Data Format<a class="headerlink" href="#about-the-eyelink-
328327
<a class="reference external" href="https://www.edfplus.info">European Data Format</a>) is used for storing eyetracking data
329328
from EyeLink eyetrackers. It was put forward by the company
330329
<a class="reference external" href="https://www.sr-research.com">SR Research</a>. SR Research EDF files store data in a
331-
binary format, and reading these files currently requires the <cite>eyelink-edfapi</cite> C
332-
library that is included in the Eyelink Software Developers Kit.</p>
330+
binary format, and reading these files currently relies on the <cite>eyelink-edfapi</cite> C
331+
library that is included in the Eyelink Developers Kit. EyeLinkIO includes
332+
the binary files necessary to read EDF files, so the end-user does not need to install
333+
the Eyelink Software Developers Kit to use EyeLinkIO.</p>
333334
</section>
334335
<section id="dependencies">
335336
<h1>Dependencies<a class="headerlink" href="#dependencies" title="Link to this heading">#</a></h1>

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

usage.html

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,6 @@
346346

347347
<section id="user-guide">
348348
<span id="id1"></span><h1>User Guide<a class="headerlink" href="#user-guide" title="Link to this heading">#</a></h1>
349-
<div class="admonition important">
350-
<p class="admonition-title">Important</p>
351-
<ul class="simple">
352-
<li><p>You must have the <a class="reference external" href="https://www.sr-research.com/support/forum-3.html">EyeLink Software Development Kit</a> installed on your computer</p></li>
353-
<li><p>You must register an account on the forum to access the download (registration is free)</p></li>
354-
</ul>
355-
</div>
356349
<section id="installation">
357350
<h2>Installation<a class="headerlink" href="#installation" title="Link to this heading">#</a></h2>
358351
<div class="admonition note">
@@ -381,10 +374,11 @@ <h3>3. <strong>Development Installation</strong> (Dynamic)<a class="headerlink"
381374
</div>
382375
<div class="admonition important">
383376
<p class="admonition-title">Important</p>
377+
<p>To install the package in editable mode, you must:</p>
384378
<ul class="simple">
385379
<li><p>Fork the repository on GitHub first.</p></li>
386380
<li><p>Clone your forked repository to your computer.</p></li>
387-
<li><p>Make sure you’re in the directory <em>containing</em> the cloned <code class="docutils literal notranslate"><span class="pre">eyelinkio</span></code> folder when you run the command above.</p></li>
381+
<li><p>Make sure you’re in the directory <em>containing</em> the cloned <code class="docutils literal notranslate"><span class="pre">eyelinkio</span></code> folder when you run the command provided above.</p></li>
388382
</ul>
389383
</div>
390384
</section>
@@ -456,6 +450,29 @@ <h3>Converting to a DataFrame or MNE Raw instance<a class="headerlink" href="#co
456450
<p><a class="reference external" href="https://mne.tools/stable/auto_tutorials/preprocessing/90_eyetracking_data.html">Working with eyetracking data in MNE</a></p>
457451
</div>
458452
</section>
453+
<section id="using-the-edf-api-library-installed-on-your-system">
454+
<h3>Using the EDF API Library installed on your system<a class="headerlink" href="#using-the-edf-api-library-installed-on-your-system" title="Link to this heading">#</a></h3>
455+
<p>If you have the EDF API Library installed on your system, you can explicitly direct
456+
EyeLinkIO to rely on it when reading your EDF files. This can be done by setting the
457+
<code class="docutils literal notranslate"><span class="pre">EYELINKIO_USE_INSTALLED_EDFAPI</span></code> parameter to <code class="docutils literal notranslate"><span class="pre">true</span></code> before importing EyeLinkIO.</p>
458+
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
459+
<span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="p">[</span><span class="s2">&quot;EYELINKIO_USE_INSTALLED_EDFAPI&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;true&quot;</span>
460+
461+
<span class="kn">from</span> <span class="nn">eyelinkio.io</span> <span class="kn">import</span> <span class="n">read_edf</span>
462+
463+
<span class="n">fname</span> <span class="o">=</span> <span class="n">_get_test_fnames</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span> <span class="c1"># Replace this function with the path to your EDF file</span>
464+
<span class="n">edf_file</span> <span class="o">=</span> <span class="n">read_edf</span><span class="p">(</span><span class="n">fname</span><span class="p">)</span>
465+
<span class="nb">print</span><span class="p">(</span><span class="n">edf_file</span><span class="p">)</span>
466+
</pre></div>
467+
</div>
468+
<p>Otherwise, EyeLinkIO will rely on the EDF API Library that comes with the package.</p>
469+
<div class="admonition note">
470+
<p class="admonition-title">Note</p>
471+
<p>If you want to install the EyeLink Developers Kit, you can download it from the
472+
<a class="reference external" href="https://www.sr-research.com/support/forum-3.html">SR Research website</a>. You will
473+
need to register an account to access the download page (registration is free).</p>
474+
</div>
475+
</section>
459476
</section>
460477
</section>
461478

@@ -516,6 +533,7 @@ <h3>Converting to a DataFrame or MNE Raw instance<a class="headerlink" href="#co
516533
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#reading-an-edf-file">Reading an EDF file</a></li>
517534
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#inspecting-an-edf-object">Inspecting an EDF object</a></li>
518535
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#converting-to-a-dataframe-or-mne-raw-instance">Converting to a DataFrame or MNE Raw instance</a></li>
536+
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#using-the-edf-api-library-installed-on-your-system">Using the EDF API Library installed on your system</a></li>
519537
</ul>
520538
</li>
521539
</ul>

0 commit comments

Comments
 (0)