Skip to content

Commit 9717446

Browse files
committed
appimage builder
1 parent 7718627 commit 9717446

File tree

9 files changed

+85
-8
lines changed

9 files changed

+85
-8
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ For all operating systems with Python and pip installed:
1616
pip install -e git+https://github.com/dmnfarrell/tablexplore.git#egg=tablexplore
1717
```
1818

19+
### Linux
20+
21+
The pip method above should work fine for most distributions but if you prefer you can also try the AppImage (experimental). Download from the latest [release page](https://github.com/dmnfarrell/tablexplore/releases) and run as follows:
22+
23+
```
24+
chmod +x tablexplore-0.3.0-x86_64.AppImage
25+
./tablexplore-0.3.0-x86_64.AppImage
26+
```
27+
28+
### Windows
29+
1930
A Windows standalone binary can be downloaded [here](https://dmnfarrell.github.io/tablexplore/).
2031

2132
## Current features

appimage-builder.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#AppImage script
2+
#https://appimage-builder.readthedocs.io/en/latest/examples/pyqt.html
3+
version: 1
4+
script:
5+
# Remove any previous build
6+
- rm -rf AppDir | true
7+
# Make usr and icons dirs
8+
- mkdir -p AppDir/usr/src
9+
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps
10+
# Copy the python application code into the AppDir
11+
- cp main.py AppDir/usr/src -r
12+
- cp -r tablexplore AppDir/usr/src -r
13+
- cp img/logo.svg AppDir/usr/share/icons/hicolor/256x256/apps/tablexplore.svg
14+
# Install application dependencies
15+
- pip3 install --system --ignore-installed --prefix=/usr --root=AppDir -r ./requirements.txt
16+
17+
AppDir:
18+
path: ./AppDir
19+
20+
app_info:
21+
id: org.tablexplore.python-tablexplore
22+
name: tablexplore
23+
icon: tablexplore
24+
version: 0.3.0
25+
# Set the python executable as entry point
26+
exec: usr/bin/python3
27+
# Set the application main script path as argument. Use '$@' to forward CLI parameters
28+
exec_args: "$APPDIR/usr/src/main.py $@"
29+
30+
apt:
31+
arch: amd64
32+
sources:
33+
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse'
34+
key_url: 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920D1991BC93C'
35+
# - sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse'
36+
# key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
37+
38+
include:
39+
- python3
40+
- python3-pkg-resources
41+
42+
exclude: []
43+
44+
runtime:
45+
env:
46+
PATH: '${APPDIR}/usr/bin:${PATH}'
47+
# Set python home
48+
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHOME
49+
PYTHONHOME: '${APPDIR}/usr'
50+
# Path to the site-packages dir or other modules dirs
51+
# See https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
52+
PYTHONPATH: '${APPDIR}/usr/lib/python3.8/site-packages'
53+
54+
AppImage:
55+
update-information: 'gh-releases-zsync|AppImageCrafters|python-tablexplore|latest|tablexplore-*x86_64.AppImage.zsync'
56+
sign-key: None
57+
arch: x86_64

main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
"""
3+
"""
44
TablExplore app
55
Created November 2020
66
Copyright (C) Damien Farrell
@@ -38,9 +38,10 @@ def main():
3838
# help="Import an excel file", metavar="FILE")
3939
#parser.add_argument("-t", "--test", dest="test", action="store_true",
4040
# default=False, help="Run a basic test app")
41-
args = vars(parser.parse_args())
41+
args, unknown = parser.parse_known_args()
42+
args = vars(args)
4243
qapp = QApplication(sys.argv)
43-
aw = app.Application()
44+
aw = app.Application(**args)
4445
aw.show()
4546
qapp.exec_()
4647

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pyside2
2+
numpy
3+
pandas
4+
matplotlib
5+
xlrd

snap/gui/tablexplore.desktop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Desktop Entry]
2-
Name=tablexplore
2+
Name=Tablexplore
33
Exec=tablexplore
44
Type=Application
55
Icon=${SNAP}/meta/gui/icon.png

snapcraft.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tablexplore
1+
name: tablexplore
22
version: '0.3.0'
33
#version-script: git describe --abbrev=1 --tags
44
summary: data plotting and analysis package
@@ -22,6 +22,8 @@ apps:
2222
- opengl
2323
- network
2424
- network-bind
25+
- network-control
26+
- mount-observe
2527

2628
parts:
2729
tablexplore:

tablexplore/app.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def __init__(self, project_file=None, csv_file=None):
100100
if project_file != None:
101101
self.openProject(project_file)
102102
elif csv_file != None:
103+
self.newProject()
103104
self.importFile(csv_file)
104105
else:
105106
self.newProject()

tablexplore/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def applyTransformFunction(self, column):
667667
if result is None:
668668
return
669669
if newcol == '':
670-
name = col+suffix
670+
newcol = winfunc+'('+col+')'
671671
if inplace == True:
672672
df[col] = result
673673
else:

tablexplore/plotting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def createWidgets(self):
153153
self.addPlotWidget()
154154

155155
dock = QDockWidget('options',self)
156-
dock.setMaximumWidth(270)
157-
dock.setMinimumWidth(200)
156+
dock.setMaximumWidth(280)
157+
dock.setMinimumWidth(220)
158158
scrollarea = QScrollArea(dock)
159159
scrollarea.setWidgetResizable(True)
160160
dock.setWidget(scrollarea)

0 commit comments

Comments
 (0)