You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ReadMe.md
+52-14Lines changed: 52 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ The following parameters can be set in config files or in env variables:
113
113
- MISC_SECURE_FIELDS: Misc identifiable info fields, only admin, M2M, or member himself can fetch these fields
114
114
- STATISTICS_SECURE_FIELDS: Member Statistics identifiable info fields, only admin, M2M, or member himself can fetch these fields
115
115
- STATS_READ_SOURCE: Controls stats read backend, `unified` (default, new tables) or `legacy` (pre-refactor tables)
116
-
- RATING_PATHS: JSON array of tag- and skill-based Development Challenge and Marathon Match rating paths. Each entry has `name`, optional `tags`, optional `skillIds`, and optional `track` (`DATA_SCIENCE`, `DEVELOP`, or `DEVELOPMENT`); at least one of `tags` or `skillIds` is required. Tags match any listed challenge tag, while skill IDs require every listed challenge skill. Defaults to `[{"name":"AI","track":"DATA_SCIENCE","tags":["AI","AI Exponential League"]}]`. Re-rate a path by passing `ratingName` to `POST /members/{handle}/stats/rerate`; rows are stored under `{track} / {name}` in unified stats.
116
+
- RATING_PATHS: JSON array of tag- and skill-based Development Challenge and Marathon Match rating paths. Each entry has `name`, optional `tags`, optional `skillIds`, and optional `track` (`DATA_SCIENCE`, `DEVELOP`, or `DEVELOPMENT`); at least one of `tags` or `skillIds` is required. Tags match any listed challenge tag, while skill IDs require every listed challenge skill. Defaults to `[{"name":"AI Engineering","track":"DATA_SCIENCE","tags":["AI","AI Exponential League"]}]`. Re-rate a path by passing `ratingName` to `POST /members/{handle}/stats/rerate`; rows are stored under `{track} / {name}` in unified stats.
117
117
- HEALTH_CHECK_TIMEOUT: health check timeout in milliseconds
118
118
119
119
Set the following environment variables used by bus API to get TC M2M token (use 'set' insted of 'export' for Windows OS):
@@ -138,21 +138,59 @@ The following test parameters can be set in config file or in env variables:
- S3_ENDPOINT: endpoint of AWS S3 API, for unit and e2e test only; default to `localhost:9000`
140
140
141
+
## Challenge Point Profile Data
142
+
143
+
Point-based challenge prizes are mirrored into member-api so profile pages can show totals and a per-challenge breakdown without reading tc-finance-api.
144
+
145
+
Autopilot replaces the rows for one challenge with:
`GET /v6/members/{handle}` includes a public `challengePoints` object by default:
160
+
161
+
```json
162
+
{
163
+
"challengePoints": {
164
+
"total": 2847,
165
+
"challenges": 14,
166
+
"details": [
167
+
{
168
+
"challengeId": "challenge-uuid",
169
+
"challengeName": "AI Points Challenge",
170
+
"userId": 123456,
171
+
"placement": 1,
172
+
"points": 500
173
+
}
174
+
]
175
+
}
176
+
}
177
+
```
178
+
141
179
## Rating Path Operations
142
180
143
181
Historical rating paths are configured with `RATING_PATHS`. The default AI path is:
144
182
145
183
```json
146
184
[
147
185
{
148
-
"name": "AI",
186
+
"name": "AI Engineering",
149
187
"track": "DATA_SCIENCE",
150
188
"tags": ["AI", "AI Exponential League"]
151
189
}
152
190
]
153
191
```
154
192
155
-
The `track` value controls where the rating is stored in unified stats. Use `DATA_SCIENCE` to store rows under `DATA_SCIENCE / AI`, or `DEVELOP` / `DEVELOPMENT` to store rows under `DEVELOP / AI`. The rating engine includes both Marathon Match results and `challenge` type Development Challenge results when the challenges match the configured tags or skill IDs. When a configured rating name does not already exist as a `ChallengeType`, rerate creates a deterministic custom type row so unified `memberStats` foreign keys remain valid.
193
+
The `track` value controls where the rating is stored in unified stats. Use `DATA_SCIENCE` to store rows under `DATA_SCIENCE / AI Engineering`, or `DEVELOP` / `DEVELOPMENT` to store rows under `DEVELOP / AI Engineering`. The rating engine includes both Marathon Match results and `challenge` type Development Challenge results when the challenges match the configured tags or skill IDs. When a configured rating name does not already exist as a `ChallengeType`, rerate creates a deterministic custom type row so unified `memberStats` foreign keys remain valid.
@@ -201,33 +239,33 @@ The script discovers completed Marathon Match challenges by `ChallengeType` id a
201
239
To re-run a configured rating path for every member who participated in the configured challenge set, use the bulk script instead of the member-scoped API:
202
240
203
241
```bash
204
-
pnpm rerate-rating-path -- --rating-name AI --dry-run
205
-
pnpm rerate-rating-path -- --rating-name AI --concurrency 5
The script discovers distinct user IDs from all rated challenges matching the configured path, then rerates each user from the start of the path so complete history is written without requiring individual handles or challenge IDs. It writes successfully processed user IDs to `rerateRatingPath.processedUserIds.json` by default. Marathon Match path events are also read from review summations and do not require `MM_DB_URL`.
209
247
210
248
Useful script options:
211
249
212
250
```bash
213
-
pnpm rerate-rating-path -- --rating-name AI --limit 100
214
-
pnpm rerate-rating-path -- --rating-name AI --user-id 12345
215
-
pnpm rerate-rating-path -- --rating-name AI --user-ids 12345,67890
216
-
pnpm rerate-rating-path -- --rating-name AI --processed-user-ids-path /tmp/ai-rerated-users.json
Copy file name to clipboardExpand all lines: docs/swagger.yaml
+106-1Lines changed: 106 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -170,6 +170,49 @@ paths:
170
170
description: Internal server error
171
171
schema:
172
172
$ref: '#/definitions/ErrorModel'
173
+
'/members/challenge-points/{challengeId}':
174
+
put:
175
+
tags:
176
+
- Basic
177
+
description: |-
178
+
Replace the stored point awards for one challenge. This endpoint mirrors point-based challenge prize payouts into member-api so member profiles can return challenge point totals and per-challenge details.
179
+
180
+
Authorization:
181
+
- M2M scopes: `update:user_profiles` or `all:user_profiles`.
182
+
security:
183
+
- bearer: []
184
+
parameters:
185
+
- in: path
186
+
name: challengeId
187
+
required: true
188
+
type: string
189
+
description: Challenge identifier whose point rows should be replaced.
0 commit comments