Skip to content
This repository has been archived by the owner on Sep 12, 2022. It is now read-only.

Commit

Permalink
change main.py to __main__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahHenrikKleinschmidt committed May 19, 2022
1 parent 1970d4c commit 93b69a5
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 40 deletions.
2 changes: 1 addition & 1 deletion EEGToolkit.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: EEGToolkit
Version: 2.0.0
Version: 2.0.1
Summary: A package for EEG data analysis of reaction time-delay experiments.
Home-page: https://github.com/AxelGiottonini/AP-EEG.git
Author: Axel Giottonini, Noah Kleinschmidt, Kalvin Dobler
Expand Down
3 changes: 2 additions & 1 deletion EEGToolkit.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
README.md
setup.py
EEGToolkit/__init__.py
EEGToolkit/main.py
EEGToolkit/__main__.py
EEGToolkit.egg-info/PKG-INFO
EEGToolkit.egg-info/SOURCES.txt
EEGToolkit.egg-info/dependency_links.txt
EEGToolkit.egg-info/entry_points.txt
EEGToolkit.egg-info/top_level.txt
EEGToolkit/EEGData/EEGData.py
EEGToolkit/EEGData/__init__.py
EEGToolkit/EEGData/__main__.py
EEGToolkit/EEGStats/EEGStats.py
EEGToolkit/EEGStats/__init__.py
EEGToolkit/auxiliary/__init__.py
Expand Down
2 changes: 1 addition & 1 deletion EEGToolkit/EEGData/EEGData.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def main():
inspect.getfile( plot_signal )
)
directory = os.path.dirname( directory )
main_file = f"{directory}/main.py"
main_file = f"{directory}/__main__.py"

# then we call the web interface
print( "Starting the \033[94mEEGToolKit \033[96mViewer" )
Expand Down
Binary file modified EEGToolkit/EEGData/__pycache__/EEGData.cpython-38.pyc
Binary file not shown.
Binary file modified EEGToolkit/EEGData/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified EEGToolkit/EEGStats/__pycache__/EEGStats.cpython-38.pyc
Binary file not shown.
Binary file modified EEGToolkit/EEGStats/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified EEGToolkit/auxiliary/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified EEGToolkit/auxiliary/__pycache__/auxiliary.cpython-38.pyc
Binary file not shown.
Binary file added dist/EEGToolkit-2.0.1-py3-none-any.whl
Binary file not shown.
Binary file added dist/EEGToolkit-2.0.1.tar.gz
Binary file not shown.
86 changes: 58 additions & 28 deletions docs/EEGToolkit/EEGData/EEGData.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,25 @@ <h1 class="title">Module <code>EEGToolkit.EEGData.EEGData</code></h1>
describing event metadata as a 2D array, describing both the timepoints and the type of event in two columns.

&#34;&#34;&#34;
import sys
import os

import subprocess
import inspect
import os
import argparse
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from EEGToolkit.EEGStats import plot_signal, difference_plot

try:
from EEGToolkit.EEGStats import plot_signal, difference_plot
except ImportError:
abspath = os.path.abspath(__file__)
dname = os.path.dirname(os.path.dirname(abspath))
sys.path.append(dname)

from EEGStats import plot_signal, difference_plot


supported_filetypes = [ &#34;npy&#34;, &#34;tsv&#34;, &#34;csv&#34;, &#34;txt&#34; ]
class EEGData():
Expand Down Expand Up @@ -752,7 +762,7 @@ <h1 class="title">Module <code>EEGToolkit.EEGData.EEGData</code></h1>
inspect.getfile( plot_signal )
)
directory = os.path.dirname( directory )
main_file = f&#34;{directory}/main.py&#34;
main_file = f&#34;{directory}/__main__.py&#34;

