Skip to content

Commit

Permalink
Release of version 0.3
Browse files Browse the repository at this point in the history
Release of version 0.3
  • Loading branch information
ebranlard authored Jun 22, 2022
2 parents 3516ffa + fe7e4fb commit 5f9008d
Show file tree
Hide file tree
Showing 41 changed files with 14,729 additions and 12,341 deletions.
135 changes: 135 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@

name: 'Tests'

on:
push:

pull_request:
types: [opened, synchronize] #labeled, assigned]

jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.8] # 2.7,

steps:
# --- Install steps
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r _tools/travis_requirements.txt
pip install -r weio/requirements.txt
- name: System info
run: |
echo "Actor : $GITHUB_ACTOR"
echo "Branch: $GITHUB_REF"
pip list
ls
# --- Run Tests
- name: Tests
run: |
make test
# --- Check if Deployment if needed
- name: Check if deployment is needed
id: check_deploy
env:
PY_VERSION: ${{matrix.python-version}}
GH_EVENT : ${{github.event_name}}
run: |
echo "GH_EVENT : $GH_EVENT"
echo "PY_VERSION : $PY_VERSION"
export OK=0
if [[ $PY_VERSION == "3.6" ]]; then export OK=1 ; fi
if [[ "$OK" == "1" && $GH_EVENT == "push" ]]; then export OK=1 ; fi
echo "DEPLOY : $OK"
echo "::set-output name=GO::$OK"
# --- Run Deployments
- name: Install system dependencies
if: ${{ steps.check_deploy.outputs.GO == '1'}}
run: sudo apt-get install nsis

- name: Versioning
if: ${{ steps.check_deploy.outputs.GO == '1'}}
id: versioning
run: |
git fetch --unshallow
export VERSION_NAME=`git describe | sed 's/\(.*\)-.*/\1/'`
export FULL_VERSION_NAME="version $VERSION_NAME"
echo "GITHUB_REF: $GITHUB_REF"
echo "VERSION_NAME $VERSION_NAME"
echo "FULL_VERSION_NAME $FULL_VERSION_NAME"
if [[ $GITHUB_REF == *"tags" ]]; then export VERSION_TAG=${GITHUB_REF/refs\/tags\//} ; fi
if [[ $GITHUB_REF != *"tags" ]]; then export VERSION_TAG="" ; fi
echo "VERSION_TAG $VERSION_TAG"
if [[ "$VERSION_TAG" == "" ]]; then export VERSION_TAG="vdev" ; fi
if [[ "$VERSION_TAG" == "vdev" ]]; then export VERSION_NAME=$VERSION_NAME"-dev" ; fi
if [[ "$VERSION_TAG" == "vdev" ]]; then export FULL_VERSION_NAME="latest dev. version $VERSION_NAME" ; fi
echo "VERSION_NAME: $VERSION_NAME"
echo "FULL_VERSION_NAME: $FULL_VERSION_NAME"
echo "::set-output name=FULL_VERSION_NAME::$FULL_VERSION_NAME"
echo "::set-output name=VERSION_NAME::$VERSION_NAME"
echo "::set-output name=VERSION_TAG::$VERSION_TAG"
- name: Before deploy
if: ${{ steps.check_deploy.outputs.GO == '1'}}
id: before_deploy
env:
FULL_VERSION_NAME: ${{steps.versioning.outputs.FULL_VERSION_NAME}}
VERSION_NAME: ${{steps.versioning.outputs.VERSION_NAME}}
VERSION_TAG: ${{steps.versioning.outputs.VERSION_TAG}}
run: |
echo "FULL_VERSION_NAME: $FULL_VERSION_NAME"
echo "VERSION_NAME : $VERSION_NAME"
echo "VERSION_TAG : $VERSION_TAG"
pip install pynsist
pip install distlib
git clone https://github.com/takluyver/pynsist
mv pynsist/nsist nsist
make installer
mv build/nsis/pyDatView_setup.exe "pyDatView_"$VERSION_NAME"_setup.exe"
mv _tools/pyDatView.cmd build/nsis/
mv _tools/pyDatView_Test.bat build/nsis/
mv _tools/pyDatView.exe build/nsis/
mv build/nsis build/pyDatView_$VERSION_NAME
cd build && zip -r "../pyDatView_"$VERSION_NAME"_portable.zip" pyDatView_$VERSION_NAME
cd ..
cp "pyDatView_"$VERSION_NAME"_setup.exe" "pyDatView_LatestVersion_setup.exe"
cp "pyDatView_"$VERSION_NAME"_portable.zip" "pyDatView_LatestVersion_portable.zip"
ls
- name: Deploy
if: ${{ steps.check_deploy.outputs.GO == '1'}}
env:
FULL_VERSION_NAME: ${{steps.versioning.outputs.FULL_VERSION_NAME}}
VERSION_NAME: ${{steps.versioning.outputs.VERSION_NAME}}
VERSION_TAG: ${{steps.versioning.outputs.VERSION_TAG}}
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: pyDatView_*.*
release_name: ${{steps.versioning.outputs.FULL_VERSION_NAME}}
tag: vdev
overwrite: true
file_glob: true
body: |
Different development versions are found in the "Assets" below.
Select the one with the highest number to get the latest development version.
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.
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

172 changes: 87 additions & 85 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,85 +1,87 @@
# --- Detecting OS
ifeq '$(findstring ;,$(PATH))' ';'
detected_OS := Windows
else
detected_OS := $(shell uname 2>/dev/null || echo Unknown)
detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS))
detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS))
detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS))
endif

