Skip to content

Commit 6cfa423

Browse files
committed
updating readme and ConfigIncompleteError
1 parent a8ada50 commit 6cfa423

2 files changed

Lines changed: 10 additions & 19 deletions

File tree

README.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,11 @@
66
[![Test Tap](https://github.com/collinprather/tap-sleeper/actions/workflows/test-tap.yml/badge.svg)](https://github.com/collinprather/tap-sleeper/actions/workflows/test-tap.yml)
77
[![CodeQL](https://github.com/collinprather/tap-sleeper/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/collinprather/tap-sleeper/actions/workflows/codeql-analysis.yml)
88

9-
`tap-sleeper` is a Singer tap for the [Sleeper](https://sleeper.app/) [api](https://docs.sleeper.app/).
10-
11-
Built with the [Meltano Tap SDK](https://sdk.meltano.com) for Singer Taps.
9+
`tap-sleeper` is a [Singer](https://hub.meltano.com/singer/spec) tap for the [Sleeper](https://sleeper.app/) [api](https://docs.sleeper.app/), built with the [Meltano Tap SDK](https://sdk.meltano.com), which makes it easy to pull the latest news about any NFL players, trending players, or granular information about your fantasy football league.
1210

1311

1412
## Installation
1513

16-
- [ ] `Developer TODO:` Update the below as needed to correctly describe the install procedure. For instance, if you do not have a PyPi repo, or if you want users to directly install from your git repo, you can modify this step as appropriate.
17-
1814
```bash
1915
pipx install tap-sleeper
2016
```
@@ -23,7 +19,12 @@ pipx install tap-sleeper
2319

2420
### Accepted Config Options
2521

26-
- [ ] `Developer TODO:` Provide a list of config options accepted by the tap.
22+
| **Property** | **Type** | **Required** | **Description** |
23+
|---------------------------------|----------|--------------|--------------------------------------------------------------------------------|
24+
| sport | string | True | Professional sport league, ie nfl, nba, etc" |
25+
| league_id | string | False | Unique identifier for the sleeper league |
26+
| trending_players_lookback_hours | integer | False | Total hours to lookback when requesting the current trending players |
27+
| trending_players_limit | integer | False | Total number of players to return when requesting the current trending players |
2728

2829
A full list of supported settings and capabilities for this
2930
tap is available by running:
@@ -32,10 +33,6 @@ tap is available by running:
3233
tap-sleeper --about
3334
```
3435

35-
### Source Authentication and Authorization
36-
37-
- [ ] `Developer TODO:` If your tap requires special access on the source system, or any special authentication requirements, provide those here.
38-
3936
## Usage
4037

4138
You can easily run `tap-sleeper` by itself or in a pipeline using [Meltano](https://meltano.com/).
@@ -50,8 +47,6 @@ tap-sleeper --config CONFIG --discover > ./catalog.json
5047

5148
## Developer Resources
5249

53-
- [ ] `Developer TODO:` As a first step, scan the entire project for the text "`TODO:`" and complete any recommended steps, deleting the "TODO" references once completed.
54-
5550
### Initialize your Development Environment
5651

5752
```bash

tap_sleeper/streams.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,15 @@ class LeagueStream(SleeperStream):
7373
name = "league"
7474
parent_stream_type = SportStateStream
7575

76-
def __init__(self, tap) -> None:
77-
"""Initialize the League stream and assert that config includes league_id."""
78-
super().__init__(tap=tap, name=self.name, schema=self.schema)
76+
def get_url(self, context: Optional[dict]) -> str:
7977
if "league_id" not in self.config.keys():
80-
raise InvalidConfigError(
78+
raise ConfigIncompleteForSelectedStreamsError(
8179
"""
8280
Must supply league_id in config to pull league-related streams.
8381
If you would not like to replicate league-related streams, remove
8482
them from your catalog.json (or meltano.yml).
8583
"""
8684
)
87-
88-
def get_url(self, context: Optional[dict]) -> str:
8985
url = self.url_base + self.path.format(league_id=self.config["league_id"])
9086
return url
9187

@@ -246,5 +242,5 @@ class LeagueDraftTradedPicksStream(LeagueDraftPicksStream):
246242
parent_stream_type = LeagueDraftsStream
247243

248244

249-
class InvalidConfigError(Exception):
245+
class ConfigIncompleteForSelectedStreamsError(Exception):
250246
pass

0 commit comments

Comments
 (0)