Skip to content

Commit

Permalink
Use an ORM-backed database as the main storage mechanism
Browse files Browse the repository at this point in the history
* new deps: tortoise-orm, aiojobs, strict-rfc3339

* web3.py is not a strict dependency anymore

* Hashmarks and other objects are persisted in a
tortoise-orm backed sqlite database. Hashmarks can be
pulled from git repositories

* Use aiojobs wherever possible for long-running tasks
  • Loading branch information
cipres authored and cipres committed Apr 29, 2020
1 parent b0985af commit 3a523be
Show file tree
Hide file tree
Showing 73 changed files with 4,058 additions and 2,352 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
__pycache__/
*.swp
*.swo
*.orig
*.py[cod]
*$py.class
Expand Down
25 changes: 14 additions & 11 deletions AppImage/galacteek-appimage-build
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

COMMIT_SHORT=$(echo $TRAVIS_COMMIT|cut -c 1-8)

MINICONDA_DIST="Miniconda3-4.6.14-Linux-x86_64.sh"
MINICONDA_DIST="Miniconda3-py37_4.8.2-Linux-x86_64.sh"
GO_IPFS_VERSION=0.4.23
GOIPFS_TGZ="go-ipfs_v${GO_IPFS_VERSION}_linux-amd64.tar.gz"
GOIPFS_DISTURL="https://dist.ipfs.io/go-ipfs/v${GO_IPFS_VERSION}/${GOIPFS_TGZ}"
Expand All @@ -21,10 +21,10 @@ fi
if [ "$TRAVIS_BRANCH" != "master" ]; then
echo "Short commit ID: ${COMMIT_SHORT}"
APPIMAGE_DEST="Galacteek-${COMMIT_SHORT}-x86_64.AppImage"
APPIMAGE_WASMER_DEST="Galacteek-wasmer-${COMMIT_SHORT}-x86_64.AppImage"
APPIMAGE_FULL_DEST="Galacteek-wasmer-${COMMIT_SHORT}-x86_64.AppImage"
else
APPIMAGE_DEST="Galacteek-${G_VERSION}-x86_64.AppImage"
APPIMAGE_WASMER_DEST="Galacteek-wasmer-${G_VERSION}-x86_64.AppImage"
APPIMAGE_FULL_DEST="Galacteek-wasmer-${G_VERSION}-x86_64.AppImage"
fi

echo "Travis commit: ${TRAVIS_COMMIT}"
Expand All @@ -41,7 +41,7 @@ fi
tar -C /tmp -xzvf ${GOIPFS_TGZ}

APPDIR="galacteek.AppDir.${G_VERSION}"
PIP=$APPDIR/usr/bin/pip
APPIPIP=$APPDIR/usr/bin/pip
WHEEL=../dist/galacteek-$G_VERSION-py3-none-any.whl

if ! [ -e $WHEEL ]; then
Expand All @@ -59,25 +59,25 @@ else
mkdir -p $APPDIR/usr/share/icons/hicolor/512x512/apps
fi

if ! [ -e $PIP ]; then
if ! [ -e $APPIPIP ]; then
echo "Installing miniconda"
bash Miniconda3-4.6.14-Linux-x86_64.sh -b -p "$APPDIR"/usr -f
bash $MINICONDA_DIST -b -p "$APPDIR"/usr -f
else
echo "Miniconda found, continuing"
fi

export PATH="$APPDIR/usr/bin:$PATH"
export PATH="$PATH:$APPDIR/usr/bin"

# Enter the venv
. "$APPDIR"/usr/bin/activate

# Install necessary conda packages
conda install -y -c conda-forge libxkbcommon
conda install -y -c conda-forge libxkbcommon pip

# Install the wheel from local dists

echo "Installing wheel: $WHEEL"
$PIP install $WHEEL
$APPIPIP install $WHEEL

cp ../{LICENSE,LICENSE.go-ipfs,LICENSE.Qt.GPLv3} \
$APPDIR/usr/share/licenses/galacteek
Expand All @@ -86,10 +86,12 @@ cp ../galacteek.desktop $APPDIR
cp ../galacteek.appdata.xml $APPDIR/usr/share/metainfo
cp ../share/icons/galacteek.png $APPDIR
cp ../share/icons/galacteek.png $APPDIR/usr/share/icons/hicolor/512x512/apps
cp /tmp/go-ipfs/ipfs $APPDIR/usr/bin
find /usr/lib -iname 'libzbar.so*' -exec cp -av {} $APPDIR/usr/lib \;
find /usr/lib -iname 'libjpeg.so*' -exec cp -av {} $APPDIR/usr/lib \;

# Copy go-ipfs
cp /tmp/go-ipfs/ipfs $APPDIR/usr/bin

# Remove unnecessary stuff
pushd "$APPDIR"/usr

Expand Down Expand Up @@ -154,5 +156,6 @@ APPIMAGE_CID=$(/tmp/go-ipfs/ipfs add -q -n --cid-version 1 $APPIMAGE_DEST)
echo "==> CIDv1 $APPIMAGE_DEST: $APPIMAGE_CID"

cp $HOME/bin/wasmer $APPDIR/usr/bin

echo "AppDir successfully created, running appimagetool (wasmer image)"
ARCH=x86_64 ./appimagetool-x86_64.AppImage -n $APPDIR $APPIMAGE_WASMER_DEST
ARCH=x86_64 ./appimagetool-x86_64.AppImage -n $APPDIR $APPIMAGE_FULL_DEST
5 changes: 4 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ feedgen = ">=0.7.0"
feedparser = ">=5.2.0"
async-timeout = ">=3.0.1"
aiosqlite = ">=0.10.0"
web3 = "==5.1.0"
aiodns = ">=2.0.0"
pyld = ">=1.0.5"
aioipfs = ">=0.4.4"
cachetools = ">=3.1.1"
tortoise-orm = "==0.16.5"
pyyaml = ">=5.3.0"
strict-rfc3339 = ">=0.7"
aiojobs = ">=0.2.2"

[dev-packages]
pytest = "*"
Expand Down
1 change: 1 addition & 0 deletions galacteek.pro
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ FORMS += galacteek/ui/addkeydialog.ui \
galacteek/ui/ipfscidinputdialog.ui \
galacteek/ui/ipfsinfos.ui \
galacteek/ui/ipfsmultiplecidinputdialog.ui \
galacteek/ui/iptagsmanager.ui \
galacteek/ui/keys.ui\
galacteek/ui/mediaplaylist.ui \
galacteek/ui/profileeditdialog.ui \
Expand Down
2 changes: 1 addition & 1 deletion galacteek/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
# ..............................................................................
#

__version__ = '0.4.21'
__version__ = '0.4.22'

from galacteek.core.asynclib import * # noqa
from galacteek.core import glogger
Expand Down
Loading

0 comments on commit 3a523be

Please sign in to comment.