From cd5a078390949805477521b2e1c270df8e5304f8 Mon Sep 17 00:00:00 2001 From: Miguel Merino Date: Wed, 2 Oct 2019 15:46:18 +0200 Subject: [PATCH 1/2] pypi --- ArtifactClassifiers.py | 4 ++-- LICENSE.txt | 21 --------------------- README.md | 39 --------------------------------------- __init__.py | 2 ++ 4 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 LICENSE.txt delete mode 100644 README.md create mode 100644 __init__.py diff --git a/ArtifactClassifiers.py b/ArtifactClassifiers.py index 045f4f5..f3761dd 100644 --- a/ArtifactClassifiers.py +++ b/ArtifactClassifiers.py @@ -576,7 +576,7 @@ def multiclass_classifier(): binary_predictions = predict_binary_classifier(binary_test_data) import pickle - f2 = open('/Users/sarataylor/Dev/eda-explorer-public/SVMBinary.p', 'rb') + f2 = open('/Users/sarataylor/Dev/eda-explorer-explorer-public/SVMBinary.p', 'rb') s2 = f2.read() clf = pickle.loads(s2) @@ -591,7 +591,7 @@ def multiclass_classifier(): multi_predictions = predict_multiclass_classifier(test_data) - f2 = open('/Users/sarataylor/Dev/eda-explorer-public/SVMMulticlass.p', 'rb') + f2 = open('/Users/sarataylor/Dev/eda-explorer-explorer-public/SVMMulticlass.p', 'rb') s2 = f2.read() clf = pickle.loads(s2) diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index b46824a..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -EDA-Explorer is an open-source project under the MIT License - -Copyright (c) 2016 Sara Taylor and Natasha Jaques - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 89af8bb..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -eda-explorer -============ - -Scripts to detect artifacts and in electrodermal activity (EDA) data. Note that these scripts are written for Python 2.7 and Python 3.7 - - -Version 1.0 - -Please also cite this project: -Taylor, S., Jaques, N., Chen, W., Fedor, S., Sano, A., & Picard, R. Automatic identification of artifacts in electrodermal activity data. In Engineering in Medicine and Biology Conference. 2015. - - -Required python packages can be found in requirements.txt - -To run artifact detection from the command line: -== -python EDA-Artifact-Detection-Script.py - -Currently there are only 2 classifiers to choose from: Binary or Multiclass - -To run peak detection: -== -python EDA-Peak-Detection-Script.py - -Descriptions of the algorithm settings can be found at http://eda-explorer.media.mit.edu/info/ - -To run accelerometer feature extraction: -== -python AccelerometerFeatureExtractionScript.py - -This file works slightly differently than the others in that it gives summary information over periods of time. - -Notes: -=== - -1. Currently, these files are written with the assumption that the sample rate is an integer power of 2. - -2. Please visit [eda-explorer.media.mit.edu](https://eda-explorer.media.mit.edu) - to use the web-based version diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..994000c --- /dev/null +++ b/__init__.py @@ -0,0 +1,2 @@ +from . import EDA-Artifact-Detection-Script +from . import EDA-Peak-Detection-Script From e6ff2f72120f37f00f76d75729d4945de234bb2f Mon Sep 17 00:00:00 2001 From: Miguel Merino Date: Wed, 2 Oct 2019 15:50:47 +0200 Subject: [PATCH 2/2] pypi 2 --- LICENSE.txt | 21 ++++++++++ README.md | 39 +++++++++++++++++++ .gitignore => eda-explorer/.gitignore | 0 .../AccelerometerFeatureExtractionScript.py | 0 .../ArtifactClassifiers.py | 0 .../EDA-Artifact-Detection-Script.py | 0 .../EDA-Peak-Detection-Script.py | 0 __init__.py => eda-explorer/__init__.py | 2 +- classify.py => eda-explorer/classify.py | 0 load_files.py => eda-explorer/load_files.py | 0 .../requirements.txt | 0 setup.cfg | 3 ++ setup.py | 35 +++++++++++++++++ 13 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 LICENSE.txt create mode 100644 README.md rename .gitignore => eda-explorer/.gitignore (100%) rename AccelerometerFeatureExtractionScript.py => eda-explorer/AccelerometerFeatureExtractionScript.py (100%) rename ArtifactClassifiers.py => eda-explorer/ArtifactClassifiers.py (100%) rename EDA-Artifact-Detection-Script.py => eda-explorer/EDA-Artifact-Detection-Script.py (100%) rename EDA-Peak-Detection-Script.py => eda-explorer/EDA-Peak-Detection-Script.py (100%) rename __init__.py => eda-explorer/__init__.py (52%) rename classify.py => eda-explorer/classify.py (100%) rename load_files.py => eda-explorer/load_files.py (100%) rename requirements.txt => eda-explorer/requirements.txt (100%) create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..b46824a --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +EDA-Explorer is an open-source project under the MIT License + +Copyright (c) 2016 Sara Taylor and Natasha Jaques + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..89af8bb --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +eda-explorer +============ + +Scripts to detect artifacts and in electrodermal activity (EDA) data. Note that these scripts are written for Python 2.7 and Python 3.7 + + +Version 1.0 + +Please also cite this project: +Taylor, S., Jaques, N., Chen, W., Fedor, S., Sano, A., & Picard, R. Automatic identification of artifacts in electrodermal activity data. In Engineering in Medicine and Biology Conference. 2015. + + +Required python packages can be found in requirements.txt + +To run artifact detection from the command line: +== +python EDA-Artifact-Detection-Script.py + +Currently there are only 2 classifiers to choose from: Binary or Multiclass + +To run peak detection: +== +python EDA-Peak-Detection-Script.py + +Descriptions of the algorithm settings can be found at http://eda-explorer.media.mit.edu/info/ + +To run accelerometer feature extraction: +== +python AccelerometerFeatureExtractionScript.py + +This file works slightly differently than the others in that it gives summary information over periods of time. + +Notes: +=== + +1. Currently, these files are written with the assumption that the sample rate is an integer power of 2. + +2. Please visit [eda-explorer.media.mit.edu](https://eda-explorer.media.mit.edu) + to use the web-based version diff --git a/.gitignore b/eda-explorer/.gitignore similarity index 100% rename from .gitignore rename to eda-explorer/.gitignore diff --git a/AccelerometerFeatureExtractionScript.py b/eda-explorer/AccelerometerFeatureExtractionScript.py similarity index 100% rename from AccelerometerFeatureExtractionScript.py rename to eda-explorer/AccelerometerFeatureExtractionScript.py diff --git a/ArtifactClassifiers.py b/eda-explorer/ArtifactClassifiers.py similarity index 100% rename from ArtifactClassifiers.py rename to eda-explorer/ArtifactClassifiers.py diff --git a/EDA-Artifact-Detection-Script.py b/eda-explorer/EDA-Artifact-Detection-Script.py similarity index 100% rename from EDA-Artifact-Detection-Script.py rename to eda-explorer/EDA-Artifact-Detection-Script.py diff --git a/EDA-Peak-Detection-Script.py b/eda-explorer/EDA-Peak-Detection-Script.py similarity index 100% rename from EDA-Peak-Detection-Script.py rename to eda-explorer/EDA-Peak-Detection-Script.py diff --git a/__init__.py b/eda-explorer/__init__.py similarity index 52% rename from __init__.py rename to eda-explorer/__init__.py index 994000c..9be8f2c 100644 --- a/__init__.py +++ b/eda-explorer/__init__.py @@ -1,2 +1,2 @@ from . import EDA-Artifact-Detection-Script -from . import EDA-Peak-Detection-Script +from . import EDA-Peak-Detection-Script \ No newline at end of file diff --git a/classify.py b/eda-explorer/classify.py similarity index 100% rename from classify.py rename to eda-explorer/classify.py diff --git a/load_files.py b/eda-explorer/load_files.py similarity index 100% rename from load_files.py rename to eda-explorer/load_files.py diff --git a/requirements.txt b/eda-explorer/requirements.txt similarity index 100% rename from requirements.txt rename to eda-explorer/requirements.txt diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..9d5f797 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +# Inside of setup.cfg +[metadata] +description-file = README.md \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a8d7af4 --- /dev/null +++ b/setup.py @@ -0,0 +1,35 @@ +from distutils.core import setup +setup( + name='eda-explorer', # How you named your package folder (MyLib) + packages=['eda-explorer'], # Chose the same as "name" + version='0.1', # Start with a small number and increase it with every change you make + license='MIT', # Chose a license + description='Scripts to detect artifacts and in electrodermal activity (EDA) data', + author='Taylor, S., Jaques, N., Chen, W., Fedor, S., Sano, A., & Picard, R.', # Type in your name + author_email='natashamjaques@gmail.com', # Type in your E-Mail + url='https://github.com/MITMediaLabAffectiveComputing/eda-explorer', + download_url='https://github.com/MITMediaLabAffectiveComputing/eda-explorer/archive/v_01.tar.gz', + keywords=['EDA', 'ARTIFACT', 'PEAK'], # Keywords that define your package best + install_requires=[ + 'numpy', + 'pandas', + 'matplotlib', + 'sklearn', + 'pickle', + 'PyWavelets', + 'scipy', + 'pprint', + ], + classifiers=[ + 'Development Status :: 3 - Alpha', # Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the + # current state of your package + 'Intended Audience :: Developers', # Define that your audience are developers + 'Topic :: Software Development :: Build Tools', + 'License :: OSI Approved :: MIT License', # Again, pick a license + 'Programming Language :: Python :: 3', # Specify which pyhton versions that you want to support + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + ], +) \ No newline at end of file