# then we call the web interface
print( &#34;Starting the \033[94mEEGToolKit \033[96mViewer&#34; )
Expand All @@ -761,19 +771,29 @@ <h1 class="title">Module <code>EEGToolkit.EEGData.EEGData</code></h1>
else:

# the main program (reading datafiles, extracting, and summarizing)
data = EEGData(args.eeg_path, args.event_path, args.sampling_frequency)
data.extract( args.start_sec, args.stop_sec )
if args.baseline:
data.baseline()
data.summary(
significance_level = args.p_value,
x_scale = args.x_scale,
y_scale = args.y_scale,
output = args.output
)
try:
data = EEGData(args.eeg_path, args.event_path, args.sampling_frequency)
data.extract( args.start_sec, args.stop_sec )
if args.baseline:
data.baseline()
data.summary(
significance_level = args.p_value,
x_scale = args.x_scale,
y_scale = args.y_scale,
output = args.output
)

if args.output is not None:
print( f&#34;Output saved successfully to: &#39;{args.output}&#39;&#34; )
if args.output is not None:
print( f&#34;Output saved successfully to: &#39;{args.output}&#39;&#34; )
except FileNotFoundError as e:
print(e)
return
except TypeError as e:
print(e)
return
except ValueError as e:
print(e)
return

if __name__ == &#34;__main__&#34;:

Expand Down Expand Up @@ -927,7 +947,7 @@ <h2 id="example-usage">Example Usage</h2>
inspect.getfile( plot_signal )
)
directory = os.path.dirname( directory )
main_file = f&#34;{directory}/main.py&#34;
main_file = f&#34;{directory}/__main__.py&#34;

# then we call the web interface
print( &#34;Starting the \033[94mEEGToolKit \033[96mViewer&#34; )
Expand All @@ -936,19 +956,29 @@ <h2 id="example-usage">Example Usage</h2>
else:

# the main program (reading datafiles, extracting, and summarizing)
data = EEGData(args.eeg_path, args.event_path, args.sampling_frequency)
data.extract( args.start_sec, args.stop_sec )
if args.baseline:
data.baseline()
data.summary(
significance_level = args.p_value,
x_scale = args.x_scale,
y_scale = args.y_scale,
output = args.output
)
try:
data = EEGData(args.eeg_path, args.event_path, args.sampling_frequency)
data.extract( args.start_sec, args.stop_sec )
if args.baseline:
data.baseline()
data.summary(
significance_level = args.p_value,
x_scale = args.x_scale,
y_scale = args.y_scale,
output = args.output
)

if args.output is not None:
print( f&#34;Output saved successfully to: &#39;{args.output}&#39;&#34; ) </code></pre>
if args.output is not None:
print( f&#34;Output saved successfully to: &#39;{args.output}&#39;&#34; )
except FileNotFoundError as e:
print(e)
return
except TypeError as e:
print(e)
return
except ValueError as e:
print(e)
return</code></pre>
</details>
</dd>
</dl>
Expand Down
13 changes: 11 additions & 2 deletions docs/EEGToolkit/auxiliary/auxiliary.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,20 @@ <h1 class="title">Module <code>EEGToolkit.auxiliary.auxiliary</code></h1>
<pre><code class="python">&#34;&#34;&#34;
Auxiliary functions to work within the streamlit environment
&#34;&#34;&#34;
import sys
import os

from ..EEGData import EEGData, supported_filetypes
import streamlit as st
from copy import deepcopy
import os

try:
from EEGToolkit.EEGData import EEGData, supported_filetypes
except ImportError:
abspath = os.path.abspath(__file__)
dname = os.path.dirname(os.path.dirname(abspath))
sys.path.append(dname)

from EEGData import EEGData, supported_filetypes

class Session:
&#34;&#34;&#34;
Expand Down
6 changes: 0 additions & 6 deletions docs/EEGToolkit/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ <h2 class="section-title" id="header-submodules">Sub-modules</h2>
<dd>
<div class="desc"></div>
</dd>
<dt><code class="name"><a title="EEGToolkit.main" href="main.html">EEGToolkit.main</a></code></dt>
<dd>
<div class="desc"><p>This script defines an interactive
web-app for the EEGData package.</p></div>
</dd>
</dl>
</section>
<section>
Expand All @@ -148,7 +143,6 @@ <h1>Index</h1>
<li><code><a title="EEGToolkit.EEGData" href="EEGData/index.html">EEGToolkit.EEGData</a></code></li>
<li><code><a title="EEGToolkit.EEGStats" href="EEGStats/index.html">EEGToolkit.EEGStats</a></code></li>
<li><code><a title="EEGToolkit.auxiliary" href="auxiliary/index.html">EEGToolkit.auxiliary</a></code></li>
<li><code><a title="EEGToolkit.main" href="main.html">EEGToolkit.main</a></code></li>
</ul>
</li>
</ul>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="EEGToolkit",
version="2.0.0",
version="2.0.1",
author="Axel Giottonini, Noah Kleinschmidt, Kalvin Dobler",
author_email="[email protected], [email protected], [email protected]",
description="A package for EEG data analysis of reaction time-delay experiments.",
Expand Down

0 comments on commit 93b69a5

Please sign in to comment.