Web application for monitoring EM results
Project description
Web application for monitoring EM results
Launching the development server
conda create --name=emhub python=3.8
conda activate emhub
cd ~/work/development
git clone git@github.com:3dem/emhub.git
git clone git@github.com:3dem/emhub-testdata.git
cd emhub
pip install -e .
export FLASK_APP=emhub
export FLASK_ENV=development
export EMHUB_TESTDATA=~/work/development/emhub-testdata
export EMHUB_INSTANCE=~/work/development/emhub/instance
# Now launch the built-in Flask development server:
flask run
# or with gunicorn:
gunicorn -k gevent --workers=2 'emhub:create_app()' --bind 0.0.0.0:8080
To initialize the db:
python -m emhub.data
Running tests
python -m unittest emhub.tests
Publishing the package to PyPI
In order to make the emhub available to install with pip install emhub, we need to:
python install twine restructuredtext-lint
cd emhub
# It might be a good idea to check the README.rst before uploading:
rst-lint README.rst
python setup.py sdist
twine upload dist/emhub-0.0.1a3.tar.gz
Creating a Docker image
A Dockerfile has been include to create Docker images.
cd emhub
docker build . -t emhub
docker run --rm -p 8080:8080 --name=emhub -v $PWD/instance:/instance
Upgrading Database model with Alembic
If we modify the database models, then an update/migration is required.
# Do changes in the model (data_models.py)
alembic revision --autogenerate
# Review the generated script
alembic upgrade head # or use first the --sql option to see the commands
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
emhub-0.5.5.tar.gz
(6.3 MB
view details)
File details
Details for the file emhub-0.5.5.tar.gz
.
File metadata
- Download URL: emhub-0.5.5.tar.gz
- Upload date:
- Size: 6.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.5 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c84e8af23176a856a203ee7ed71eec88f967474c6959c51a1a0f24613f2e99b0 |
|
MD5 | ea4bcf8640466665d0400f461aff7988 |
|
BLAKE2b-256 | cc1ecc0dfa4c38064bcc4f4586c4c3106d764b5397f54522bda3756149c0abe6 |