Skip to main content

pypi run-tests Codacy Badge Coverage Status

GW Superevent (or GRB, Neutrino) EM follow-up

This reusable TOM Toolkit app provides support for gravitational wave (GW) superevent and other non-localized event electromagnetic (EM) follow up observations.

Installation

  1. Install the package into your TOM environment:

    pip install tom-nonlocalizedevents
    
  2. In your project settings.py, add tom_nonlocalizedevents to your INSTALLED_APPS setting:

    INSTALLED_APPS = [
        ...
        'tom_nonlocalizedevents',
    ]
    

    Also include the following Django-Webpack-Loader settings in your settings.py:

    VUE_FRONTEND_DIR_TOM_NONLOCAL = os.path.join(STATIC_ROOT, 'tom_nonlocalizedevents/vue')
    WEBPACK_LOADER = {
        'TOM_NONLOCALIZEDEVENTS': {
            'CACHE': not DEBUG,
            'BUNDLE_DIR_NAME': 'tom_nonlocalizedevents/vue/',  # must end with slash
            'STATS_FILE': os.path.join(VUE_FRONTEND_DIR_TOM_NONLOCAL, 'webpack-stats.json'),
            'POLL_INTERVAL': 0.1,
            'TIMEOUT': None,
            'IGNORE': [r'.+\.hot-update.js', r'.+\.map']
        }
    }
    

    If WEBPACK_LOADER is already defined in your settings, then integrate these values in to it.

  3. Include the tom_nonlocalizedevent URLconf in your project urls.py:

    urlpatterns = [
         ...
         path('nonlocalizedevents/', include('tom_nonlocalizedevents.urls')),
    ]
    
  4. Copy tom_nonlocalizedevents/templates/tom_common/base.html into your project root's templates/tom_common/base.html.

  5. Run python manage.py migrate to create the tom_nonlocalizedevents models.

Development

When any changes are made to this library, the vue files will need to be build and bundled and committed into the repo so that they can be bundled and deployed with the django package. This means that after making any vue changes, you must run npm run build within the tom_nonlocalizedevents_vue directory once, which will install the built files into tom_nonlocalizedevents/static/, and then those built files will need to be committed into the repo. This allows django projects using this library to get those files when running python manage.py collectstatic.

Running the tests

In order to run the tests, run the following in your virtualenv:

python manage.py test

Release files for tom-nonlocalizedevents 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tom-nonlocalizedevents 0.5.2
File Size Uploaded
tom_nonlocalizedevents-0.5.2.tar.gz 521.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tom-nonlocalizedevents 0.5.2
File Interpreter ABI Platform
tom_nonlocalizedevents-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.1 MB

Release files / tom_nonlocalizedevents-0.5.2.tar.gz

Download URL tom_nonlocalizedevents-0.5.2.tar.gz
Size 521.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b943d8ef7c1de3697d4f77b87c931e9f15cd0551c2128d13c4864da3b1a43526
BLAKE2b-256 checksum
How to use checksums
baf5936efa22732014d119bfda867e0e0c8291af05fd954ccdfc672c85e765f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.7 Linux/5.15.0-1020-azure

Release files / tom_nonlocalizedevents-0.5.2-py3-none-any.whl

Download URL tom_nonlocalizedevents-0.5.2-py3-none-any.whl
Size 531.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c20fbd99f6144ea525659b649f886f5a08f7991d8f58689cc7fea31882760965
BLAKE2b-256 checksum
How to use checksums
06fac94c4f8e261b8e9483cd0f83b57d4839e653a0d5d8b6aacf6c54ef7de9cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.7 Linux/5.15.0-1020-azure
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page