Skip to main content

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


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.6.2.tar.gz (6.3 MB view details)

Uploaded Source

File details

Details for the file emhub-0.6.2.tar.gz.

File metadata

  • Download URL: emhub-0.6.2.tar.gz
  • Upload date:
  • Size: 6.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for emhub-0.6.2.tar.gz
Algorithm Hash digest
SHA256 4547392561b9afd5bd3fddba8140030c928fda25aeb77cf49ec0d6a15d551703
MD5 53e1dc73963ff239c92c7b2202068eb9
BLAKE2b-256 9291d794e3f1bb6a14820f12b0473829c0dcaed3256e21e182c6aa9304659c95

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page