Skip to main content

dmtri

Run Tests Coverage

dmtri is a command-line tool designed to trigger metadata and data refresh simulations across EIDA nodes using Ansible automation.


  • seedpsd
  • wfcatalog
  • availability

It uses .dmtri_jobs.json per host to track async job state and integrates with uv and ansible for CLI automation.


Installation & Setup

1. Install or Run

You can run dmtri directly or install it as a tool:

Run without installing (via uvx)

uvx dmtri <command>

Install as a global tool

# Using uv (recommended)
uv tool install dmtri

# Using pip
pip install dmtri

2. Configure

Once installed, set up your local configuration directory:

dmtri init

This creates a config folder (e.g., ~/.config/dmtri/ on Linux) with a template hosts.ini and all standard playbooks.

Edit your Inventory

Use nano (or any text editor) to fill in your EIDA server details:

nano ~/.config/dmtri/hosts.ini

Verify Connectivity

Check if your servers are reachable:

dmtri doctor

Usage

Run Refresh Jobs

Trigger refresh playbooks across your nodes:

dmtri refresh --network HL --station ATH --starttime 2024-01-01

Track Job Status

Monitor the status of asynchronous jobs:

dmtri track

Fix Inconsistencies

Automatically repair the inconsistencies found in an eida-consistency report. A report lists streams where the availability view and dataselect disagree; dmtri fix reads that report and, for each affected stream, re-runs the WFCatalog collector and rebuilds the availability view for the exact time window.

Point it at a report file or URL:

dmtri fix https://eida-oculus.orfeus-eu.org/consistency/NOA/2026/NOA_2026-06-07_140510.json

Fix only specific entries from the report (by their index):

dmtri fix report.json --index 2 --index 16

After a fix, the availability service keeps cached answers for ~20 minutes, so a stream may still look unfixed for a short while. Re-check once the cache expires — this only verifies, it changes nothing:

dmtri fix --verify-only report.json

Prerequisite: the eida-consistency CLI

dmtri fix reads the report through eida-consistency (version 0.5.1 or newer, for its explore --json output). If it isn't already on the machine, install it any one of these ways:

uv tool install eida-consistency     # recommended — puts it on your PATH
pipx install eida-consistency
pip install eida-consistency

You don't strictly have to install it: if uv is present, dmtri fix will run it on demand via uvx eida-consistency. And if it's installed somewhere off your PATH, point dmtri at it:

export DMTRI_EIDA_CONSISTENCY='/full/path/to/eida-consistency'

If it's missing (or too old), dmtri fix stops before touching anything and prints the exact install/upgrade command to run.


Customization

Local Playbooks

dmtri init copies all playbooks to your config directory. You can edit them to change automation logic:

# Location: ~/.config/dmtri/playbooks/
nano ~/.config/dmtri/playbooks/refresh/availability_refresh.yml

dmtri prioritizes these local playbooks over the bundled defaults.

Inventory Overrides

Override the inventory at runtime:

dmtri doctor --inventory ./my_custom_hosts.ini

Operation Details

dmtri supports two main operations for both metadata and data: refresh and clean. These affect the following components:

🔄 Refresh

  • Metadata

    • seedpsd: Scans for new metadata.
    • availability: Refreshes the view in MongoDB.
  • Data

    • Identifies data files in the archive for the specified epoch (by NSLC and time range).
      • seedpsd: Recalculates seedPSD for new files.
      • wfcatalog: Runs the collector on new data files.

🧹 Clean

  • Metadata

    • seedpsd: Removes the metadata entries.
    • availability: Refreshes the view in MongoDB.
  • Data

    • Identifies data files in the archive for the specified epoch.
      • seedpsd: Removes associated seedPSD data (via CLI).
      • wfcatalog: Removes files using the --delete option in the collector.

License

Copyright © 2026 EIDA (European Integrated Data Archive).

dmtri is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Metadata

Release files for dmtri 0.1.5

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

Source distribution (sdist)

Source distribution for dmtri 0.1.5
File Size Uploaded
dmtri-0.1.5.tar.gz 88.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dmtri 0.1.5
File Interpreter ABI Platform
dmtri-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 180.1 kB

Release files / dmtri-0.1.5.tar.gz

Download URL dmtri-0.1.5.tar.gz
Size 88.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f25e23afca1680817fd53f81f85cc28fd419e277486ae18bb8b68eec186e9ff9
BLAKE2b-256 checksum
How to use checksums
76ad42ccaaec9eae5574b3c2a382a621bd63fb68f677466a4ab9a448ae0c8554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 4, 2026.

Transparency log

Release files / dmtri-0.1.5-py3-none-any.whl

Download URL dmtri-0.1.5-py3-none-any.whl
Size 91.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3da786bd55f204ad156d33712e76ec3fe14288af64ef419e96d16c2f14c9528
BLAKE2b-256 checksum
How to use checksums
fed0eb47c998e9c4665f3554ef7038482453ac0c2bb4a2844f1df4163c8b5fb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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