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.
https://eidaqc.readthedocs.io/
(in progress)
For more details, take a look at https://eidaqc.readthedocs.io/en/latest/eidaqc.html#installation
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:
- Obspy: https://github.com/obspy/obspy/wiki#installation
- Numpy
- Matplotlib
Optionally, if you want your results plotted on a nice map, you should install one of these mapping libraries:
- Cartopy: https://scitools.org.uk/cartopy/docs/latest/installing.html
- Basemap Matplotlib Toolkit: https://matplotlib.org/basemap/
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.
After installing the dependencies, eidaqc can be installed via pip from Github:
```
$ pip install git+https://github.com/jojomale/eidaQC.git
```
- as API
- as command line tool:
eida <method> <args> <configfile>
avail
: run availability testinv
: run inventory testrep
: create html and pdf reporttempl
: create templates of config file and html-style file
avail
: optionallyignore-missing
. Forces creation of new inventory despite missing reference networksinv
: request level for inventory. Any of 'network', 'station' or 'channel'rep
: -templ
: -
- 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.
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
.
$ python -m build
- https://packaging.python.org/tutorials/packaging-projects/
- https://packaging.python.org/guides/distributing-packages-using-setuptools/
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
- https://packaging.python.org/discussions/install-requires-vs-requirements/#install-requires-vs-requirements-files
- https://github.com/pypa/sampleproject
- https://stackoverflow.com/questions/779495/access-data-in-package-subdirectoryhttps://stackoverflow.com/questions/779495/access-data-in-package-subdirectory
- https://stackoverflow.com/questions/6028000/https://stackoverflow.com/questions/6028000/how-to-read-a-static-file-from-inside-a-python-package
- https://docs.python.org/3/library/importlib.html#module-importlib.resources
- https://importlib-resources.readthedocs.io/en/latest/using.html