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
9 changes: 9 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
Release Notes
=============

Version 0.21.1
--------------

- Always delete past events during ETL, and filter them out from api results too just in case (#1660)
- Add location field to LearningResource and LearningResourceRun models (#1604)
- Cached department and topic page counts (#1661)
- Shanbady/randomize featured resources (#1653)
- Ignore NotFoundErrors in switch_indices function (#1654)

Version 0.21.0 (Released October 07, 2024)
--------------

Expand Down
144 changes: 144 additions & 0 deletions frontends/api/src/generated/v1/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,12 @@ export interface CourseResource {
* @memberof CourseResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof CourseResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -800,6 +806,12 @@ export interface CourseResource {
* @memberof CourseResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof CourseResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -1014,6 +1026,12 @@ export interface CourseResourceRequest {
* @memberof CourseResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof CourseResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -1366,6 +1384,12 @@ export interface LearningPathResource {
* @memberof LearningPathResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof LearningPathResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -1570,6 +1594,12 @@ export interface LearningPathResource {
* @memberof LearningPathResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof LearningPathResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -1668,6 +1698,12 @@ export interface LearningPathResourceRequest {
* @memberof LearningPathResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof LearningPathResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -2324,6 +2360,12 @@ export interface LearningResourceRun {
* @memberof LearningResourceRun
*/
availability?: AvailabilityEnum | null
/**
*
* @type {string}
* @memberof LearningResourceRun
*/
location?: string
}

/**
Expand Down Expand Up @@ -2479,6 +2521,12 @@ export interface LearningResourceRunRequest {
* @memberof LearningResourceRunRequest
*/
availability?: AvailabilityEnum | null
/**
*
* @type {string}
* @memberof LearningResourceRunRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -3505,6 +3553,12 @@ export interface PatchedLearningPathResourceRequest {
* @memberof PatchedLearningPathResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof PatchedLearningPathResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -4093,6 +4147,12 @@ export interface PodcastEpisodeResource {
* @memberof PodcastEpisodeResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof PodcastEpisodeResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -4297,6 +4357,12 @@ export interface PodcastEpisodeResource {
* @memberof PodcastEpisodeResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof PodcastEpisodeResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -4395,6 +4461,12 @@ export interface PodcastEpisodeResourceRequest {
* @memberof PodcastEpisodeResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof PodcastEpisodeResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -4463,6 +4535,12 @@ export interface PodcastResource {
* @memberof PodcastResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof PodcastResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -4667,6 +4745,12 @@ export interface PodcastResource {
* @memberof PodcastResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof PodcastResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -4765,6 +4849,12 @@ export interface PodcastResourceRequest {
* @memberof PodcastResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof PodcastResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -5053,6 +5143,12 @@ export interface ProgramResource {
* @memberof ProgramResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof ProgramResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -5257,6 +5353,12 @@ export interface ProgramResource {
* @memberof ProgramResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof ProgramResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -5355,6 +5457,12 @@ export interface ProgramResourceRequest {
* @memberof ProgramResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof ProgramResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -5902,6 +6010,12 @@ export interface VideoPlaylistResource {
* @memberof VideoPlaylistResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof VideoPlaylistResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -6106,6 +6220,12 @@ export interface VideoPlaylistResource {
* @memberof VideoPlaylistResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof VideoPlaylistResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -6204,6 +6324,12 @@ export interface VideoPlaylistResourceRequest {
* @memberof VideoPlaylistResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof VideoPlaylistResourceRequest
*/
location?: string
}

/**
Expand Down Expand Up @@ -6260,6 +6386,12 @@ export interface VideoResource {
* @memberof VideoResource
*/
topics?: Array<LearningResourceTopic>
/**
*
* @type {number}
* @memberof VideoResource
*/
position: number | null
/**
*
* @type {LearningResourceOfferor}
Expand Down Expand Up @@ -6464,6 +6596,12 @@ export interface VideoResource {
* @memberof VideoResource
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof VideoResource
*/
location?: string
}

/**
Expand Down Expand Up @@ -6562,6 +6700,12 @@ export interface VideoResourceRequest {
* @memberof VideoResourceRequest
*/
continuing_ed_credits?: string | null
/**
*
* @type {string}
* @memberof VideoResourceRequest
*/
location?: string
}

/**
Expand Down
18 changes: 9 additions & 9 deletions frontends/api/src/hooks/learningResources/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,10 +456,10 @@ describe("userlist CRUD", () => {
makeRequest.mock.calls.filter((call) => call[0] === "get").length,
).toEqual(1)
if (isChildFeatured) {
expect(featuredResult.current.data?.results).toEqual([
relationship.resource,
...featured.results.slice(1),
])
const firstId = featuredResult.current.data?.results.sort()[0].id
const filtered = featured.results.filter((item) => item.id === firstId)

expect(filtered[0]).not.toBeNull()
} else {
expect(featuredResult.current.data).toEqual(featured)
}
Expand All @@ -469,7 +469,7 @@ describe("userlist CRUD", () => {
test.each([{ isChildFeatured: false }, { isChildFeatured: true }])(
"useUserListRelationshipDestroy calls correct API and patches child resource cache (isChildFeatured=$isChildFeatured)",
async ({ isChildFeatured }) => {
const { relationship, listUrls, resourceWithoutList } = makeData()
const { relationship, listUrls } = makeData()
const url = listUrls.relationshipDetails

const featured = factory.resources({ count: 3 })
Expand Down Expand Up @@ -512,10 +512,10 @@ describe("userlist CRUD", () => {
makeRequest.mock.calls.filter((call) => call[0] === "get").length,
).toEqual(1)
if (isChildFeatured) {
expect(featuredResult.current.data?.results).toEqual([
resourceWithoutList,
...featured.results.slice(1),
])
const firstId = featuredResult.current.data?.results.sort()[0].id
const filtered = featured.results.filter((item) => item.id === firstId)

expect(filtered[0]).not.toBeNull()
} else {
expect(featuredResult.current.data).toEqual(featured)
}
Expand Down
Loading
Loading