From 64fc118b3958d85b147d48368c9c2ca881fdcf2d Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:02:06 +0330
Subject: [PATCH 001/204] fix : requirements bug fixed #84
---
requirements.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index 79261d4d..b851fe56 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,5 +1,5 @@
-codecov==2.0.15
+codecov>=2.0.15
art>0.7
requests>=2.20.0
-pytest==3.10.1
-pytest-cov==2.6.0
+pytest>=3.8.1
+pytest-cov>=2.5.1
From a536e5e56822f4b28e1a486ce74f9250dad8efaf Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:04:49 +0330
Subject: [PATCH 002/204] fix : dev-requirements added #84
---
dev-requirements.txt | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 dev-requirements.txt
diff --git a/dev-requirements.txt b/dev-requirements.txt
new file mode 100644
index 00000000..8ad8c552
--- /dev/null
+++ b/dev-requirements.txt
@@ -0,0 +1,6 @@
+codecov==2.0.15
+art==2.7
+requests==2.21.0
+pytest==4.0.2
+pytest-cov==2.6.0
+setuptools==40.6.3
\ No newline at end of file
From b0d72107ecf589ab2199f6b9092fc9737745f9ce Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:05:48 +0330
Subject: [PATCH 003/204] fix : travis and appveyor requirements part updated
---
.travis.yml | 2 +-
appveyor.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index f0d1ee6a..3a3aa487 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,7 +8,7 @@ python:
- 3.4
install:
- - pip install -r requirements.txt
+ - pip install -r dev-requirements.txt
- python setup.py install
script:
diff --git a/appveyor.yml b/appveyor.yml
index 616ad7c4..c3c640f9 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -26,7 +26,7 @@ init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
install:
- - "%PYTHON%/Scripts/pip.exe install -r requirements.txt"
+ - "%PYTHON%/Scripts/pip.exe install -r dev-requirements.txt"
- "%PYTHON%/python.exe setup.py install"
test_script:
From 82ba1dbebc203debe8acd7873df0cc2cfe42213f Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:14:17 +0330
Subject: [PATCH 004/204] fix : osx added to travis #86
---
.travis.yml | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 3a3aa487..3e661f34 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,10 +2,26 @@ sudo: true
language: python
-python:
- - 3.6
- - 3.5
- - 3.4
+matrix:
+ include:
+ - os: linux
+ sudo: required
+ python: 3.6
+ - os: linux
+ sudo: required
+ python: 3.5
+ - os: linux
+ sudo: required
+ python: 3.4
+ - os: osx
+ language: generic
+ env: TOXENV=py36
+ - os: osx
+ language: generic
+ env: TOXENV=py35
+ - os: osx
+ language: generic
+ env: TOXENV=py34
install:
- pip install -r dev-requirements.txt
From 1ca5df7b015d09d1c7799bc4adf03c1706c6c739 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:21:45 +0330
Subject: [PATCH 005/204] fix : Python 3.7 added to travis and appveyor #85
---
.travis.yml | 12 +++---------
appveyor.yml | 8 ++++++++
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 3e661f34..baa7383b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,6 +4,9 @@ language: python
matrix:
include:
+ - os: linux
+ sudo: required
+ python: 3.7
- os: linux
sudo: required
python: 3.6
@@ -13,15 +16,6 @@ matrix:
- os: linux
sudo: required
python: 3.4
- - os: osx
- language: generic
- env: TOXENV=py36
- - os: osx
- language: generic
- env: TOXENV=py35
- - os: osx
- language: generic
- env: TOXENV=py34
install:
- pip install -r dev-requirements.txt
diff --git a/appveyor.yml b/appveyor.yml
index c3c640f9..4a9b1121 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -21,6 +21,14 @@ environment:
- PYTHON: "C:\\Python36"
PYTHON_VERSION: "3.6.0"
PYTHON_ARCH: "64"
+
+ - PYTHON: "C:\\Python37"
+ PYTHON_VERSION: "3.7.0"
+ PYTHON_ARCH: "64"
+
+ - PYTHON: "C:\\Python37"
+ PYTHON_VERSION: "3.7.0"
+ PYTHON_ARCH: "32"
init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
From d354b4f130eab017280b57a793d49290af72564a Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:30:09 +0330
Subject: [PATCH 006/204] fix : minor edit in travis config #85
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index baa7383b..79a1beb9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,6 +7,7 @@ matrix:
- os: linux
sudo: required
python: 3.7
+ dist: xenial
- os: linux
sudo: required
python: 3.6
From f15321c56fa0c29c5437594c2b1e9a46dab8fd93 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Mon, 24 Dec 2018 01:33:39 +0330
Subject: [PATCH 007/204] fix : osx added to travis again #86
---
.travis.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index 79a1beb9..2d94c1dd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,6 +17,18 @@ matrix:
- os: linux
sudo: required
python: 3.4
+ - os: osx
+ language: generic
+ env: TOXENV=py37
+ - os: osx
+ language: generic
+ env: TOXENV=py36
+ - os: osx
+ language: generic
+ env: TOXENV=py35
+ - os: osx
+ language: generic
+ env: TOXENV=py34
install:
- pip install -r dev-requirements.txt
From 716f4d43087c8c3fce9a8c4f58b0e57e374b0d89 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Mon, 24 Dec 2018 13:45:38 +0330
Subject: [PATCH 008/204] add install script for travis
---
.travis/install.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 .travis/install.sh
diff --git a/.travis/install.sh b/.travis/install.sh
new file mode 100644
index 00000000..afe76d79
--- /dev/null
+++ b/.travis/install.sh
@@ -0,0 +1,10 @@
+PIP=`which pip || (python --version 2>&1 | grep -q 'Python 2' && which pip2) || (python --version 2>&1 | grep -q 'Python 3' && which pip3)`
+
+# Install Python3 on osx
+if [ "$TRAVIS_OS_NAME" = "osx" ] && [ ! -z "$TOXENV" ]
+then
+ $PIP install --user -U tox
+ brew install python3
+ exit 0
+fi
+
From a7973fa06999f5cbe8de80a9d15224da645582bf Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Mon, 24 Dec 2018 13:47:48 +0330
Subject: [PATCH 009/204] add running install script to .travis.yaml
---
.travis.yml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 2d94c1dd..b0512330 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -31,10 +31,11 @@ matrix:
env: TOXENV=py34
install:
+ - bash .travis/install.sh
- pip install -r dev-requirements.txt
- python setup.py install
script:
- python -m pytest opem/Test --cov=opem --cov-report=term
after_success:
- - codecov
\ No newline at end of file
+ - codecov
From 0c4ca4b78c3379bba8fba1da0980ce807f630412 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Mon, 24 Dec 2018 14:12:24 +0330
Subject: [PATCH 010/204] use pyenv for diffrent versions
---
.travis/install.sh | 34 +++++++++++++++++++++++++++-------
1 file changed, 27 insertions(+), 7 deletions(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index afe76d79..62c53383 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -1,10 +1,30 @@
+#!/bin/bash
+
PIP=`which pip || (python --version 2>&1 | grep -q 'Python 2' && which pip2) || (python --version 2>&1 | grep -q 'Python 3' && which pip3)`
-# Install Python3 on osx
-if [ "$TRAVIS_OS_NAME" = "osx" ] && [ ! -z "$TOXENV" ]
-then
- $PIP install --user -U tox
- brew install python3
- exit 0
-fi
+if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
+ brew install pyenv >> /dev/null
+
+ case "${TOXENV}" in
+ py34)
+ pyenv install 3.4.9
+ pyenv global 3.4.9
+ ;;
+ py35)
+ pyenv install 3.5.6
+ pyenv global 3.5.6
+ ;;
+ py36)
+ pyenv install 3.6.7
+ pyenv global 3.6.7
+ ;;
+ py37)
+ pyenv install 3.7.1
+ pyenv global 3.7.1
+ ;;
+ *)
+ brew upgrade python
+ ;;
+ esac
+fi
From 04876514bf0b55a4901aeed2badbda36a31276e4 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Mon, 24 Dec 2018 14:21:15 +0330
Subject: [PATCH 011/204] upgrade pyenv to fix missing versions
---
.travis/install.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index 62c53383..a0f24533 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -5,7 +5,7 @@ PIP=`which pip || (python --version 2>&1 | grep -q 'Python 2' && which pip2) ||
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew install pyenv >> /dev/null
-
+ brew update && brew upgrade pyenv
case "${TOXENV}" in
py34)
pyenv install 3.4.9
From dd239216b718df0bf8b95a987d9efc8595807665 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Mon, 24 Dec 2018 14:35:01 +0330
Subject: [PATCH 012/204] which?
---
.travis.yml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.travis.yml b/.travis.yml
index b0512330..64cbe90f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,10 +32,13 @@ matrix:
install:
- bash .travis/install.sh
+ - which pip
- pip install -r dev-requirements.txt
+ - which python
- python setup.py install
script:
+ - which python
- python -m pytest opem/Test --cov=opem --cov-report=term
after_success:
- codecov
From 160b8692b15d89f667bd2d0016dbfa0e82b8415f Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 01:18:43 +0330
Subject: [PATCH 013/204] Update install.sh
---
.travis/install.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index a0f24533..24ab3517 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -4,8 +4,7 @@ PIP=`which pip || (python --version 2>&1 | grep -q 'Python 2' && which pip2) ||
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
- brew install pyenv >> /dev/null
- brew update && brew upgrade pyenv
+ pyenv install -l
case "${TOXENV}" in
py34)
pyenv install 3.4.9
From 595cfd7073f83853375c8bb142fdf882fc3d3b6d Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 01:19:04 +0330
Subject: [PATCH 014/204] Update .travis.yml
---
.travis.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 64cbe90f..a8b046c2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,9 +32,9 @@ matrix:
install:
- bash .travis/install.sh
- - which pip
+ - which pip3
- pip install -r dev-requirements.txt
- - which python
+ - which python3
- python setup.py install
script:
From f70bb35bffe8866359b05dc8df6a8e742c0aa8a8 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 01:21:50 +0330
Subject: [PATCH 015/204] Update install.sh
---
.travis/install.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index 24ab3517..fcdf9cff 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -7,20 +7,20 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
pyenv install -l
case "${TOXENV}" in
py34)
- pyenv install 3.4.9
- pyenv global 3.4.9
+ pyenv install 3.4.8
+ pyenv global 3.4.8
;;
py35)
- pyenv install 3.5.6
- pyenv global 3.5.6
+ pyenv install 3.5.5
+ pyenv global 3.5.5
;;
py36)
- pyenv install 3.6.7
- pyenv global 3.6.7
+ pyenv install 3.6.5
+ pyenv global 3.6.5
;;
py37)
- pyenv install 3.7.1
- pyenv global 3.7.1
+ pyenv install 3.7.0b3
+ pyenv global 3.7.0b3
;;
*)
brew upgrade python
From ec380977d63b3c6d41b8d18bbd7534162d1c3671 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 01:36:59 +0330
Subject: [PATCH 016/204] Update .travis.yml
---
.travis.yml | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a8b046c2..cbc118e7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -32,10 +32,11 @@ matrix:
install:
- bash .travis/install.sh
- - which pip3
- - pip install -r dev-requirements.txt
- - which python3
- - python setup.py install
+ - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then pip install -r dev-requirements.txt ; fi
+ - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then pip3 install -r dev-requirements.txt ; fi
+ - python3 --version
+ - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then python setup.py install ; fi
+ - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then python3 setup.py install ; fi
script:
- which python
From edea8eb2797bc0971b6e1e3a1a773fa6ca6551e8 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:07:46 +0330
Subject: [PATCH 017/204] add tox.ini file
---
tox.ini | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
create mode 100644 tox.ini
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 00000000..ff1e01a3
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[tox]
+envlist = py{34,35,36,37,38}-{linux_,osx}
+
+
+[testenv]
+description = "OPEM Unit Tests"
+deps = pytest -rrequirements.txt
+
+
+
+platform =
+ linux_: linux
+ osx: darwin
+
+changedir=opem/Test
+commands=
+ linux_: pytest {posargs}
+ osx: pytest {posargs}
\ No newline at end of file
From adafd30ea168f395ad1ec54e0f240bf29863d6b9 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:08:06 +0330
Subject: [PATCH 018/204] add test script for travis
---
.travis/test.sh | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 .travis/test.sh
diff --git a/.travis/test.sh b/.travis/test.sh
new file mode 100644
index 00000000..f2877cea
--- /dev/null
+++ b/.travis/test.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+# Dump Environment (so that we can check PATH, UT_FLAGS, etc.)
+set
+
+tox -- --cov=opem --cov-report=term
\ No newline at end of file
From 57d3ed8b3ffaafed5512d56b1712b9e37c8b5b9d Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:08:31 +0330
Subject: [PATCH 019/204] update .travis.yml to use tox
---
.travis.yml | 32 ++++++++++++++++++--------------
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index cbc118e7..4578734e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,39 +7,43 @@ matrix:
- os: linux
sudo: required
python: 3.7
+ env: TOXENV=py37-linux
dist: xenial
+
- os: linux
sudo: required
python: 3.6
+ env: TOXENV=py36-linux
+
- os: linux
sudo: required
python: 3.5
+ env: TOXENV=py35-linux
+
- os: linux
sudo: required
python: 3.4
+ env: TOXENV=py34-linux
+
- os: osx
language: generic
- env: TOXENV=py37
+ env: TOXENV=py37-osx
+
- os: osx
language: generic
- env: TOXENV=py36
+ env: TOXENV=py36-osx
+
- os: osx
language: generic
- env: TOXENV=py35
+ env: TOXENV=py35-osx
+
- os: osx
language: generic
- env: TOXENV=py34
+ env: TOXENV=py34-osx
+
+install: bash .travis/install.sh
-install:
- - bash .travis/install.sh
- - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then pip install -r dev-requirements.txt ; fi
- - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then pip3 install -r dev-requirements.txt ; fi
- - python3 --version
- - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then python setup.py install ; fi
- - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then python3 setup.py install ; fi
+script: bash .travis/test.sh
-script:
- - which python
- - python -m pytest opem/Test --cov=opem --cov-report=term
after_success:
- codecov
From 6319c3d1e9ba615c024b20fc814c4d78c4235100 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:08:41 +0330
Subject: [PATCH 020/204] update install script to install tox
---
.travis/install.sh | 31 +++++--------------------------
1 file changed, 5 insertions(+), 26 deletions(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index fcdf9cff..02184eab 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -1,29 +1,8 @@
#!/bin/bash
-
-PIP=`which pip || (python --version 2>&1 | grep -q 'Python 2' && which pip2) || (python --version 2>&1 | grep -q 'Python 3' && which pip3)`
-
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
-
- pyenv install -l
- case "${TOXENV}" in
- py34)
- pyenv install 3.4.8
- pyenv global 3.4.8
- ;;
- py35)
- pyenv install 3.5.5
- pyenv global 3.5.5
- ;;
- py36)
- pyenv install 3.6.5
- pyenv global 3.6.5
- ;;
- py37)
- pyenv install 3.7.0b3
- pyenv global 3.7.0b3
- ;;
- *)
- brew upgrade python
- ;;
- esac
+ pip3 install tox
+ exit 0
fi
+
+# Make sure tox is installed and up to date
+pip install -U tox
\ No newline at end of file
From 637909b4c37ca8efa908b603e08b6545943ea82f Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:10:40 +0330
Subject: [PATCH 021/204] fix typo
---
tox.ini | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tox.ini b/tox.ini
index ff1e01a3..d52c2948 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py{34,35,36,37,38}-{linux_,osx}
+envlist = py{34,35,36,37,38}-{linux,osx}
[testenv]
@@ -9,10 +9,10 @@ deps = pytest -rrequirements.txt
platform =
- linux_: linux
+ linux: linux
osx: darwin
changedir=opem/Test
commands=
- linux_: pytest {posargs}
+ linux: pytest {posargs}
osx: pytest {posargs}
\ No newline at end of file
From 482fdf2729fbfb90b8cd6ee9c7022be8903d172f Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:21:29 +0330
Subject: [PATCH 022/204] fix version and deps
---
.travis.yml | 16 ++++++++--------
tox.ini | 5 +++--
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 4578734e..c4af33c9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,11 +4,11 @@ language: python
matrix:
include:
- - os: linux
- sudo: required
- python: 3.7
- env: TOXENV=py37-linux
- dist: xenial
+ # - os: linux
+ # sudo: required
+ # python: 3.7
+ # env: TOXENV=py37-linux
+ # dist: xenial
- os: linux
sudo: required
@@ -25,9 +25,9 @@ matrix:
python: 3.4
env: TOXENV=py34-linux
- - os: osx
- language: generic
- env: TOXENV=py37-osx
+ # - os: osx
+ # language: generic
+ # env: TOXENV=py37-osx
- os: osx
language: generic
diff --git a/tox.ini b/tox.ini
index d52c2948..f2ef9ec6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,10 +1,11 @@
[tox]
-envlist = py{34,35,36,37,38}-{linux,osx}
+envlist = py{34,35,36}-{linux,osx}
[testenv]
description = "OPEM Unit Tests"
-deps = pytest -rrequirements.txt
+deps = pytest
+ -rrequirements.txt
From 4a76372f2066b170d9557fdbd5e37287f39fd814 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:25:07 +0330
Subject: [PATCH 023/204] fix requirements
---
.travis/install.sh | 3 ++-
tox.ini | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index 02184eab..ecd1886b 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -3,6 +3,7 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
pip3 install tox
exit 0
fi
-
+pip install -r requirements.txt
+python setup.py install
# Make sure tox is installed and up to date
pip install -U tox
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
index f2ef9ec6..13f6fee0 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,7 +5,6 @@ envlist = py{34,35,36}-{linux,osx}
[testenv]
description = "OPEM Unit Tests"
deps = pytest
- -rrequirements.txt
From 19bd23fe954dce325d0c80d942090103604c5841 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:33:47 +0330
Subject: [PATCH 024/204] add codecov to tox
---
.travis.yml | 35 ++++++++++++++++-------------------
tox.ini | 5 +++--
2 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index c4af33c9..a5aec8b7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,26 +4,26 @@ language: python
matrix:
include:
- # - os: linux
- # sudo: required
- # python: 3.7
- # env: TOXENV=py37-linux
- # dist: xenial
+ - os: linux
+ sudo: required
+ python: 3.7
+ env: TOXENV=py37-linux,codecov
+ dist: xenial
- os: linux
sudo: required
python: 3.6
- env: TOXENV=py36-linux
+ env: TOXENV=py36-linux,codecov
- os: linux
sudo: required
python: 3.5
- env: TOXENV=py35-linux
+ env: TOXENV=py35-linux,codecov
- os: linux
sudo: required
python: 3.4
- env: TOXENV=py34-linux
+ env: TOXENV=py34-linux,codecov
# - os: osx
# language: generic
@@ -31,19 +31,16 @@ matrix:
- os: osx
language: generic
- env: TOXENV=py36-osx
-
- - os: osx
- language: generic
- env: TOXENV=py35-osx
+ env: TOXENV=py36-osx,codecov
+
+ # - os: osx
+ # language: generic
+ # env: TOXENV=py35-osx
- - os: osx
- language: generic
- env: TOXENV=py34-osx
+ # - os: osx
+ # language: generic
+ # env: TOXENV=py34-osx
install: bash .travis/install.sh
script: bash .travis/test.sh
-
-after_success:
- - codecov
diff --git a/tox.ini b/tox.ini
index 13f6fee0..b55928a6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,10 +1,11 @@
[tox]
-envlist = py{34,35,36}-{linux,osx}
+envlist = py{34,35,36,37,38}-{linux,osx}
[testenv]
description = "OPEM Unit Tests"
-deps = pytest
+deps = pytest
+ codecov
From cdb35428550a790db09b4df299668a8efb62b39a Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:48:01 +0330
Subject: [PATCH 025/204] minor fix
---
.travis.yml | 25 ++++++++++++++-----------
.travis/install.sh | 22 ++++++++++++++++++++++
tox.ini | 2 +-
3 files changed, 37 insertions(+), 12 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index a5aec8b7..1752d096 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,35 +7,35 @@ matrix:
- os: linux
sudo: required
python: 3.7
- env: TOXENV=py37-linux,codecov
+ env: TOXENV=py37-linux
dist: xenial
- os: linux
sudo: required
python: 3.6
- env: TOXENV=py36-linux,codecov
+ env: TOXENV=py36-linux
- os: linux
sudo: required
python: 3.5
- env: TOXENV=py35-linux,codecov
+ env: TOXENV=py35-linux
- os: linux
sudo: required
python: 3.4
- env: TOXENV=py34-linux,codecov
+ env: TOXENV=py34-linux
- # - os: osx
- # language: generic
- # env: TOXENV=py37-osx
+ - os: osx
+ language: generic
+ env: TOXENV=py37-osx
- os: osx
language: generic
- env: TOXENV=py36-osx,codecov
+ env: TOXENV=py36-osx
- # - os: osx
- # language: generic
- # env: TOXENV=py35-osx
+ - os: osx
+ language: generic
+ env: TOXENV=py35-osx
# - os: osx
# language: generic
@@ -44,3 +44,6 @@ matrix:
install: bash .travis/install.sh
script: bash .travis/test.sh
+
+after_success:
+ - codecov
diff --git a/.travis/install.sh b/.travis/install.sh
index ecd1886b..50d9fb39 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -1,6 +1,28 @@
#!/bin/bash
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
pip3 install tox
+ case "${TOXENV}" in
+ py34)
+ pyenv install 3.4.8
+ pyenv global 3.4.8
+ ;;
+ py35)
+ pyenv install 3.5.5
+ pyenv global 3.5.5
+ ;;
+ py36)
+ pyenv install 3.6.5
+ pyenv global 3.6.5
+ ;;
+ py37)
+ pyenv install 3.7.0b3
+ pyenv global 3.7.0b3
+ ;;
+ *)
+ brew upgrade python
+ ;;
+ esac
+
exit 0
fi
pip install -r requirements.txt
diff --git a/tox.ini b/tox.ini
index b55928a6..c351e1e6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,4 +16,4 @@ platform =
changedir=opem/Test
commands=
linux: pytest {posargs}
- osx: pytest {posargs}
\ No newline at end of file
+ osx: pytest {posargs}
From 6e90635aa8003566e0213d4578018a7342b35ea6 Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:50:48 +0330
Subject: [PATCH 026/204] fix
---
.travis/install.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.travis/install.sh b/.travis/install.sh
index 50d9fb39..cee9726d 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -2,19 +2,19 @@
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
pip3 install tox
case "${TOXENV}" in
- py34)
+ py34-osx)
pyenv install 3.4.8
pyenv global 3.4.8
;;
- py35)
+ py35-osx)
pyenv install 3.5.5
pyenv global 3.5.5
;;
- py36)
+ py36-osx)
pyenv install 3.6.5
pyenv global 3.6.5
;;
- py37)
+ py37-osx)
pyenv install 3.7.0b3
pyenv global 3.7.0b3
;;
From 8f11a9a904791be4fecf67625de63730472e2e0b Mon Sep 17 00:00:00 2001
From: Mohammad Mahdi Rahimi
Date: Wed, 26 Dec 2018 02:58:24 +0330
Subject: [PATCH 027/204] final
---
.travis.yml | 12 ++++++------
.travis/install.sh | 22 ----------------------
2 files changed, 6 insertions(+), 28 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 1752d096..1812384f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,17 +25,17 @@ matrix:
python: 3.4
env: TOXENV=py34-linux
- - os: osx
- language: generic
- env: TOXENV=py37-osx
+ # - os: osx
+ # language: generic
+ # env: TOXENV=py37-osx
- os: osx
language: generic
env: TOXENV=py36-osx
- - os: osx
- language: generic
- env: TOXENV=py35-osx
+ # - os: osx
+ # language: generic
+ # env: TOXENV=py35-osx
# - os: osx
# language: generic
diff --git a/.travis/install.sh b/.travis/install.sh
index cee9726d..ecd1886b 100644
--- a/.travis/install.sh
+++ b/.travis/install.sh
@@ -1,28 +1,6 @@
#!/bin/bash
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
pip3 install tox
- case "${TOXENV}" in
- py34-osx)
- pyenv install 3.4.8
- pyenv global 3.4.8
- ;;
- py35-osx)
- pyenv install 3.5.5
- pyenv global 3.5.5
- ;;
- py36-osx)
- pyenv install 3.6.5
- pyenv global 3.6.5
- ;;
- py37-osx)
- pyenv install 3.7.0b3
- pyenv global 3.7.0b3
- ;;
- *)
- brew upgrade python
- ;;
- esac
-
exit 0
fi
pip install -r requirements.txt
From ad3e9cd3664f319f2fabc6e394d15c6c27f37b78 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:10:37 +0330
Subject: [PATCH 028/204] feat : Profile.py added
---
opem/Profile.py | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 opem/Profile.py
diff --git a/opem/Profile.py b/opem/Profile.py
new file mode 100644
index 00000000..702edc1c
--- /dev/null
+++ b/opem/Profile.py
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+from opem.Static.Amphlett import Static_Analysis as Amphlett_Static_Analysis
+Test_Vector={"T":343.15,"PH2":1,"PO2":1,"i-start":0,"i-stop":100,"i-step":0.05,"A":50.6,"l":0.0178,"lambda":23,"N":1,"R":0,"JMax":1.5,"B":0.016,"Name":"Test"}
+Result = Amphlett_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
+
+from opem.Static.Chamberline_Kim import Static_Analysis as Chamberline_Kim_Static_Analysis
+Test_Vector={"A":50.0,"E0":0.982,"b":0.0689,"R":0.328,"m":0.000125,"n":9.45,"N":1,"i-start":1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Result = Chamberline_Kim_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
+
+
+from opem.Static.Larminie_Dicks import Static_Analysis as Larminie_Dicks_Static_Analysis
+Test_Vector={"A":0.0587,"E0":1.178,"B":0.0517,"RM":0.0018,"i_0":0.00654,"i_L":100.0,"i_n":0.23,"N":23,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Result = Larminie_Dicks_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
+
+
+
+
+
+
+
+from opem.Dynamic.Padulles1 import Dynamic_Analysis as Padulles1_Dynamic_Analysis
+Test_Vector={"T":343,"E0":0.6,"N0":88,"KO2":0.0000211,"KH2":0.0000422,"tH2":3.37,"tO2":6.74,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,"i-start":0,"i-stop":100,"i-step":0.1,
+ "Name":"Test"}
+Result = Padulles1_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
+
+
+
+from opem.Dynamic.Padulles2 import Dynamic_Analysis as Padulles2_Dynamic_Analysis
+Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,
+ "i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Result = Padulles2_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
+
+
+from opem.Dynamic.Padulles_Hauer import Dynamic_Analysis as Padulles_Hauer_Dynamic_Analysis
+Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Result = Padulles_Hauer_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
+
+
+from opem.Dynamic.Padulles_Amphlett import Dynamic_Analysis as Padulles_Amphlett_Dynamic_Analysis
+Test_Vector={"A":50.6,"l":0.0178,"lambda":23,"JMax":1.5,"T":343,"E0":1.229,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.016,"R":0,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Result = Padulles_Amphlett_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
\ No newline at end of file
From 5485a9cf61a53fd4a7bb998679ad8695021e203f Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:13:27 +0330
Subject: [PATCH 029/204] fix : cprofile mode added to travis
---
.travis.yml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/.travis.yml b/.travis.yml
index 1812384f..c7287b89 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -43,7 +43,9 @@ matrix:
install: bash .travis/install.sh
-script: bash .travis/test.sh
+script:
+ - bash .travis/test.sh
+ - python -m cProfile -s cumtime opem/Profile.py
after_success:
- codecov
From 1e1a7317bc9a389a8e0e6974ccdf07b2dfddbfc4 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:18:17 +0330
Subject: [PATCH 030/204] fix : cprofile removed from travis and added to
appveyor
---
.travis.yml | 1 -
appveyor.yml | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index c7287b89..106abf24 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,7 +45,6 @@ install: bash .travis/install.sh
script:
- bash .travis/test.sh
- - python -m cProfile -s cumtime opem/Profile.py
after_success:
- codecov
diff --git a/appveyor.yml b/appveyor.yml
index 4a9b1121..4d4ebdd0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -38,4 +38,5 @@ install:
- "%PYTHON%/python.exe setup.py install"
test_script:
- - "%PYTHON%/python.exe -m pytest opem/Test --cov=opem --cov-report=term"
\ No newline at end of file
+ - "%PYTHON%/python.exe -m pytest opem/Test --cov=opem --cov-report=term"
+ - "%PYTHON%/python.exe -m cProfile -s cumtime opem/Profile.py"
\ No newline at end of file
From e30375b26594821c86aa5040c4d28448d878d6b2 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:31:20 +0330
Subject: [PATCH 031/204] fix : minor edit in Profile.py location
---
opem/Profile.py => Profile.py | 0
appveyor.yml | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
rename opem/Profile.py => Profile.py (100%)
diff --git a/opem/Profile.py b/Profile.py
similarity index 100%
rename from opem/Profile.py
rename to Profile.py
diff --git a/appveyor.yml b/appveyor.yml
index 4d4ebdd0..b57a136a 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -39,4 +39,4 @@ install:
test_script:
- "%PYTHON%/python.exe -m pytest opem/Test --cov=opem --cov-report=term"
- - "%PYTHON%/python.exe -m cProfile -s cumtime opem/Profile.py"
\ No newline at end of file
+ - "%PYTHON%/python.exe -m cProfile -s cumtime Profile.py"
\ No newline at end of file
From 4ac43a67fbbfa44252f10d6b4faa2acc0e224fce Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:41:25 +0330
Subject: [PATCH 032/204] fix : minor edit in Profile.py threshold
---
appveyor.yml | 2 +-
Profile.py => opem/Profile.py | 16 +++++++++-------
2 files changed, 10 insertions(+), 8 deletions(-)
rename Profile.py => opem/Profile.py (77%)
diff --git a/appveyor.yml b/appveyor.yml
index b57a136a..4d4ebdd0 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -39,4 +39,4 @@ install:
test_script:
- "%PYTHON%/python.exe -m pytest opem/Test --cov=opem --cov-report=term"
- - "%PYTHON%/python.exe -m cProfile -s cumtime Profile.py"
\ No newline at end of file
+ - "%PYTHON%/python.exe -m cProfile -s cumtime opem/Profile.py"
\ No newline at end of file
diff --git a/Profile.py b/opem/Profile.py
similarity index 77%
rename from Profile.py
rename to opem/Profile.py
index 702edc1c..61d9e08f 100644
--- a/Profile.py
+++ b/opem/Profile.py
@@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
from opem.Static.Amphlett import Static_Analysis as Amphlett_Static_Analysis
-Test_Vector={"T":343.15,"PH2":1,"PO2":1,"i-start":0,"i-stop":100,"i-step":0.05,"A":50.6,"l":0.0178,"lambda":23,"N":1,"R":0,"JMax":1.5,"B":0.016,"Name":"Test"}
+Test_Vector={"T":343.15,"PH2":1,"PO2":1,"i-start":0,"i-stop":100,"i-step":0.005,"A":50.6,"l":0.0178,"lambda":23,"N":1,"R":0,"JMax":1.5,"B":0.016,"Name":"Test"}
Result = Amphlett_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
from opem.Static.Chamberline_Kim import Static_Analysis as Chamberline_Kim_Static_Analysis
-Test_Vector={"A":50.0,"E0":0.982,"b":0.0689,"R":0.328,"m":0.000125,"n":9.45,"N":1,"i-start":1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Test_Vector={"A":50.0,"E0":0.982,"b":0.0689,"R":0.328,"m":0.000125,"n":9.45,"N":1,"i-start":1,"i-stop":100,"i-step":0.005,"Name":"Test"}
Result = Chamberline_Kim_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
from opem.Static.Larminie_Dicks import Static_Analysis as Larminie_Dicks_Static_Analysis
-Test_Vector={"A":0.0587,"E0":1.178,"B":0.0517,"RM":0.0018,"i_0":0.00654,"i_L":100.0,"i_n":0.23,"N":23,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Test_Vector={"A":0.0587,"E0":1.178,"B":0.0517,"RM":0.0018,"i_0":0.00654,"i_L":100.0,"i_n":0.23,"N":23,"i-start":0.1,"i-stop":80,"i-step":0.005,"Name":"Test"}
Result = Larminie_Dicks_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
@@ -19,7 +19,7 @@
from opem.Dynamic.Padulles1 import Dynamic_Analysis as Padulles1_Dynamic_Analysis
-Test_Vector={"T":343,"E0":0.6,"N0":88,"KO2":0.0000211,"KH2":0.0000422,"tH2":3.37,"tO2":6.74,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,"i-start":0,"i-stop":100,"i-step":0.1,
+Test_Vector={"T":343,"E0":0.6,"N0":88,"KO2":0.0000211,"KH2":0.0000422,"tH2":3.37,"tO2":6.74,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,"i-start":0,"i-stop":100,"i-step":0.005,
"Name":"Test"}
Result = Padulles1_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
@@ -27,15 +27,17 @@
from opem.Dynamic.Padulles2 import Dynamic_Analysis as Padulles2_Dynamic_Analysis
Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qH2":0.0004,
- "i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+ "i-start":0.1,"i-stop":100,"i-step":0.005,"Name":"Test"}
Result = Padulles2_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
from opem.Dynamic.Padulles_Hauer import Dynamic_Analysis as Padulles_Hauer_Dynamic_Analysis
-Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Test_Vector={"T":343,"E0":0.6,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.04777,"C":0.0136,"Rint":0.00303,"rho":1.168,
+ "qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":100,"i-step":0.005,"Name":"Test"}
Result = Padulles_Hauer_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
from opem.Dynamic.Padulles_Amphlett import Dynamic_Analysis as Padulles_Amphlett_Dynamic_Analysis
-Test_Vector={"A":50.6,"l":0.0178,"lambda":23,"JMax":1.5,"T":343,"E0":1.229,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.016,"R":0,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":100,"i-step":0.1,"Name":"Test"}
+Test_Vector={"A":50.6,"l":0.0178,"lambda":23,"JMax":1.5,"T":343,"E0":1.229,"N0":5,"KO2":0.0000211,"KH2":0.0000422,"KH2O":0.000007716,"tH2":3.37,"tO2":6.74,"t1":2,"t2":2,"tH2O":18.418,"B":0.016,
+ "R":0,"rho":1.168,"qMethanol":0.0002,"CV":2,"i-start":0.1,"i-stop":73,"i-step":0.005,"Name":"Test"}
Result = Padulles_Amphlett_Dynamic_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True)
\ No newline at end of file
From 41b8ef2407dd0cd353f6567e61ab5a3050162810 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:49:43 +0330
Subject: [PATCH 033/204] doc : tables added to README
---
README.md | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index f0c7bd3b..3b8fce8f 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,6 @@
-
@@ -40,13 +39,48 @@
Modeling and simulation of proton-exchange membrane fuel cells (PEMFC) may work as a powerful tool in the Research & development of renewable energy sources. The Open-Source PEMFC Simulation Tool (OPEM) is a modeling tool for evaluating the performance of proton exchange membrane fuel cells. This package is a combination of models (static/dynamic) that predict the optimum operating parameters of PEMFC. OPEM contained generic models that will accept as input, not only values of the operating variables such as anode and cathode feed gas, pressure and compositions, cell temperature and current density, but also cell parameters including the active area and membrane thickness. In addition, some of the different models of PEMFC that have been proposed in the OPEM, just focus on one particular FC stack, and some others take into account a part or all auxiliaries such as reformers. OPEM is a platform for collaborative development of PEMFC models.
+
Fig1. OPEM Block Diagram
+
+
+
+ Open Hub |
+ |
+
+
+ PyPI Counter |
+ |
+
+
+ Github Stars |
+ |
+
+
+
+
+
+ Branch |
+ master |
+ develop |
+
+
+ Travis |
+ |
+ |
+
+
+ AppVeyor |
+ |
+ |
+
+
+
## Usage
From 008b4e7bcf3e825087312d3ca949cd2312e5ce84 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Thu, 27 Dec 2018 14:50:43 +0330
Subject: [PATCH 034/204] doc : README badges section updated
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index 3b8fce8f..20dacce5 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,6 @@
-
-
From 26474879c8065e4f16ab76c9ac451b5ab4a5bbee Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:18:10 +0330
Subject: [PATCH 035/204] fix : built-in file renamed to InputFile in
Output_Save
---
opem/Functions.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index 280712e2..2635f323 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -236,7 +236,7 @@ def Output_Save(
OutputDict,
OutputParams,
i,
- file,
+ InputFile,
PrintMode):
"""
This function write analysis result in Simulation-Result.opem file
@@ -248,17 +248,17 @@ def Output_Save(
:type OutputParams : dict
:param i: cell load current [A]
:type i : float
- :param file : file object
+ :param InputFile : file object
:return: None
"""
spliter = "\n"
if 'win' not in sys.platform:
spliter = "\r\n"
- file.write("I :" + str(i) + " A " + spliter * 2)
+ InputFile.write("I :" + str(i) + " A " + spliter * 2)
if PrintMode:
print("I : " + str(i))
for key in OutputParamsKeys:
- file.write(key +
+ InputFile.write(key +
" : " +
str(OutputDict[key]) +
" " +
@@ -270,7 +270,7 @@ def Output_Save(
str(OutputDict[key]) +
" " +
OutputParams[key])
- file.write("###########" + spliter)
+ InputFile.write("###########" + spliter)
if PrintMode:
print("###########")
From b52a06f53e8d993aad623af4f4ec6e6e64c1dfae Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:19:48 +0330
Subject: [PATCH 036/204] fix : built-in file renamed to opem_file in
Output_Init
---
opem/Functions.py | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index 2635f323..2bb33caa 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -290,19 +290,19 @@ def Output_Init(InputDict, Title, Name):
Art = text2art("Opem")
if Title not in os.listdir(os.getcwd()):
os.mkdir(Title)
- file = open(os.path.join(Title, Name + ".opem"), "w")
- file.write(Art)
- file.write("Simulation Date : " +
+ opem_file = open(os.path.join(Title, Name + ".opem"), "w")
+ opem_file.write(Art)
+ opem_file.write("Simulation Date : " +
str(datetime.datetime.now()) + spliter)
- file.write("**********" + spliter)
- file.write(Title + " Model" + spliter * 2)
- file.write("**********" + spliter)
- file.write("Simulation Inputs : " + spliter * 2)
+ opem_file.write("**********" + spliter)
+ opem_file.write(Title + " Model" + spliter * 2)
+ opem_file.write("**********" + spliter)
+ opem_file.write("Simulation Inputs : " + spliter * 2)
Input_Keys = sorted(InputDict.keys())
for key in Input_Keys:
- file.write(key + " : " + str(InputDict[key]) + spliter)
- file.write("**********" + spliter)
- return file
+ opem_file.write(key + " : " + str(InputDict[key]) + spliter)
+ opem_file.write("**********" + spliter)
+ return opem_file
def CSV_Init(OutputParamsKeys, OutputParams, Title, Name):
From de6b33d1064137ca0c4e5d97a0df437af4d7d1b9 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:20:46 +0330
Subject: [PATCH 037/204] fix : built_in file renamed to csv_file in CSV_Init
---
opem/Functions.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index 2bb33caa..7c473b56 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -316,14 +316,14 @@ def CSV_Init(OutputParamsKeys, OutputParams, Title, Name):
"""
if Title not in os.listdir(os.getcwd()):
os.mkdir(Title)
- file = open(os.path.join(Title, Name + ".csv"), "w")
- file.write("I (A),")
+ csv_file = open(os.path.join(Title, Name + ".csv"), "w")
+ csv_file.write("I (A),")
for index, item in enumerate(OutputParamsKeys):
- file.write(item + " (" + OutputParams[item] + ")")
+ csv_file.write(item + " (" + OutputParams[item] + ")")
if index < len(OutputParamsKeys) - 1:
- file.write(",")
- file.write("\n")
- return file
+ csv_file.write(",")
+ csv_file.write("\n")
+ return csv_file
def None_Omit(Input_Str):
From 2addecae9e72a3d0701c64e4b1bcbbb9121fb3b0 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:22:26 +0330
Subject: [PATCH 038/204] fix : built_in file renamed to HTMLFile in HTML_Desc
---
opem/Functions.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index 7c473b56..beb53beb 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -368,19 +368,19 @@ def HTML_Init(Title, Name):
return file
-def HTML_Desc(Title, Description, file):
+def HTML_Desc(Title, Description, HTMLFile):
'''
This function write model description in html file
:param Title: Simulation title (analysis model)
:type Title : str
:param Description: Model description
:type Description : str
- :param file: html file object
- :type file : file object
+ :param HTMLFile: html file object
+ :type HTMLFile : file object
:return: None
'''
- file.write('What is ' + Title + ' ?
\n')
- file.write(
+ HTMLFile.write('What is ' + Title + ' ?
\n')
+ HTMLFile.write(
'' +
Description +
"
\n")
From 844fd67c1e017fb1237380141986212dc8dd5730 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:24:02 +0330
Subject: [PATCH 039/204] fix : built_in file renamed to HTMLFile in HTML_Chart
---
opem/Functions.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index beb53beb..892d5cd6 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -386,7 +386,7 @@ def HTML_Desc(Title, Description, HTMLFile):
"
\n")
-def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, file):
+def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, HTMLFile):
'''
This function write chartjs chart in html file
:param x: x data as a string list
@@ -400,8 +400,8 @@ def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, file):
:param chart_name: chart name (or list of chart_name)
:param size: chart size in pixel
:type size : str
- :param file: html file object
- :type file : file object
+ :param HTMLFile: html file object
+ :type HTMLFile : file object
:return: None
'''
chart_data = ""
@@ -418,7 +418,7 @@ def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, file):
y_data = None_Omit(y)
chart_data = opem.Script.CHART_DATA.format(chart_name, y_data, color)
x_data = None_Omit(x)
- file.write(
+ HTMLFile.write(
opem.Script.LINE_CHART.format(
x_data,
y_label,
From 5420f8ca535a449167bdd53e2195f3fe6cce2b33 Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:24:53 +0330
Subject: [PATCH 040/204] fix : built_in file renamed to HTMLFile in
HTML_Input_Table
---
opem/Functions.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index 892d5cd6..30cfab8a 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -428,7 +428,7 @@ def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, HTMLFile):
chart_data))
-def HTML_Input_Table(Input_Dict, Input_Params, file):
+def HTML_Input_Table(Input_Dict, Input_Params, HTMLFile):
'''
This function add table to html file
:param Input_Dict: Input values dictionary
@@ -439,38 +439,38 @@ def HTML_Input_Table(Input_Dict, Input_Params, file):
:type file : file object
:return: None
'''
- file.write('Inputs
\n')
- file.write(
+ HTMLFile.write('Inputs
\n')
+ HTMLFile.write(
'\n')
- file.write(
+ HTMLFile.write(
'\n')
- file.write(
+ HTMLFile.write(
'\n' +
"Input\n | ")
- file.write(
+ HTMLFile.write(
'\n' +
"Description\n | ")
- file.write(
+ HTMLFile.write(
'\n' +
"Value\n | \n
\n")
Input_Params_Keys = sorted(Input_Params.keys())
for key in Input_Params_Keys:
- file.write(
+ HTMLFile.write(
'\n')
- file.write(
+ HTMLFile.write(
'\n' +
key +
"\n | \n")
- file.write(
+ HTMLFile.write(
'\n' +
Input_Params[key] +
"\n | \n")
- file.write(
+ HTMLFile.write(
'\n' +
str(
Input_Dict[key]) +
"\n | \n")
- file.write("
\n")
+ HTMLFile.write("\n")
def HTML_Overall_Params_Table(
From ebd0d2df51181cddb2936fb6a5827af9615c8abc Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:26:25 +0330
Subject: [PATCH 041/204] fix : built_in file renamed to HTMLFile in
HTML_Overall_Params_Table
---
opem/Functions.py | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index 30cfab8a..b2451425 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -435,8 +435,8 @@ def HTML_Input_Table(Input_Dict, Input_Params, HTMLFile):
:type Input_Dict : dict
:param Input_Params: Input params dictionary
:type Input_Params : dict
- :param file: html file object
- :type file : file object
+ :param HTMLFile: html file object
+ :type HTMLFile : file object
:return: None
'''
HTMLFile.write('Inputs
\n')
@@ -476,7 +476,7 @@ def HTML_Input_Table(Input_Dict, Input_Params, HTMLFile):
def HTML_Overall_Params_Table(
Input_Dict,
Input_Params,
- file,
+ HTMLFile,
header=False):
'''
This function add table to html file
@@ -484,45 +484,45 @@ def HTML_Overall_Params_Table(
:type Input_Dict : dict
:param Input_Params: Input params dictionary
:type Input_Params : dict
- :param file: html file object
- :type file : file object
+ :param HTMLFile: html file object
+ :type HTMLFile : file object
:return: None
'''
if header:
- file.write('Overall Parameters
\n')
- file.write(
+ HTMLFile.write('Overall Parameters
\n')
+ HTMLFile.write(
'\n')
- file.write(
+ HTMLFile.write(
'\n')
- file.write(
+ HTMLFile.write(
'\n' +
"Parameter\n | ")
- file.write(
+ HTMLFile.write(
'\n' +
"Description\n | ")
- file.write(
+ HTMLFile.write(
'\n' +
"Value\n | \n
\n")
Input_Params_Keys = sorted(Input_Params.keys())
for key in Input_Params_Keys:
- file.write(
+ HTMLFile.write(
'\n')
- file.write(
+ HTMLFile.write(
'\n' +
key +
"\n | \n")
- file.write(
+ HTMLFile.write(
'\n' +
Input_Params[key] +
"\n | \n")
- file.write(
+ HTMLFile.write(
'\n' +
str(
Input_Dict[key]) +
"\n | \n")
- file.write("
\n")
+ HTMLFile.write("\n")
if header:
- file.write('Graphs
\n')
+ HTMLFile.write('Graphs
\n')
def HTML_End(file):
From 010bc7dfef555ec7612083988750b934ba7bcf7f Mon Sep 17 00:00:00 2001
From: sepandhaghighi
Date: Fri, 28 Dec 2018 02:27:01 +0330
Subject: [PATCH 042/204] fix : built_in file renamed to HTMLFile in HTML_End
---
opem/Functions.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/opem/Functions.py b/opem/Functions.py
index b2451425..4fc05b8f 100644
--- a/opem/Functions.py
+++ b/opem/Functions.py
@@ -525,20 +525,20 @@ def HTML_Overall_Params_Table(
HTMLFile.write('Graphs
\n')
-def HTML_End(file):
+def HTML_End(HTMLFile):
'''
This function add end part of html file
- :param file: html file object
- :type file : file object
+ :param HTMLFile: html file object
+ :type HTMLFile : file object
:return: None
'''
- file.write(
+ HTMLFile.write(
'Generated By '
'OPEM Version ' + str(Version) + '
\n')
- file.write("