Skip to content

Commit

Permalink
Merge pull request #62 from ECSIM/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
sepandhaghighi authored Mar 16, 2020
2 parents 6df44fc + 7ee9438 commit ae05a4f
Show file tree
Hide file tree
Showing 22 changed files with 87 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

#### Python Version

#### OPEM Version
#### OPEM Version (Use : `opem.__version__`)

#### GOPEM Version
#### GOPEM Version (Use : `gopem.__version__`)
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ language: python

matrix:
include:
- os: linux
sudo: required
python: 3.8
dist: xenial
services:
- xvfb

- os: linux
sudo: required
python: 3.7
Expand Down Expand Up @@ -50,7 +57,7 @@ matrix:
dist: xenial
services:
- xvfb

addons:
apt:
packages: &BASE_PACKAGES
Expand Down
2 changes: 1 addition & 1 deletion .travis/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
PYTHON_COMMAND=python3
PIP_COMMAND=pip3
fi

$PIP_COMMAND install -U pip
$PIP_COMMAND install -r requirements.txt
$PYTHON_COMMAND setup.py install
$PYTHON_COMMAND -m gopem --test
Expand Down
2 changes: 1 addition & 1 deletion .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$PYTHON_COMMAND -m gopem --test
if [ "$IS_IN_TRAVIS" = 'false' ] || [ "$TRAVIS_PYTHON_VERSION" = '3.6' ]
then
$PYTHON_COMMAND -m vulture gopem/ rsrc/ setup.py --min-confidence 65 --exclude=build,.eggs --sort-by-size
$PYTHON_COMMAND -m vulture --min-confidence 65 --sort-by-size gopem rsrc setup.py
$PYTHON_COMMAND -m bandit -r gopem -s B322
$PYTHON_COMMAND rsrc/version_check.py
$PYTHON_COMMAND -m pydocstyle
Expand Down
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [0.6] - 2020-03-16
### Added
- `__version__` variable
### Changed
- Test system modified
- `dev-requirements.txt` modified
- `requirements.txt` modified
- Logo updated
- Icon updated
- `ISSUE_TEMPLATE.md` updated
- `setup.py` modified
- `README.md` modified
- `build_exe.bat` modified
- `build_unix.sh` modified
## [0.5] - 2019-10-28
### Added
- `version_check.py`
Expand All @@ -28,13 +42,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Docstrings modified
- Report default location bug fixed
- Icon bug fixed
## [0.1] - 2018-9-10
## [0.1] - 2018-09-10
### Added
- GUI and plotter
- Use same test data as `OPEM` lib
- Documents and README


