Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAnnalyst committed Oct 26, 2021
1 parent b78d4f5 commit 7ca046d
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 23 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

### v0.2.0
- Support TypeScript 4.4 and Node.js versions 16.x and 17.x
- Add `StorageBackend#getMatchesByNumber` and support associating multiple `Match` objects with one match
- SQLite makes it difficult to drop constraints, so you'll need to migrate your data if you used the SQLite backend and want to store multiple scouted teams per match
- Deprecate `StorageBackend#getMatchByNumber`
### v0.1.1
- Fixed bugs with the JSON storage backend

Expand Down
4 changes: 2 additions & 2 deletions docs/classes/InfiniteRecharge.ColorWheel.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Represents the color wheel in Infinite Recharge

| Name | Type | Description |
| :------ | :------ | :------ |
| `state` | ``null`` \| ``"SPECIFIC_COLOR"`` \| ``"ROTATED_X_TIMES"`` | - |
| `state` | ``null`` \| `ColorWheelPosition` | - |
| `cells?` | [`PowerCellTracker`](InfiniteRecharge.PowerCellTracker.md) | PowerCellTracker for validation |

#### Overrides
Expand Down Expand Up @@ -66,7 +66,7 @@ ___

### state

**state**: ``null`` \| ``"SPECIFIC_COLOR"`` \| ``"ROTATED_X_TIMES"``
**state**: ``null`` \| `ColorWheelPosition`

null = no special state

Expand Down
8 changes: 4 additions & 4 deletions docs/classes/InfiniteRecharge.ShieldGenerator.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ construction owo

| Name | Type |
| :------ | :------ |
| `hangingBots` | `HABLevel` |
| `floorBots` | `HABLevel` |
| `hangingBots` | `NumberOfBots` |
| `floorBots` | `NumberOfBots` |
| `isLevel` | `boolean` |

#### Overrides
Expand All @@ -58,7 +58,7 @@ games/infinite-recharge.ts:115

### floorBots

**floorBots**: `HABLevel`
**floorBots**: `NumberOfBots`

#### Defined in

Expand All @@ -68,7 +68,7 @@ ___

### hangingBots

**hangingBots**: `HABLevel`
**hangingBots**: `NumberOfBots`

#### Defined in

