From 00e541f108d3f98eafbd32a95ac3f1ac780d8d67 Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Thu, 13 Jun 2024 11:15:48 +0200 Subject: [PATCH 1/2] Release v2.2.1 (#1114) * chore(deps): bump braces from 3.0.2 to 3.0.3 in /frontend (#1112) Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. - [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md) - [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3) --- updated-dependencies: - dependency-name: braces dependency-type: indirect ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fixed(CI): Add needs dependency for acceptance deployment in podman workflow #1111 * Fixed: Also apply filter_by filter on section filter in `section_from_any_song` session model method (#1113) * fix: Also apply filter_by filter on section filter in `section_from_any_song` session model method * fix: log correct information in thk5 --------- Co-authored-by: BeritJanssen * chore: Update package.json version to 2.2.1 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: BeritJanssen --- .github/workflows/podman.yml | 3 +++ .../rules/toontjehogerkids_5_tempo.py | 2 +- backend/session/models.py | 8 ++++++-- frontend/.pnp.cjs | 18 +++++++++--------- frontend/yarn.lock | 16 ++++++++-------- package.json | 2 +- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.github/workflows/podman.yml b/.github/workflows/podman.yml index d25a4d61b..6f0ee907b 100644 --- a/.github/workflows/podman.yml +++ b/.github/workflows/podman.yml @@ -290,6 +290,9 @@ jobs: # temporarily true to test e2e tests if: github.ref == 'refs/heads/main' || github.ref == 'refs/tags/*' || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') + # needs to happen after the deployment to the acceptance environment + needs: deploy-acceptance + env: BASE_URL: "https://acc.amsterdammusiclab.nl" diff --git a/backend/experiment/rules/toontjehogerkids_5_tempo.py b/backend/experiment/rules/toontjehogerkids_5_tempo.py index 5fc050ea0..b153b1ad5 100644 --- a/backend/experiment/rules/toontjehogerkids_5_tempo.py +++ b/backend/experiment/rules/toontjehogerkids_5_tempo.py @@ -48,7 +48,7 @@ def get_random_section_pair(self, session, genre): if not section_original: raise Exception( - "Error: could not find original section: {}".format(tag_original)) + "Error: could not find original section: {}".format(section_original)) section_changed = self.get_section_changed( session=session, song=section_original.song) diff --git a/backend/session/models.py b/backend/session/models.py index 22ce5726b..ecfd1665b 100644 --- a/backend/session/models.py +++ b/backend/session/models.py @@ -145,11 +145,15 @@ def section_from_any_song(self, filter_by={}): To ensure appropriate IP restrictions, most rules should use this method instead of operating on the playlist directly. """ - + pks = self.filter_songs(filter_by) if pks: # Return a random section - sections = self.playlist.section_set.filter(song_id=random.choice(pks)) + sections = self.playlist.section_set.filter( + song_id=random.choice(pks) + ).filter( + **filter_by + ) return random.choice(sections) def all_sections(self, filter_by={}): diff --git a/frontend/.pnp.cjs b/frontend/.pnp.cjs index a9f337291..17dd6ed7f 100755 --- a/frontend/.pnp.cjs +++ b/frontend/.pnp.cjs @@ -9954,11 +9954,11 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["braces", [\ - ["npm:3.0.2", {\ - "packageLocation": "../../../.yarn/berry/cache/braces-npm-3.0.2-782240b28a-10c0.zip/node_modules/braces/",\ + ["npm:3.0.3", {\ + "packageLocation": "../../../.yarn/berry/cache/braces-npm-3.0.3-582c14023c-10c0.zip/node_modules/braces/",\ "packageDependencies": [\ - ["braces", "npm:3.0.2"],\ - ["fill-range", "npm:7.0.1"]\ + ["braces", "npm:3.0.3"],\ + ["fill-range", "npm:7.1.1"]\ ],\ "linkType": "HARD"\ }]\ @@ -10212,7 +10212,7 @@ const RAW_RUNTIME_STATE = "packageDependencies": [\ ["chokidar", "npm:3.5.3"],\ ["anymatch", "npm:3.1.3"],\ - ["braces", "npm:3.0.2"],\ + ["braces", "npm:3.0.3"],\ ["fsevents", "patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1"],\ ["glob-parent", "npm:5.1.2"],\ ["is-binary-path", "npm:2.1.0"],\ @@ -12086,10 +12086,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["fill-range", [\ - ["npm:7.0.1", {\ - "packageLocation": "../../../.yarn/berry/cache/fill-range-npm-7.0.1-b8b1817caa-10c0.zip/node_modules/fill-range/",\ + ["npm:7.1.1", {\ + "packageLocation": "../../../.yarn/berry/cache/fill-range-npm-7.1.1-bf491486db-10c0.zip/node_modules/fill-range/",\ "packageDependencies": [\ - ["fill-range", "npm:7.0.1"],\ + ["fill-range", "npm:7.1.1"],\ ["to-regex-range", "npm:5.0.1"]\ ],\ "linkType": "HARD"\ @@ -14216,7 +14216,7 @@ const RAW_RUNTIME_STATE = "packageLocation": "../../../.yarn/berry/cache/micromatch-npm-4.0.5-cfab5d7669-10c0.zip/node_modules/micromatch/",\ "packageDependencies": [\ ["micromatch", "npm:4.0.5"],\ - ["braces", "npm:3.0.2"],\ + ["braces", "npm:3.0.3"],\ ["picomatch", "npm:2.3.1"]\ ],\ "linkType": "HARD"\ diff --git a/frontend/yarn.lock b/frontend/yarn.lock index f8efc0fe1..66b420338 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -6358,11 +6358,11 @@ __metadata: linkType: hard "braces@npm:^3.0.2, braces@npm:~3.0.2": - version: 3.0.2 - resolution: "braces@npm:3.0.2" + version: 3.0.3 + resolution: "braces@npm:3.0.3" dependencies: - fill-range: "npm:^7.0.1" - checksum: 10c0/321b4d675791479293264019156ca322163f02dc06e3c4cab33bb15cd43d80b51efef69b0930cfde3acd63d126ebca24cd0544fa6f261e093a0fb41ab9dda381 + fill-range: "npm:^7.1.1" + checksum: 10c0/7c6dfd30c338d2997ba77500539227b9d1f85e388a5f43220865201e407e076783d0881f2d297b9f80951b4c957fcf0b51c1d2d24227631643c3f7c284b0aa04 languageName: node linkType: hard @@ -8172,12 +8172,12 @@ __metadata: languageName: node linkType: hard -"fill-range@npm:^7.0.1": - version: 7.0.1 - resolution: "fill-range@npm:7.0.1" +"fill-range@npm:^7.1.1": + version: 7.1.1 + resolution: "fill-range@npm:7.1.1" dependencies: to-regex-range: "npm:^5.0.1" - checksum: 10c0/7cdad7d426ffbaadf45aeb5d15ec675bbd77f7597ad5399e3d2766987ed20bda24d5fac64b3ee79d93276f5865608bb22344a26b9b1ae6c4d00bd94bf611623f + checksum: 10c0/b75b691bbe065472f38824f694c2f7449d7f5004aa950426a2c28f0306c60db9b880c0b0e4ed819997ffb882d1da02cfcfc819bddc94d71627f5269682edf018 languageName: node linkType: hard diff --git a/package.json b/package.json index d1ed65c30..6aaf4740c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muscle", - "version": "2.2.0", + "version": "2.2.1", "private": false, "description": "The MUSCLE platform is an application that provides an easy way to implement and run online listening experiments for music research.", "license": "MIT", From 9008d1720807a7ffc43f75d87d5fa7d89cb0ca96 Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Thu, 13 Jun 2024 16:43:16 +0200 Subject: [PATCH 2/2] chore: Update package.json version to 2.2.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6aaf4740c..f0bc003d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "muscle", - "version": "2.2.1", + "version": "2.2.2", "private": false, "description": "The MUSCLE platform is an application that provides an easy way to implement and run online listening experiments for music research.", "license": "MIT",