[Unreleased]: https://github.com/ECSIM/gopem/compare/v0.5...develop
[Unreleased]: https://github.com/ECSIM/gopem/compare/v0.6...develop
[0.6]: https://github.com/ECSIM/gopem/compare/v0.5...v0.6
[0.5]: https://github.com/ECSIM/gopem/compare/v0.1...v0.5
[0.1]: https://github.com/ECSIM/gopem/compare/0f35fc9...v0.1
2 changes: 1 addition & 1 deletion GOPEM.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "GOPEM"
#define MyAppVersion "0.5"
#define MyAppVersion "0.6"
#define MyAppPublisher "ECSIM"
#define MyAppURL "https://www.ecsim.ir/"
#define MyAppExeName "GOPEM.exe"
Expand Down
2 changes: 1 addition & 1 deletion GOPEM.spec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ a = Analysis(['gopem/__main__.py'],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=["nbconvert","nbformat","notebook","psutil"],
excludes=["nbconvert","nbformat","notebook","psutil","FixTk", "tcl", "tk", "_tkinter", "tkinter", "Tkinter"],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
Expand Down
30 changes: 9 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="https://github.com/ECSIM/opem/raw/master/otherfile/logo.png" width=250px height=250px>
<img src="https://github.com/ECSIM/gopem/raw/master/rsrc/logo.png" width=300px height=250px>
</br>
<a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3" /></a>
<a href="https://badge.fury.io/py/gopem"><img src="https://badge.fury.io/py/gopem.svg" alt="PyPI version" height="18"></a>
Expand Down Expand Up @@ -59,7 +59,7 @@ GOPEM is a graphical user interface of [OPEM (Open Source PEM Fuel Cell Simulati
- Download and install [Python3.x](https://www.python.org/downloads/) (>=3.6)
- [x] Select `Add to PATH` option
- [x] Select `Install pip` option
- Download [Version 0.5](https://github.com/ecsim/gopem/archive/v0.5.zip) or [Latest Source ](https://github.com/ecsim/gopem/archive/develop.zip)
- Download [Version 0.6](https://github.com/ecsim/gopem/archive/v0.6.zip) or [Latest Source ](https://github.com/ecsim/gopem/archive/develop.zip)
- Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access)
- Run `python3 setup.py install` or `python setup.py install` (Need root access)

Expand All @@ -83,13 +83,13 @@ GOPEM is a graphical user interface of [OPEM (Open Source PEM Fuel Cell Simulati


### Exe Version (Only Windows)
- Download [Installer-Version 0.5](https://github.com/ECSIM/gopem/releases/download/v0.5/GOPEM-0.5.exe) or [Portable-Version 0.5](https://github.com/ECSIM/gopem/releases/download/v0.5/GOPEM-Portable-0.5.exe)
- Download [Installer-Version 0.6](https://github.com/ECSIM/gopem/releases/download/v0.6/GOPEM-0.6.exe) or [Portable-Version 0.6](https://github.com/ECSIM/gopem/releases/download/v0.6/GOPEM-Portable-0.6.exe)
- Run and install

⚠️ The portable build is slower to start

### DMG Version (MacOS)
- Download [DMG-Version 0.5](https://github.com/ECSIM/gopem/releases/download/v0.5/GOPEM-0.5.dmg)
- Download [DMG-Version 0.6](https://github.com/ECSIM/gopem/releases/download/v0.6/GOPEM-0.6.dmg)
- Open DMG file
- Copy `GOPEM` into your system
- Run `GOPEM`
Expand All @@ -114,13 +114,13 @@ GOPEM will likely run on a modern dual core PC. Typical configuration is:

<div align="center">

<img src="https://github.com/ECSIM/gopem/blob/master/rsrc/GOPEM.gif">
<img src="https://github.com/ECSIM/gopem/raw/master/rsrc/GOPEM.gif">
<p>GIF</p>

<img src="https://github.com/ECSIM/gopem/blob/master/rsrc/SS1.png">
<img src="https://github.com/ECSIM/gopem/raw/master/rsrc/SS1.png">
<p>Screenshot 1</p>

<img src="https://github.com/ECSIM/gopem/blob/master/rsrc/SS2.png">
<img src="https://github.com/ECSIM/gopem/raw/master/rsrc/SS2.png">
<p>Screenshot 2</p>

</div>
Expand Down Expand Up @@ -206,18 +206,6 @@ Download [OPEM.bib](http://www.ecsim.ir/opem/OPEM.bib)(BibTeX Format)

## Donate to our project
<h3>Bitcoin :</h3>
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .

```12Xm1qL4MXYWiY9sRMoa3VpfTfw6su3vNq```



<h3>Payping (For Iranian citizens) :</h3>

<a href="http://www.payping.net/sepandhaghighi" target="__blank"><img src="http://www.qpage.ir/images/payping.png" height=100px width=100px></a>


<h3>Say Thanks! </h3>


<a href="https://saythanks.io/to/ecsim"><img src="https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg"></a>
<a href="https://www.ecsim.ir/opem/donate.html" target="_blank"><img src="http://www.ecsim.ir/images/Donate-Button.png" height="90px" width="270px" alt="OPEM Donation"></a>
8 changes: 8 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ environment:
PYTHON_VERSION: "3.7.0"
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.0"
PYTHON_ARCH: "64"

- PYTHON: "C:\\Python38"
PYTHON_VERSION: "3.8.0"
PYTHON_ARCH: "32"

init:
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"

Expand Down
7 changes: 7 additions & 0 deletions build_exe.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,12 @@ echo Your Python Version : %py_version%
echo Recommended Python Version : ^>= 3.5
echo -----
echo -----
python -m pip install "art==4.0"
python -m pip install "requests==2.22.0"
python -m pip install "matplotlib==3.1.1"
python -m pip install "opem==1.2"
python -m pip install "PyQt5==5.13.1"
python -m pip install "setuptools==40.9.0"
python -m pip install "PyInstaller==3.4"
python -m PyInstaller GOPEM.spec
pause
12 changes: 7 additions & 5 deletions build_unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ echo "Your Python Version : $py_version"
echo "Recommended Python Version : >= 3.5"
echo "-----"
echo "-----"
pip3 install -r requirements.txt
python3 setup.py install
pip3 install PyInstaller>=3.3
pip3 install "art==4.0"
pip3 install "requests==2.22.0"
pip3 install "matplotlib==3.1.1"
pip3 install "opem==1.2"
pip3 install "PyQt5==5.13.1"
pip3 install "setuptools==40.9.0"
pip3 install "PyInstaller==3.4"
if [[ "$OSTYPE" == "linux-gnu" ]]; then
pyinstaller -y --clean --windowed GOPEM.spec
elif [[ "$OSTYPE" == "darwin"* ]]; then
Expand All @@ -21,8 +25,6 @@ elif [[ "$OSTYPE" == "cygwin" ]]; then
echo "You are usign $OSTYPE, that means you are using windows OS, so please run build_exe.bat instead."
elif [[ "$OSTYPE" == "msys" ]]; then
echo "You are usign $OSTYPE, that means you are using windows OS, so please run build_exe.bat instead."
elif [[ "$OSTYPE" == "msys" ]]; then
echo "You are usign $OSTYPE, that means you are using windows OS, so please run build_exe.bat instead."
else
echo "$OSTYPE is not compatiable. please add an issue for gopem."
fi
11 changes: 6 additions & 5 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
art==4.1
requests==2.22.0
matplotlib==3.1.1
opem==1.1
PyQt5==5.13.1
art==4.5
requests==2.23.0
matplotlib==3.2.0
opem==1.2
PyQt5==5.14.1
PyQt5-sip==12.7.1
setuptools>=40.8.3
bandit>=1.5.1
vulture>=1.0
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
software-properties-common \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
python3.6 \
python3.6-dev \
python3-pip \
sudo \
Expand Down
2 changes: 2 additions & 0 deletions gopem/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
import gopem.helper
import gopem.mainwindow
import gopem.plotter

__version__ = str(gopem.helper.Version)
2 changes: 1 addition & 1 deletion gopem/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from opem.Params import Padulles_Hauer_InputParams as PH
from opem.Params import Version as OPEM_Version

Version = 0.5
Version = 0.6

ScriptDir = os.path.dirname(os.path.realpath(__file__))
ParentDir = os.path.abspath(os.path.join(ScriptDir, os.pardir))
Expand Down
3 changes: 1 addition & 2 deletions gopem/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,10 @@ def file_quit(self):
"""
self.close()

def close_event(self, ce):
def close_event(self):
"""
Slot for close event trigger.
:param ce: close event
:return: None
"""
self.file_quit()
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ art>0.7
requests>=2.20.0
matplotlib>=2.2.2
PyQt5>=5.10
PyQt5-sip>=4.19.12
opem>=0.9
10 changes: 5 additions & 5 deletions rsrc/Version.rc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(0, 5, 0, 0),
prodvers=(0, 5, 0, 0),
filevers=(0, 6, 0, 0),
prodvers=(0, 6, 0, 0),
mask=0x3f,
flags=0x0,
OS=0x40004,
Expand All @@ -16,12 +16,12 @@ VSVersionInfo(
u'040904B0',
[StringStruct(u'CompanyName', u'ECSIM'),
StringStruct(u'FileDescription', u'GOPEM.exe'),
StringStruct(u'FileVersion', u'0.5.0.0'),
StringStruct(u'FileVersion', u'0.6.0.0'),
StringStruct(u'InternalName', u'GOPEM.exe'),
StringStruct(u'LegalCopyright', u'Copyright (c) 2019 ECSIM'),
StringStruct(u'LegalCopyright', u'Copyright (c) 2020 ECSIM'),
StringStruct(u'OriginalFilename', u'GOPEM.exe'),
StringStruct(u'ProductName', u'GOPEM'),
StringStruct(u'ProductVersion', u'0, 5, 0, 0')])
StringStruct(u'ProductVersion', u'0, 6, 0, 0')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
Expand Down
Binary file modified rsrc/icon.ico
Binary file not shown.
Binary file added rsrc/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions rsrc/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
import codecs
Failed = 0
VERSION = "0.5"
VERSION = "0.6"

VERSION_1 = VERSION.split(".")[0]
VERSION_2 = str(int(float(VERSION) * 10 - int(VERSION_1) * 10))
Expand Down Expand Up @@ -32,15 +32,15 @@
"(u'FileVersion', u'{0}.{1}.{2}.{3}'),",
"(u'ProductVersion', u'{0}, {1}, {2}, {3}')"]
TEST_ITEMS = ["New Version ({0}) Is Available!"]
INNO_TIMES = ['#define MyAppVersion "{0}"']
INNO_ITEMS = ['#define MyAppVersion "{0}"']
FILES = {
"setup.py": SETUP_ITEMS,
"README.md": INSTALL_ITEMS,
"CHANGELOG.md": CHANGELOG_ITEMS,
os.path.join(
"gopem",
"helper.py"): PARAMS_ITEMS,
"GOPEM.iss": INNO_TIMES}
"GOPEM.iss": INNO_ITEMS}

TEST_NUMBER = len(FILES.keys()) + 1

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,28 @@ def read_description():
setup(
name='gopem',
packages=['gopem'],
version='0.5',
version='0.6',
description='GOPEM is a graphical user interface of OPEM',
long_description=read_description(),
long_description_content_type='text/markdown',
author='Mohammad Mahdi Rahimi,Sepand Haghighi,Kasra Askari,Sarmin Hamidi',
author_email='[email protected]',
url='https://github.com/ecsim/gopem',
download_url='https://github.com/ecsim/gopem/tarball/v0.5',
download_url='https://github.com/ecsim/gopem/tarball/v0.6',
keywords="OPEM PEM FC CELL Fuel-Cell Chemistry GUI PyQt GOPEM",
project_urls={
'Webpage': 'http://opem.ecsim.ir',
'Say Thanks!': 'https://saythanks.io/to/ecsim',
'Source': 'https://github.com/ecsim/gopem',
},
platforms=["any"],
install_requires=get_requirements(),
python_requires='>=3.6',
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'Intended Audience :: End Users/Desktop',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.6',
'Topic :: Scientific/Engineering :: Chemistry',
Expand Down

0 comments on commit ae05a4f

Please sign in to comment.