Skip to content

Commit

Permalink
updated happywhale CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
samapriya committed Nov 7, 2023
1 parent db43b8d commit bee20e3
Show file tree
Hide file tree
Showing 9 changed files with 351 additions and 134 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/package_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI happywhale

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
python-version: ["3.10"]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies (Windows)
continue-on-error: true
run: python -m pip install --upgrade pip
pip install -U pip setuptools
pip install wheel
if: matrix.os == 'windows-latest'
- name: Install Dependencies (Mac)
continue-on-error: true
run: brew install gdal
if: matrix.os == 'macos-latest'
- name: Install Dependencies (Ubuntu)
continue-on-error: true
run: sudo add-apt-repository ppa:ubuntugis/ppa -y
sudo apt-get update
sudo apt-get install python3-gdal -y
if: matrix.os == 'ubuntu-latest'
- name: Test package
run: |
pip install -r requirements.txt
python setup.py install
happywhale -h
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
# happywhale
Simple CLI to interact with Happy Whale API
# Simple CLI for Happywhale

[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=plastic&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/samapriya/)
[![Medium](https://img.shields.io/badge/Medium-12100E?style=flat&logo=medium&logoColor=white)](https://medium.com/@samapriyaroy)
[![Twitter URL](https://img.shields.io/twitter/follow/samapriyaroy?style=social)](https://twitter.com/intent/follow?screen_name=samapriyaroy)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109627075086849826?domain=https%3A%2F%2Fmapstodon.space%2F)](https://mapstodon.space/@samapriya)
[![Donate](https://img.shields.io/badge/Donate-Buy%20me%20a%20Coffee-teal)](https://www.buymeacoffee.com/samapriya)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/samapriya)
[![Donate](https://img.shields.io/badge/Donate-Buy%20me%20a%20Chai-teal)](https://www.buymeacoffee.com/samapriya)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/samapriya)

[Happywhale is a global citizen science project](https://happywhale.com) dedicated to whale and dolphin research and conservation. The user-friendly Happywhale app allows anyone to share photos of encounters with these marine mammals, which are then processed by a team of scientists and volunteers using advanced image recognition algorithms. Identified individuals are tracked over time and across locations, yielding valuable insights into their behavior and aiding in the preservation of critical habitats.

The CLI is designed to interact with the website and allow for you to perform operations like search, download and more using underlying api end points. The CLI provides tools based on API endpoints that may change and evolve and can lead to compatibility issues without API documentations so this tool will be developed as needed to support the larger community needs.

**Disclaimer: This is an unofficial tool. Is not licensed or endorsed by Happywhale.com. It is created and maintained by Samapriya Roy.**

```
happywhale -h
usage: happywhale.py [-h] {readme,auth,species,stats,fetch,search,download} ...
Simple CLI for HappyWhale API
positional arguments:
{readme,auth,species,stats,fetch,search,download}
readme Go to the web based happywhale cli readme page
auth Saves your username and password
species Get species list
stats Go site stats for happywhale
fetch Fetch details on an encounter based on encounter id
search Search and export results (Default: Global 1 month)
download Download images from search results (Default: Global 1 month)
options:
-h, --help show this help message and exit
```
39 changes: 0 additions & 39 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,2 @@
# Changelog

#### v0.2.0
- Fixed major issues with data parsing and fetching custom timeseries exports
- Better metadata parsing and handling of time series fields
- Added support for cleaner logging
- Fixed alert tooling issues and removed argofloats export tool

#### v0.1.0
- Fixed issue with Boolean value for payload
- Fixed metadata parsing and improved logic for time series export
- Both time series and daily data now support export
- Both time series and daily data now supports custom date ranges

#### v0.0.9
- now includes support for hobo sensors
- added site list filter for device type breakdown
- modified site alert tool to pull from all sites and by device type
- general improvements

#### v0.0.8
- added site-argo tool for argofloat exports for sites

#### v0.0.7
- added readme tool to CLI for browser redirect

#### v0.0.6
- added site alert tool

#### v0.0.5
- added status filter to site-list tool
- added lat long for site-timeseries export

#### v0.0.4
- Fixed tool descriptor for timeseries tool.

#### v0.0.3
- Added site info tool for detailed information on site.

#### v0.0.2
- Added readme and created new branch.
35 changes: 21 additions & 14 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# pyaqua: Simple CLI for Aqualink.org API

# Simple CLI for Happywhale
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=plastic&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/samapriya/)
[![Medium](https://img.shields.io/badge/Medium-12100E?style=flat&logo=medium&logoColor=white)](https://medium.com/@samapriyaroy)
[![Twitter URL](https://img.shields.io/twitter/follow/samapriyaroy?style=social)](https://twitter.com/intent/follow?screen_name=samapriyaroy)
[![Mastodon Follow](https://img.shields.io/mastodon/follow/109627075086849826?domain=https%3A%2F%2Fmapstodon.space%2F)](https://mapstodon.space/@samapriya)
[![Donate](https://img.shields.io/badge/Donate-Buy%20me%20a%20Coffee-teal)](https://www.buymeacoffee.com/samapriya)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/samapriya)
[![Hits-of-Code](https://hitsofcode.com/github/open-oceans/pyaqua?branch=main)](https://hitsofcode.com/github/open-oceans/pyaqua?branch=main)
[![CI pyaqua](https://github.com/open-oceans/pyaqua/actions/workflows/package_ci.yml/badge.svg)](https://github.com/open-oceans/pyaqua/actions/workflows/package_ci.yml)
![PyPI - License](https://img.shields.io/pypi/l/pyaqua)
![PyPI](https://img.shields.io/pypi/v/pyaqua)
[![Downloads](https://pepy.tech/badge/pyaqua/month)](https://pepy.tech/project/pyaqua)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10046157.svg)](https://doi.org/10.5281/zenodo.10046157)
[![Donate](https://img.shields.io/badge/Donate-Buy%20me%20a%20Chai-teal)](https://www.buymeacoffee.com/samapriya)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/samapriya)

Aqualink is a philanthropic engineering organization working on building ocean conservation technology. Read more about their [inspiration, smart buoy, and web application](https://aqualink.org/about). This tool is designed to help interact programmatically with the [Aqualink.org map](https://aqualink.org/map) and is not based on any official API so expect features to break once in a while.

**Disclaimer: This is an unofficial tool. Is not licensed or endorsed by Aqualink org. It is created and maintained by Samapriya Roy.**
[Happywhale is a global citizen science project](https://happywhale.com) dedicated to whale and dolphin research and conservation. The user-friendly Happywhale app allows anyone to share photos of encounters with these marine mammals, which are then processed by a team of scientists and volunteers using advanced image recognition algorithms. Identified individuals are tracked over time and across locations, yielding valuable insights into their behavior and aiding in the preservation of critical habitats.

The CLI is designed to interact with the website and allow for you to perform operations like search, download and more using underlying api end points. The CLI provides tools based on API endpoints that may change and evolve and can lead to compatibility issues without API documentations so this tool will be developed as needed to support the larger community needs.

#### Citation
**Disclaimer: This is an unofficial tool. Is not licensed or endorsed by Happywhale.com. It is created and maintained by Samapriya Roy.**

```
Samapriya Roy. (2023). open-oceans/pyaqua: Simple CLI for Aqualink Org (0.2.0).
Zenodo. https://doi.org/10.5281/zenodo.10046157
happywhale -h
usage: happywhale.py [-h] {readme,auth,species,stats,fetch,search,download} ...
Simple CLI for HappyWhale API
positional arguments:
{readme,auth,species,stats,fetch,search,download}
readme Go to the web based happywhale cli readme page
auth Saves your username and password
species Get species list
stats Go site stats for happywhale
fetch Fetch details on an encounter based on encounter id
search Search and export results (Default: Global 1 month)
download Download images from search results (Default: Global 1 month)
options:
-h, --help show this help message and exit
```
19 changes: 0 additions & 19 deletions docs/projects/site-daily.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/projects/site-list.md

This file was deleted.

0 comments on commit bee20e3

Please sign in to comment.