Expand Down
37 changes: 32 additions & 5 deletions docs/classes/JSONBackend.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ The directory structure is as follows:
- [deleteMatchByNumber](JSONBackend.md#deletematchbynumber)
- [deleteMatchesByTeam](JSONBackend.md#deletematchesbyteam)
- [deleteTeam](JSONBackend.md#deleteteam)
- [getMatchByNumber](JSONBackend.md#getmatchbynumber)
- [getMatchesByNumber](JSONBackend.md#getmatchesbynumber)
- [getMatchesByTeam](JSONBackend.md#getmatchesbyteam)
- [getTeam](JSONBackend.md#getteam)
Expand Down Expand Up @@ -104,7 +105,7 @@ deletes a match by number

#### Defined in

storage/json.ts:116
storage/json.ts:121

___

Expand All @@ -130,7 +131,7 @@ deletes all matches associated with a given team

#### Defined in

storage/json.ts:124
storage/json.ts:129

___

Expand All @@ -157,7 +158,33 @@ deletes a team

#### Defined in

storage/json.ts:109
storage/json.ts:114

___

### getMatchByNumber

**getMatchByNumber**(`number`): ``null`` \| [`Match`](Match.md)

gets one match

#### Parameters

| Name | Type |
| :------ | :------ |
| `number` | `number` |

#### Returns

``null`` \| [`Match`](Match.md)

#### Implementation of

[StorageBackend](../interfaces/StorageBackend.md).[getMatchByNumber](../interfaces/StorageBackend.md#getmatchbynumber)

#### Defined in

storage/json.ts:94

___

Expand Down Expand Up @@ -209,7 +236,7 @@ gets matches by team

#### Defined in

storage/json.ts:94
storage/json.ts:99

___

Expand Down Expand Up @@ -325,4 +352,4 @@ String representation

#### Defined in

storage/json.ts:168
storage/json.ts:173
35 changes: 31 additions & 4 deletions docs/classes/SQLBackend.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Stores teams and matches from various games in SQL.
- [deleteMatchByNumber](SQLBackend.md#deletematchbynumber)
- [deleteMatchesByTeam](SQLBackend.md#deletematchesbyteam)
- [deleteTeam](SQLBackend.md#deleteteam)
- [getMatchByNumber](SQLBackend.md#getmatchbynumber)
- [getMatchesByNumber](SQLBackend.md#getmatchesbynumber)
- [getMatchesByTeam](SQLBackend.md#getmatchesbyteam)
- [getTeam](SQLBackend.md#getteam)
Expand Down Expand Up @@ -83,7 +84,7 @@ deletes a match

#### Defined in

storage/sqlite.ts:178
storage/sqlite.ts:183

___

Expand All @@ -109,7 +110,7 @@ deletes matches

#### Defined in

storage/sqlite.ts:185
storage/sqlite.ts:190

___

Expand Down Expand Up @@ -140,6 +141,32 @@ storage/sqlite.ts:136

___

### getMatchByNumber

**getMatchByNumber**(`number`): ``null`` \| [`Match`](Match.md)

gets one match

#### Parameters

| Name | Type |
| :------ | :------ |
| `number` | `number` |

#### Returns

``null`` \| [`Match`](Match.md)

#### Implementation of

[StorageBackend](../interfaces/StorageBackend.md).[getMatchByNumber](../interfaces/StorageBackend.md#getmatchbynumber)

#### Defined in

storage/sqlite.ts:167

___

### getMatchesByNumber

**getMatchesByNumber**(`number`): [`Match`](Match.md)[]
Expand Down Expand Up @@ -188,7 +215,7 @@ gets matches

#### Defined in

storage/sqlite.ts:167
storage/sqlite.ts:172

___

Expand Down Expand Up @@ -304,4 +331,4 @@ String representation

#### Defined in

storage/sqlite.ts:193
storage/sqlite.ts:198
2 changes: 1 addition & 1 deletion docs/classes/Team.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Gets the median of any match property

| Name | Type |
| :------ | :------ |
| `property` | ``"number"`` \| ``"teamNumber"`` \| ``"type"`` \| ``"alliance"`` \| ``"pieceTrackers"`` \| ``"fouls"`` \| ``"cards"`` \| ``"emergencyStopped"`` \| ``"borked"`` \| ``"nonPieceTrackerRankingPoints"`` \| ``"pointsFromFouls"`` \| ``"bonusPoints"`` \| ``"crossedStartLineInAuto"`` \| ``"points"`` \| ``"rankingPoints"`` |
| `property` | keyof [`Match`](Match.md) |

#### Returns

Expand Down
31 changes: 28 additions & 3 deletions docs/interfaces/StorageBackend.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [deleteMatchByNumber](StorageBackend.md#deletematchbynumber)
- [deleteMatchesByTeam](StorageBackend.md#deletematchesbyteam)
- [deleteTeam](StorageBackend.md#deleteteam)
- [getMatchByNumber](StorageBackend.md#getmatchbynumber)
- [getMatchesByNumber](StorageBackend.md#getmatchesbynumber)
- [getMatchesByTeam](StorageBackend.md#getmatchesbyteam)
- [getTeam](StorageBackend.md#getteam)
Expand All @@ -38,7 +39,7 @@

#### Defined in

storage/backend.ts:24
storage/backend.ts:30

___

Expand All @@ -58,7 +59,7 @@ ___

#### Defined in

storage/backend.ts:25
storage/backend.ts:31

___

Expand All @@ -83,6 +84,30 @@ storage/backend.ts:13

___

### getMatchByNumber

**getMatchByNumber**(`number`): ``null`` \| [`Match`](../classes/Match.md)

Get only one match from a given match number.

**`deprecated`** Use getMatchesByNumber instead.

#### Parameters

| Name | Type |
| :------ | :------ |
| `number` | `number` |

#### Returns

``null`` \| [`Match`](../classes/Match.md)

#### Defined in

storage/backend.ts:23

___

### getMatchesByNumber

**getMatchesByNumber**(`number`): [`Match`](../classes/Match.md)[]
Expand Down Expand Up @@ -125,7 +150,7 @@ what we actually want.

#### Defined in

storage/backend.ts:23
storage/backend.ts:29

___

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frc-scouting",
"version": "0.1.1",
"version": "0.2.0",
"description": "A TypeScript library for handling FRC scouting data from robotics tournaments.",
"main": "built/index.js",
"types": "built/index.d.ts",
Expand All @@ -11,7 +11,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/TheAnnalyst/frc-scouting.git"
"url": "git+https://github.com/BREAD5940/frc-scouting.git"
},
"keywords": [
"frc",
Expand All @@ -21,9 +21,9 @@
"author": "Annika",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/TheAnnalyst/frc-scouting/issues"
"url": "https://github.com/BREAD5940/frc-scouting/issues"
},
"homepage": "https://github.com/TheAnnalyst/frc-scouting#readme",
"homepage": "https://github.com/BREAD5940/frc-scouting#readme",
"devDependencies": {
"@types/jest": "^26.0.15",
"@typescript-eslint/eslint-plugin": "^4.8.1",
Expand Down

0 comments on commit 7ca046d

Please sign in to comment.