semvec/pypi-packages huggingface dataset:
ga-reporting-etls 2.4.2
Geoscience Australia - NEMO Automated Reporting Tools

# Usage


* from nemo_reporting.welcome import say_hello

## Generate "Hello,World"


* say_hello()

## Generate "Hello,Everybody"


* say_hello("Everybody")

# Installing tools
`pip3.8 install pytest-pylint bumpversion`


# Run tests and linting
`python3.8 setup.py test`


# setup.py
`setup.py` is the build script for setuptools. It tells setuptools about your package (such as the name and version) as well as which code files to include. Some important entries and examples are shown below.

   * name=<package name> e.g. ga-reporting-etls
   * description=<>
   * packages=<folder name> e.g. testpypi
   * version=<auto generated by bump version>
   * setup_requires=['pytest-runner']
   * tests_require=['pytest','pylint']

# setup.cfg
setup.cfg is the configuration file for setuptools. It tells setuptools about your package (such as the name and version) as well as which code files to include. We will have pytest and pylint as bare minimum in the cfg file but more can be added specific to the package


# bumpversion (.bumpversion.cfg)
bumpversion is used to bump major,minor and patch versions. `https://pypi.org/project/bumpversion/`
Command: bumpversion minor|major|patch --allow-dirty


## M2M API
For USGS acquisitions the USGS M2M API is now being used as STAC API seems to be still in a development phase. The library we use to query the API is at `dags/automated_reporting/utilities/m2m_api.py`. The API is well documented at `https://m2m.cr.usgs.gov/api/docs/reference/` (login required, register instantly with email).

### Filters
Filters are a bit complex in the M2M API, as you have to lookup the filter Id for the attribute that you wish to filter on. There is an API endpoint to see all the filters available for a particular dataset `https://m2m.cr.usgs.gov/api/docs/reference/#dataset-filters`. This can be called for a dataset using the API test page `https://m2m.cr.usgs.gov/api/test/json/`, which is useful for building up the desired filters.

The scene filter section of the docs is also useful to undertsand how the filter payloads are structured `https://m2m.cr.usgs.gov/api/docs/datatypes/#sceneFilter`.
sparkai 0.3.0
SparkAI official Python client library
Requires Python: >=3.4

# sparkai-python-client

The official [SparkAI](https://www.spark.ai) Python client

## Installation

$ pip install --upgrade sparkai

## Usage

```
import sparkai.SparkAIClient
client = SparkAIClient('PROVIDED_API_KEY')
url = https://picsum.photos/200/300
instructions = 'Annotate any object in the photo'
token = client.create_engagement_from_image_url(url, instructions=instructions)
```

### Validating webhook signature

```
client.validate_webhook_secret(request_secret_header, request_body, self_secret)
```

- `request_secret_header`: the whole header Spark-Signature sent with the webhook request
- `request_body`: the whole JSON object body sent witth the webhook request
- `self_secret`: customer's webhook token

Returns True if the signature is valid