SEED Vault is a cross platform GUI utility which can search, view and download seismic data from FDSN servers
- Download & view EQ arrival data via a station-to-event OR an event-to-station search
- Quickly download and archive bulk continuous data, saving your progress along the way
- View and plot event arrivals
- A CLI scripting tool to automate common jobs
- Search, export, or import earthquake event catalogs and station metadata
- Download restricted/embargoed data by storing auth passwords in local config
- Add and use custom FDSN servers
- Saves all downloaded data as miniseed in a local SDS database to speed up future retrievals
- Local sqlite3 database editor
- Load and save search parameters and configuration
Runs on:
- Linux
- Windows
- MacOS
Can run:
- As web service
- From the command line (CLI)
- 8 GB RAM
- Python >= 3.10
- ObsPy (>=1.4.1), Streamlit (>=1.39), Plotly (>-5.24), Pandas (>=2.2.2), Matplotlib (>=3.8.5)
$ python3 pip install seed-vault
$ git clone https://github.com/AuScope/seed-vault.git
Then can build via pip:
$ python3 -m pip install ./seed-vault
Or,
#### Linux/MacOS
cd seed-vault
source setup.sh
source run.sh
Open a powershell and run following commands:
cd seed-vault
.\setup-win.ps1
.\run-win.ps1
NOTES:
- For Win OS, you would need to convert the shell scripts to PowerShell. Or simply follow the steps in the shell scripts to set up the app.
- Requires python3 venv software package e.g. For python v10 on Ubuntu you may need to:
sudo apt update sudo apt install python3.10-venv
seed-vault/
│
├── seed_vault/ # Python package containing application code
│ ├── docs/ # Documentation
│ ├── models/ # Python modules for data models
│ ├── scripts/ # Example CLI scripts
│ ├── service/ # Services for logic and backend processing
│ ├── tests/ # Test data and utilities
│ ├── ui/ # UI components (Streamlit files)
│ ├── utils/ # Utility functions and helpers
│
└── pyproject.toml # Project configuration file
If you look to further develop this app, it is highly recommended to set up the project with poetry
. Follow the steps below to set up using poetry
.
Refer to this link: https://python-poetry.org/docs/
Alternatively,
Linux
curl -sSL https://install.python-poetry.org | python3 -
then, add following to .bashrc:
export PATH="$HOME/.local/bin:$PATH"
Windows powershell:
(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -
then, add poetry to your system path. It should be located here:
%USERPROFILE%\.poetry\bin
Optional
To configure poetry to create .venv
inside project folder, run following:
poetry config virtualenvs.in-project true
This project uses python 3.10.*. If your base python is a different version (check via python --version
), you may get errors when trying to install via poetry. Use pyenv to manage this.
Linux
Install the required packages for building Python with the following command
sudo apt update
sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev
xz-utils tk-dev libffi-dev liblzma-dev git
Then, install pyenv
curl https://pyenv.run | bash
After installation, add following to .bashrc
:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
Run .bashrc to get things updated: source ~/.bashrc
Install python 3.12.* if you have a different version locally:
pyenv install 3.12.0
pyenv global 3.12.0
Confirm your python version: python --version
Install the packages using following.
poetry install
Start the project:
poetry shell
To run the app:
streamlit run seed_vault/ui/main.py
Alternatively, command line is configured for this project. You can also run the app, simply by:
seed-vault start
poetry build
Need to be added
To develop and run the application using Docker, follow these steps:
- Install Docker Application on your system
- Navigate to the project root directory:
cd seed-vault
- Build and run the Docker container:
docker compose up --build
The application should now be running and accessible at http://localhost:8501
.
poetry export -f requirements.txt --output requirements.txt --without-hashes
Define a package name in pyproject.toml (e.g. seed-vault
).
Then, run following commands
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi <YOUR PYPI TOKEN>
poetry publish -r testpypi
To install from pypi-test:
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple seed-vault
Note: include both test
and official
indexes.
The repository includes a number of unit tests. These tests only covers
the main functions in seed_vault.service.seismoloader
as these are the
core logics adopted in the app.
To run the test units:
- Running only mockup tests
poetry run pytest
- Running tests with actual FDSN API calls
poetry run pytest --run-real-fdsn
- Generate coverage report:
to include the whole module:
poetry run pytest --run-real-fdsn --cov=seed_vault --cov-report=html
to only include service/*
tests:
poetry run pytest --run-real-fdsn --cov=seed_vault --cov-config=.coveragerc --cov-report=html
- Generate coverage badge
poetry run coverage-badge -o coverage.svg