Skip to main content

Tools to work with vertical profile time series.

Project description

vptstools

Project generated with PyScaffold PyPI-Server .github/workflows/run_tests.yaml

vptstools is a Python library to transfer and convert vpts data. VPTS (vertical profile time series) express the density, speed and direction of biological signals such as birds, bats and insects within a weather radar volume, grouped into altitude layers (height) and measured over time (datetime).

Installation

Python 3.9+ is required.

pip install vptstools

If you need the tools/services to transfer data (SFTP, S3) install these additional dependencies:

pip install vptstools[transfer]

CLI endpoints

In addition to using functions in Python scripts, two vptstools functions can be called from the command line:

transfer_baltrad

CLI tool to move files from the Baltrad FTP server to an S3 bucket.

transfer_baltrad

Configuration is loaded from environmental variables:

  • FTP_HOST: Baltrad FTP host ip address
  • FTP_PORT: Baltrad FTP host port
  • FTP_USERNAME: Baltrad FTP user name
  • FTP_PWD: Baltrad FTP password
  • FTP_DATADIR: Baltrad FTP directory to load data files from
  • DESTINATION_BUCKET: AWS S3 bucket to write data to
  • SNS_TOPIC: AWS SNS topic to report when routine fails
  • AWS_PROFILE: AWS profile (mainly for local development)

vph5_to_vpts

CLI tool to aggregate/convert the ODIM hdf5 bird profile files available on the aloft S3 bucket (as generated by vol2bird) to daily and monthly aggregates following the VPTS CSV file specification.

The CLI checks the modified date of the uploaded ODIM hdf5 files and applies the aggregation/conversion for the files modified within the defined time window:

vph5_to_vpts --modified-days-ago=1

Development instructions

See contributing for a detailed overview and set of guidelines. If familiar with tox, the setup of a development environment boils down to:

tox -e dev   # Create development environment with venv and register an ipykernel. 
source venv/bin/activate  # Activate this environment to get started

Next, the following set of commands are available to support development:

tox              # Run the unit tests
tox -e docs      # Invoke sphinx-build to build the docs
tox -e format    # Run black code formatting

tox -e clean     # Remove old distribution files and temporary build artifacts (./build and ./dist)
tox -e build     # Build the package wheels and tar

tox -e linkcheck # Check for broken links in the documentation

tox -e publish   # Publish the package you have been developing to a package index server. By default, it uses testpypi. If you really want to publish your package to be publicly accessible in PyPI, use the `-- --repository pypi` option.
tox -av          # List all available tasks

To create a pinned requirements.txt set of dependencies, pip-tools is used:

pip-compile --extra transfer --resolver=backtracking`

Notes

  • This project has been set up using PyScaffold 4.3.1. For details and usage information on PyScaffold see https://pyscaffold.org/.
  • The odimh5 module was originally developed and released to pypi as a
  • separate odimh5 package by Nicolas Noé
  • (@niconoe). Version 0.1.0 has been included into this vptstools package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vptstools-0.1.0.tar.gz (417.5 kB view details)

Uploaded Source

Built Distribution

vptstools-0.1.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file vptstools-0.1.0.tar.gz.

File metadata

  • Download URL: vptstools-0.1.0.tar.gz
  • Upload date:
  • Size: 417.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for vptstools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f93c696322c1409819979306b1479e176c2be0852c7552c97520db968bacdc21
MD5 9f226e0ec4da4b7f355e4b6469e55b41
BLAKE2b-256 cc6f9b992d8cc708b66a37e2d1ca1e90f55df7795908581c642d52eb18a6c8c9

See more details on using hashes here.

File details

Details for the file vptstools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vptstools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for vptstools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d60674460dff4ad3339246ead383558b10afce0ab8bcc44fdadac2961c848baa
MD5 1d09d62ad8d0c39506057c17bb13ef09
BLAKE2b-256 fd390f6f369724c65862f54507a03a8013740177065b4fc38d0993bbc37dbafd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page