Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build

on:
push:
tags: ["*"]

permissions:
contents: write
Expand All @@ -28,7 +29,6 @@ jobs:
environment:
name: publishing
url: https://pypi.org/p/${{ needs.build.outputs.package_name }}/${{ needs.build.outputs.package_version }}
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
Expand Down
96 changes: 96 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Test tap-betterstack

on:
push:
branches: [main]
paths:
- tap_betterstack/**
- tests/**
- pyproject.toml
- uv.lock
- .github/workflows/test.yml
pull_request:
paths:
- tap_betterstack/**
- tests/**
- pyproject.toml
- uv.lock
- .github/workflows/test.yml
workflow_dispatch:
schedule:
# Run weekly on Monday at 12:00 PM UTC
- cron: "0 12 * * 1"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

env:
FORCE_COLOR: "1"
# renovate: datasource=pypi depName=tox
TOX_VERSION: 4.44.0
# renovate: datasource=pypi depName=tox-uv
TOX_UV_VERSION: 1.29.0
# renovate: datasource=pypi depName=uv
UV_VERSION: 0.10.7

jobs:
build-package:
name: Build & verify package
runs-on: ubuntu-latest
outputs:
supported-python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0
id: baipp

test:
name: Integration
runs-on: ubuntu-24.04
needs: build-package
strategy:
fail-fast: false
max-parallel: 1
matrix:
python-version: ${{ fromJson(needs.build-package.outputs.supported-python-versions) }}

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: astral-sh/setup-uv@5a095e7a2014a4212f075830d4f7277575a9d098 # v7.3.1
with:
python-version: ${{ matrix.python-version }}
version: ${{ env.UV_VERSION }}
- name: Run tests
env:
TAP_BETTERSTACK_TOKEN: ${{ secrets.TAP_BETTERSTACK_TOKEN }}
TAP_BETTERSTACK_START_DATE: ${{ secrets.TAP_BETTERSTACK_START_DATE }}
run: >
uvx
--with tox-uv==${{ env.TOX_UV_VERSION }}
--with tox==${{ env.TOX_VERSION }}
tox -e ${{ matrix.python-version }}

lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
id: setup-python
- uses: astral-sh/setup-uv@eac588ad8def6316056a12d4907a9d4d84ff7a3b # v7.3.0
with:
version: ${{ env.UV_VERSION }}
- env:
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: uv tool install --with tox-uv==${{ env.TOX_UV_VERSION }} --from tox==${{ env.TOX_VERSION }} tox
- name: Static type checking
run: tox -e typing
- name: Unused, missing and transitive dependencies
run: tox -e dependencies
86 changes: 0 additions & 86 deletions .github/workflows/test.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,8 @@ repos:
hooks:
- id: uv-lock
- id: uv-sync

- repo: https://github.com/hukkin/mdformat
rev: 1.0.0
hooks:
- id: mdformat
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,50 +23,50 @@ Singer tap for [Better Stack](https://betterstack.com). Built with the [Meltano

## Capabilities

* `catalog`
* `state`
* `discover`
* `about`
* `stream-maps`
* `schema-flattening`
* `batch`
- `catalog`
- `state`
- `discover`
- `about`
- `stream-maps`
- `schema-flattening`
- `batch`

## Settings

| Setting | Required | Default | Description |
| Setting | Required | Default | Description |
|:--------------------|:--------:|:-------:|:------------|
| token | True | None | API Token for Better Stack |
| start_date | False | None | Earliest datetime to get data from |
| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). |
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
| flattening_max_depth| False | None | The max depth to flatten schemas. |
| batch_config | False | None | |
| token | True | None | API Token for Better Stack |
| start_date | False | None | Earliest datetime to get data from |
| stream_maps | False | None | Config object for stream maps capability. For more information check out [Stream Maps](https://sdk.meltano.com/en/latest/stream_maps.html). |
| stream_map_config | False | None | User-defined config values to be used within map expressions. |
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. |
| flattening_max_depth| False | None | The max depth to flatten schemas. |
| batch_config | False | None | |

A full list of supported settings and capabilities is available by running: `tap-betterstack --about`

## Streams

### Supported

* [`monitors`](https://betterstack.com/docs/uptime/api/list-all-existing-monitors/)
* [`monitor_groups`](https://betterstack.com/docs/uptime/api/list-all-existing-monitor-groups/)
* [`heartbeats`](https://betterstack.com/docs/uptime/api/list-all-existing-hearbeats/)
* [`heartbeat_groups`](https://betterstack.com/docs/uptime/api/list-all-existing-heartbeat-groups/)
* [`on_calls`](https://betterstack.com/docs/uptime/api/list-all-existing-on-call-calendars/)
* [`escalation_policies`](https://betterstack.com/docs/uptime/api/list-all-escalation-policies/)
* [`incidents`](https://betterstack.com/docs/uptime/api/list-all-incidents/)
* [`incident_events`](https://betterstack.com/docs/uptime/api/list-of-incident-timeline-events/)
* [`email_integrations`](https://betterstack.com/docs/uptime/api/list-all-email-integrations/)
* [`incoming_webhooks`](https://betterstack.com/docs/uptime/api/list-all-incoming-webhooks/)
* [`status_pages`](https://betterstack.com/docs/uptime/api/list-all-existing-status-pages/)
- [`monitors`](https://betterstack.com/docs/uptime/api/list-all-existing-monitors/)
- [`monitor_groups`](https://betterstack.com/docs/uptime/api/list-all-existing-monitor-groups/)
- [`heartbeats`](https://betterstack.com/docs/uptime/api/list-all-existing-hearbeats/)
- [`heartbeat_groups`](https://betterstack.com/docs/uptime/api/list-all-existing-heartbeat-groups/)
- [`on_calls`](https://betterstack.com/docs/uptime/api/list-all-existing-on-call-calendars/)
- [`escalation_policies`](https://betterstack.com/docs/uptime/api/list-all-escalation-policies/)
- [`incidents`](https://betterstack.com/docs/uptime/api/list-all-incidents/)
- [`incident_events`](https://betterstack.com/docs/uptime/api/list-of-incident-timeline-events/)
- [`email_integrations`](https://betterstack.com/docs/uptime/api/list-all-email-integrations/)
- [`incoming_webhooks`](https://betterstack.com/docs/uptime/api/list-all-incoming-webhooks/)
- [`status_pages`](https://betterstack.com/docs/uptime/api/list-all-existing-status-pages/)

### Planned (PRs welcome!)

* [`status_page_sections`](https://betterstack.com/docs/uptime/api/list-existing-sections-of-a-status-page/)
* [`status_page_resources`](https://betterstack.com/docs/uptime/api/list-existing-resources-of-a-status-page/)
* [`status_page_reports`](https://betterstack.com/docs/uptime/api/list-existing-reports-on-a-status-page/)
* [`status_page_report_updates`](https://betterstack.com/docs/uptime/api/list-all-existing-status-updates-for-a-status-page-report/)
- [`status_page_sections`](https://betterstack.com/docs/uptime/api/list-existing-sections-of-a-status-page/)
- [`status_page_resources`](https://betterstack.com/docs/uptime/api/list-existing-resources-of-a-status-page/)
- [`status_page_reports`](https://betterstack.com/docs/uptime/api/list-existing-reports-on-a-status-page/)
- [`status_page_report_updates`](https://betterstack.com/docs/uptime/api/list-all-existing-status-updates-for-a-status-page-report/)

## Usage

Expand Down
67 changes: 0 additions & 67 deletions noxfile.py

This file was deleted.

Loading