/eidaQC

Tools to test data availability on Eida network

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

This project is in still in development. It is usable but not all errors are handled properly

Run tests on the European Integrated Data Archive for seismological data to check the availability of waveform data and the processing of metadata requests.

This package provides two different tests to check the availability of waveform data and the processing of meta data requests on EIDA. The tests are intended to be run on a regular basis, e.g. via a cron job. The package also creates an automatic summary report of the results.

Documentation

https://eidaqc.readthedocs.io/

(in progress)

Installation

For more details, take a look at https://eidaqc.readthedocs.io/en/latest/eidaqc.html#installation

Install dependencies

You need pip to install eidaqc. Eidaqc was developed on Python 3.9.7 but should run on lower versions of Python 3 (tested Python 3.6, requires additional package importlib_resources). Python 2 is not supported.

The following packages are required to run eidaqc:

Optionally, if you want your results plotted on a nice map, you should install one of these mapping libraries:

Cartopy is recommended and preferred, but on an older system (Ubuntu 18.04) installation of its predecessor basemap might be easier. However, development of basemap has stopped and shifted to cartopy.

Install eidaqc

After installing the dependencies, eidaqc can be installed via pip from Github:

```
$ pip install git+https://github.com/jojomale/eidaQC.git
```

Usage

  1. as API
  2. as command line tool:
    eida <method> <args> <configfile>
    

Command line options

Method

  • avail: run availability test
  • inv: run inventory test
  • rep: create html and pdf report
  • templ: create templates of config file and html-style file

args:

  • avail: optionally ignore-missing. Forces creation of new inventory despite missing reference networks
  • inv: request level for inventory. Any of 'network', 'station' or 'channel'
  • rep: -
  • templ: -

configfile:

  • methods 'avail', 'inv', 'rep': mandatory, path to config file
  • method 'templ': optional; file name for default file. If not given file name will be "default_config.ini" in current dir.

Build documentation

Documentation is build using sphinx and the readthedocs-template. You need to install both:

$ conda install sphinx
$ pip install sphinx-rtd-theme

Then you can run:

$ mkdir doc
$ cd doc
$ sphinx-quickstart 

which asks for some user input. It creates a sceleton structure for the documentation and an initial configuration file conf.py.

Edit conf.py as follows:

import os
import sys
sys.path.insert(0, os.path.abspath('../src'))

[...]

extensions = ['sphinx.ext.autodoc', 
              'sphinx.ext.napoleon']

[...]

html_theme = 'sphinx_rtd_theme'

Then run:

$ sphinx-apidoc -e -M -f -o . ../src/eidaqc
$ sphinx-build -b html . html

The first lays out the package structure in modules.rst and eidaqc.rst. The second command builds a HTML-page in a subdirectory html.

Resources

Build and packaging

$ python -m build

Access data

Entry points

Project Layout

Import horror

Docs