testfile= weio/weio/tests/example_files/FASTIn_arf_coords.txt
all:
ifeq ($(detected_OS),Darwin) # Mac OS X
./pythonmac pyDatView.py $(testfile)
else
python pyDatView.py $(testfile)
endif




deb:
python DEBUG.py

install:
python setup.py install

dep:
python -m pip install -r requirements.txt

pull:
git pull --recurse-submodules
update:pull


help:
@echo "Available rules:"
@echo " all run the standalone program"
@echo " install install the python package in the system"
@echo " dep download the dependencies "
@echo " pull download the latest version "
@echo " test run the unit tests "

test:
ifeq ($(detected_OS),Darwin) # Mac OS X
./pythonmac -m unittest discover -v tests
else
python -m unittest discover -v tests
endif

prof:
python -m cProfile -o tests/prof_all.prof tests/prof_all.py
python -m pyprof2calltree -i tests/prof_all.prof -o tests/callgrind.prof_all.prof
snakeviz tests/prof_all.prof


exe:
python -m nuitka --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka pyDatView.py

exestd:
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

clean:
rm -rf __pycache__
rm -rf *.egg-info
rm -rf *.spec
rm -rf build*
rm -rf dist


pyexe:
pyinstaller --onedir pyDatView.py

version:
ifeq ($(OS),Windows_NT)
@echo "Doing nothing"
else
@sh _tools/setVersion.sh
endif

installer: version
python -m nsist installer.cfg



# --- Detecting OS
ifeq '$(findstring ;,$(PATH))' ';'
detected_OS := Windows
else
detected_OS := $(shell uname 2>/dev/null || echo Unknown)
detected_OS := $(patsubst CYGWIN%,Cygwin,$(detected_OS))
detected_OS := $(patsubst MSYS%,MSYS,$(detected_OS))
detected_OS := $(patsubst MINGW%,MSYS,$(detected_OS))
endif

testfile= weio/weio/tests/example_files/FASTIn_arf_coords.txt
all:
ifeq ($(detected_OS),Darwin) # Mac OS X
./pythonmac pyDatView.py $(testfile)
else
python pyDatView.py $(testfile)
endif




deb:
python DEBUG.py

install:
python setup.py install

dep:
python -m pip install -r requirements.txt

pull:
git pull --recurse-submodules
update:pull


help:
@echo "Available rules:"
@echo " all run the standalone program"
@echo " install install the python package in the system"
@echo " dep download the dependencies "
@echo " pull download the latest version "
@echo " test run the unit tests "

test:
ifeq ($(detected_OS),Darwin) # Mac OS X
./pythonmac -m unittest discover -v tests
./pythonmac -m unittest discover -v pydatview/plugins/tests
else
python -m unittest discover -v tests
python -m unittest discover -v pydatview/plugins/tests
endif

prof:
python -m cProfile -o tests/prof_all.prof tests/prof_all.py
python -m pyprof2calltree -i tests/prof_all.prof -o tests/callgrind.prof_all.prof
snakeviz tests/prof_all.prof


exe:
python -m nuitka --follow-imports --include-plugin-directory --include-plugin-files --show-progress --show-modules --output-dir=build-nuitka pyDatView.py

exestd:
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

clean:
rm -rf __pycache__
rm -rf *.egg-info
rm -rf *.spec
rm -rf build*
rm -rf dist


pyexe:
pyinstaller --onedir pyDatView.py

version:
ifeq ($(OS),Windows_NT)
@echo "Doing nothing"
else
@sh _tools/setVersion.sh
endif

installer: version
python -m nsist installer.cfg



Loading

0 comments on commit 5f9008d

Please sign in to comment.