Skip to content

Commit 6c1ae3f

Browse files
committed
Release of version 0.3
Release of version 0.3
2 parents 3516ffa + fe7e4fb commit 6c1ae3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+14743
-12342
lines changed

.github/workflows/tests.yml

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
2+
name: 'Tests'
3+
4+
on:
5+
push:
6+
7+
pull_request:
8+
types: [opened, synchronize] #labeled, assigned]
9+
10+
jobs:
11+
build-and-test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
python-version: [3.6, 3.8] # 2.7,
16+
17+
steps:
18+
# --- Install steps
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
with:
22+
submodules: recursive
23+
24+
# --- Versioning
25+
- name: Versioning
26+
id: versioning
27+
run: |
28+
git fetch --unshallow
29+
export VERSION_TAG=""
30+
export VERSION_NAME=`git describe | sed 's/\(.*\)-.*/\1/'`
31+
echo "GIT DESCRIBE: `git describe`"
32+
echo "GITHUB_REF: $GITHUB_REF"
33+
echo "VERSION_NAME $VERSION_NAME"
34+
if [[ $GITHUB_REF == *"tags"* ]]; then export VERSION_TAG=${GITHUB_REF/refs\/tags\//} ; fi
35+
echo "VERSION_TAG $VERSION_TAG"
36+
if [[ "$VERSION_TAG" == "" ]]; then export VERSION_TAG="vdev" ; fi
37+
if [[ "$VERSION_TAG" != "vdev" ]]; then export VERSION_NAME=$VERSION_TAG ; fi
38+
echo "VERSION_NAME: $VERSION_NAME"
39+
echo "VERSION_TAG : $VERSION_TAG"
40+
if [[ "$VERSION_TAG" == "vdev" ]]; then export VERSION_NAME=$VERSION_NAME"-dev" ; fi
41+
if [[ "$VERSION_TAG" != "vdev" ]]; then export FULL_VERSION_NAME="version $VERSION_NAME" ; fi
42+
if [[ "$VERSION_TAG" == "vdev" ]]; then export FULL_VERSION_NAME="latest dev. version $VERSION_NAME" ; fi
43+
echo "VERSION_NAME: $VERSION_NAME"
44+
echo "FULL_VERSION_NAME: $FULL_VERSION_NAME"
45+
echo "::set-output name=FULL_VERSION_NAME::$FULL_VERSION_NAME"
46+
echo "::set-output name=VERSION_NAME::$VERSION_NAME"
47+
echo "::set-output name=VERSION_TAG::$VERSION_TAG"
48+
49+
- name: Set up Python ${{ matrix.python-version }}
50+
uses: actions/setup-python@v2
51+
with:
52+
python-version: ${{ matrix.python-version }}
53+
54+
- name: Install python dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
pip install -r _tools/travis_requirements.txt
58+
pip install -r weio/requirements.txt
59+
60+
- name: System info
61+
run: |
62+
echo "Actor : $GITHUB_ACTOR"
63+
echo "Branch: $GITHUB_REF"
64+
pip list
65+
ls
66+
67+
# --- Run Tests
68+
- name: Tests
69+
run: |
70+
make test
71+
72+
73+
# --- Check if Deployment if needed
74+
- name: Check if deployment is needed
75+
id: check_deploy
76+
env:
77+
PY_VERSION: ${{matrix.python-version}}
78+
GH_EVENT : ${{github.event_name}}
79+
run: |
80+
echo "GH_EVENT : $GH_EVENT"
81+
echo "PY_VERSION : $PY_VERSION"
82+
export OK=0
83+
if [[ $PY_VERSION == "3.6" ]]; then export OK=1 ; fi
84+
if [[ "$OK" == "1" && $GH_EVENT == "push" ]]; then export OK=1 ; fi
85+
echo "DEPLOY : $OK"
86+
echo "::set-output name=GO::$OK"
87+
88+
# --- Run Deployments
89+
- name: Install system dependencies
90+
if: ${{ steps.check_deploy.outputs.GO == '1'}}
91+
run: sudo apt-get install nsis
92+
93+
94+
- name: Before deploy
95+
if: ${{ steps.check_deploy.outputs.GO == '1'}}
96+
id: before_deploy
97+
env:
98+
FULL_VERSION_NAME: ${{steps.versioning.outputs.FULL_VERSION_NAME}}
99+
VERSION_NAME: ${{steps.versioning.outputs.VERSION_NAME}}
100+
VERSION_TAG: ${{steps.versioning.outputs.VERSION_TAG}}
101+
run: |
102+
echo "FULL_VERSION_NAME: $FULL_VERSION_NAME"
103+
echo "VERSION_NAME : $VERSION_NAME"
104+
echo "VERSION_TAG : $VERSION_TAG"
105+
pip install pynsist
106+
pip install distlib
107+
git clone https://github.com/takluyver/pynsist
108+
mv pynsist/nsist nsist
109+
sh _tools/setVersion.sh $VERSION_NAME
110+
make installer
111+
mv build/nsis/pyDatView_setup.exe "pyDatView_"$VERSION_NAME"_setup.exe"
112+
mv _tools/pyDatView.cmd build/nsis/
113+
mv _tools/pyDatView_Test.bat build/nsis/
114+
mv _tools/pyDatView.exe build/nsis/
115+
mv build/nsis build/pyDatView_$VERSION_NAME
116+
cd build && zip -r "../pyDatView_"$VERSION_NAME"_portable.zip" pyDatView_$VERSION_NAME
117+
cd ..
118+
if [[ "$VERSION_TAG" == "vdev" ]]; then cp "pyDatView_"$VERSION_NAME"_setup.exe" "pyDatView_LatestVersion_setup.exe" ;fi
119+
if [[ "$VERSION_TAG" == "vdev" ]]; then cp "pyDatView_"$VERSION_NAME"_portable.zip" "pyDatView_LatestVersion_portable.zip" ;fi
120+
ls
121+
122+
- name: Deploy
123+
if: ${{ steps.check_deploy.outputs.GO == '1'}}
124+
env:
125+
FULL_VERSION_NAME: ${{steps.versioning.outputs.FULL_VERSION_NAME}}
126+
VERSION_NAME: ${{steps.versioning.outputs.VERSION_NAME}}
127+
VERSION_TAG: ${{steps.versioning.outputs.VERSION_TAG}}
128+
uses: svenstaro/upload-release-action@v2
129+
with:
130+
repo_token: ${{ secrets.GITHUB_TOKEN }}
131+
file: pyDatView_*.*
132+
release_name: ${{steps.versioning.outputs.FULL_VERSION_NAME}}
133+
tag: ${{steps.versioning.outputs.VERSION_TAG}}
134+
overwrite: true
135+
file_glob: true
136+
body: |
137+
Different development versions are found in the "Assets" below.
138+
139+
Select the one with the highest number to get the latest development version.
140+
141+
Use a file labelled "setup" for a windows installer. No admin right is required for this installation, but the application is not signed. You may use a file labelled "portable" for a self contained zip files.

.travis.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

Makefile

Lines changed: 87 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,87 @@
1-
# --- Detecting OS
2-
ifeq '$(findstring ;,$(PATH))' ';'
3-
detected_OS := Windows
4-
else
5-
detected_OS := $(shell uname 2>/dev/null || echo Unknown)
6-
detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS))
7-
detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS))
8-
detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS))
9-
endif
10-
11-
testfile= weio/weio/tests/example_files/FASTIn_arf_coords.txt
12-
all:
13-
ifeq ($(detected_OS),Darwin) # Mac OS X
14-
./pythonmac pyDatView.py $(testfile)
15-
else
16-
python pyDatView.py $(testfile)
17-
endif
18-
19-
20-
21-
22-
deb:
23-
python DEBUG.py
24-
25-
install:
26-
python setup.py install
27-
28-
dep:
29-
python -m pip install -r requirements.txt
30-
31-
pull:
32-
git pull --recurse-submodules
33-
update:pull
34-
35-
36-
help:
37-
@echo "Available rules:"
38-
@echo " all run the standalone program"
39-
@echo " install install the python package in the system"
40-
@echo " dep download the dependencies "
41-
@echo " pull download the latest version "
42-
@echo " test run the unit tests "
43-
44-
test:
45-
ifeq ($(detected_OS),Darwin) # Mac OS X
46-
./pythonmac -m unittest discover -v tests
47-
else
48-
python -m unittest discover -v tests
49-
endif
50-
51-
prof:
52-
python -m cProfile -o tests/prof_all.prof tests/prof_all.py
53-
python -m pyprof2calltree -i tests/prof_all.prof -o tests/callgrind.prof_all.prof
54-
snakeviz tests/prof_all.prof
55-
56-
57-
exe:
58-
python -m nuitka --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka pyDatView.py
59-
60-
exestd:
61-
python -m nuitka --python-flag=no_site --assume-yes-for-downloads --standalone --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka-std pyDatView.py
62-
63-
clean:
64-
rm -rf __pycache__
65-
rm -rf *.egg-info
66-
rm -rf *.spec
67-
rm -rf build*
68-
rm -rf dist
69-
70-
71-
pyexe:
72-
pyinstaller --onedir pyDatView.py
73-
74-
version:
75-
ifeq ($(OS),Windows_NT)
76-
@echo "Doing nothing"
77-
else
78-
@sh _tools/setVersion.sh
79-
endif
80-
81-
installer: version
82-
python -m nsist installer.cfg
83-
84-
85-
1+
# --- Detecting OS
2+
ifeq '$(findstring ;,$(PATH))' ';'
3+
detected_OS := Windows
4+
else
5+
detected_OS := $(shell uname 2>/dev/null || echo Unknown)
6+
detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS))
7+
detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS))
8+
detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS))
9+
endif
10+
11+
testfile= weio/weio/tests/example_files/FASTIn_arf_coords.txt
12+
all:
13+
ifeq ($(detected_OS),Darwin) # Mac OS X
14+
./pythonmac pyDatView.py $(testfile)
15+
else
16+
python pyDatView.py $(testfile)
17+
endif
18+
19+
20+
21+
22+
deb:
23+
python DEBUG.py
24+
25+
install:
26+
python setup.py install
27+
28+
dep:
29+
python -m pip install -r requirements.txt
30+
31+
pull:
32+
git pull --recurse-submodules
33+
update:pull
34+
35+
36+
help:
37+
@echo "Available rules:"
38+
@echo " all run the standalone program"
39+
@echo " install install the python package in the system"
40+
@echo " dep download the dependencies "
41+
@echo " pull download the latest version "
42+
@echo " test run the unit tests "
43+
44+
test:
45+
ifeq ($(detected_OS),Darwin) # Mac OS X
46+
./pythonmac -m unittest discover -v tests
47+
./pythonmac -m unittest discover -v pydatview/plugins/tests
48+
else
49+
python -m unittest discover -v tests
50+
python -m unittest discover -v pydatview/plugins/tests
51+
endif
52+
53+
prof:
54+
python -m cProfile -o tests/prof_all.prof tests/prof_all.py
55+
python -m pyprof2calltree -i tests/prof_all.prof -o tests/callgrind.prof_all.prof
56+
snakeviz tests/prof_all.prof
57+
58+
59+
exe:
60+
python -m nuitka --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka pyDatView.py
61+
62+
exestd:
63+
python -m nuitka --python-flag=no_site --assume-yes-for-downloads --standalone --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka-std pyDatView.py
64+
65+
clean:
66+
rm -rf __pycache__
67+
rm -rf *.egg-info
68+
rm -rf *.spec
69+
rm -rf build*
70+
rm -rf dist
71+
72+
73+
pyexe:
74+
pyinstaller --onedir pyDatView.py
75+
76+
version:
77+
ifeq ($(OS),Windows_NT)
78+
@echo "Doing nothing"
79+
else
80+
@sh _tools/setVersion.sh
81+
endif
82+
83+
installer:
84+
python -m nsist installer.cfg
85+
86+
87+

0 commit comments

Comments
 (0)