To install the local version, run:
pip install -e .You can then import windborne and have it refer to the latest version, or use the windborne cli for manual testing.
The windborne package is a Python library and CLI tool for accessing WindBorne's weather balloon data and forecast APIs.
__init__.py- Public API exports from observations_api and forecasts_apiapi_request.py- Authentication (JWT), request handling, and retry logiccli.py- Command-line interface implementation using argparseobservations_api.py- Balloon observation data access (observations, missions, flight paths)forecasts_api.py- Weather forecast data access (point/gridded forecasts, tropical cyclones)utils.py- Date parsing, file saving, and output formatting utilitiesobservation_formatting.py- Data format conversions (netCDF, little_r)track_formatting.py- Trajectory format conversions (CSV, GeoJSON, GPX, KML)
- Authenticates via either
WB_CLIENT_ID+WB_API_KEYor a single combinedWB_API_KEY - Supports multiple output formats for scientific data
- Provides both Python API and CLI access
- Handles large datasets with bucketing and pagination
- Includes retry logic and comprehensive error messages
- Make sure you've been added to the pypi organization
- Increment the version in pyproject.toml
- Run
bash deploy.shwhich will push the pip package
pytest tests are in the folder pytest/. To run, do pytest pytest/ -v. Currently just minimal testing is implemented for recent changes.
You may need to run pip3 install pytest to install.
These are end-to-end tests, designed primarily to test that the backend gives expected responses when accessed through the cli. This is a good way to make sure that new cli methods are interacting with the backends in the way that you expect. They were implemented in ruby thanks to its eloquent testing framework.
To run for the first time:
- Install ruby dependencies:
gem install rspec. It expects ruby 3 or greater. - Add a file
credentials.jsonto the spec folder. This is a git-ignored JSON file containing API keys; ask on zulip for a copy.
Then, run:
rspec spec