Commit Graph

48 Commits

Author SHA1 Message Date
Georges-Antoine Assi
b0d086bd10 fix tests 2025-10-20 22:56:28 -04:00
Georges-Antoine Assi
a50a2373bc add and update tests 2025-10-20 21:53:41 -04:00
Georges-Antoine Assi
9a8899f678 use explicit kwargs on scan 2025-10-19 12:43:03 -04:00
Georges-Antoine Assi
d48b2542b8 fix fixture 2025-10-18 18:20:24 -04:00
Georges-Antoine Assi
24a5acce5d [ROMM-2552] Rom hashes should only include top-level nested files 2025-10-18 18:05:57 -04:00
Georges-Antoine Assi
05c5d79e5f commit backen code 2025-10-16 15:41:42 -04:00
Georges-Antoine Assi
c43c1041a3 fix tests 2025-10-16 14:20:38 -04:00
Georges-Antoine Assi
fc225f3508 Merge branch 'master' into task-status-page 2025-10-05 16:09:58 -04:00
Georges-Antoine Assi
3ee14fd23f force ascii on password and email 2025-10-05 14:52:00 -04:00
Georges-Antoine Assi
ae9b01e38d update rules 2025-10-05 14:42:57 -04:00
Georges-Antoine Assi
f6d7f9d1c1 [ROMM-2509] Validate user email and username 2025-10-05 14:11:34 -04:00
Georges-Antoine Assi
5df6c914e8 fix tests 2025-10-05 11:15:38 -04:00
Georges-Antoine Assi
d37547fc56 show scan progress on page 2025-10-02 10:50:33 -04:00
Michon van Dooren
240f348f92 Add support for OIDC role claim 2025-09-29 22:27:10 +02:00
Georges-Antoine Assi
35bfe9ed61 fix tests 2025-09-25 20:44:11 -04:00
Georges-Antoine Assi
b5776be475 Split rom.multi into more specific fields 2025-09-25 18:48:27 -04:00
Georges-Antoine Assi
485b02d1c9 fix scan test 2025-09-23 19:03:24 -04:00
Georges-Antoine Assi
b3a1b6a361 add to example config 2025-09-21 19:23:20 -04:00
Georges-Antoine Assi
7c8efeb475 fix test 2025-09-20 20:24:49 -04:00
Georges-Antoine Assi
4e40df4dad add test for new endpoint 2025-09-20 19:41:56 -04:00
Georges-Antoine Assi
8c33a95637 remove hartbeat from bh endpoint 2025-09-20 17:57:38 -04:00
Georges-Antoine Assi
e9f7da09f9 add metadata status page and heartbeats 2025-09-20 09:19:15 -04:00
Georges-Antoine Assi
debc6c4cab run formatter 2025-09-11 22:35:19 -04:00
Georges-Antoine Assi
3c4113f8a8 Merge branch 'master' into flashpoint-metadata-handler 2025-09-11 21:27:48 -04:00
Georges-Antoine Assi
ba2dcbff1b changes from review 2025-09-06 19:17:24 -04:00
Georges-Antoine Assi
06768abb06 [ROMM-2336] Config entry for EJS_CacheLimit 2025-09-06 19:10:44 -04:00
Michael Manganiello
43ab13f651 fix: Correctly mock async response.json() in unit tests
Fixes warnings triggered by unawaited coroutines in test cases.

- Before: `552 passed, 1 skipped, 78 warnings`
- After: `552 passed, 1 skipped, 61 warnings`
2025-09-05 00:14:13 -03:00
Michael Manganiello
e4e3928d1b misc: Apply import sorting 2025-09-04 11:17:00 -03:00
Michael Manganiello
d216bad78b misc: Add MetadataHandler's is_enabled method
Convert `MetadataHandler` to an abstract base class and add an
`is_enabled` class method that allows every metadata handler to
independently report whether it is enabled based on its configuration.

This avoids the need for global variables in the config module, allowing
us to change the enabled state of a metadata handler at runtime if
needed.
2025-09-03 22:13:28 -03:00
Georges-Antoine Assi
bb004fce6c fix tests 2025-09-02 09:40:43 -04:00
Georges-Antoine Assi
d760a2923e change options to settings 2025-09-02 09:10:32 -04:00
Georges-Antoine Assi
e42acbfafc add debug and controls 2025-09-02 08:38:11 -04:00
Georges-Antoine Assi
147a94c406 Load core options from config.yml 2025-09-01 21:16:37 -04:00
Michael Manganiello
568a989980 Merge pull request #2352 from rommapp/feat/task-sync-retroachievements-progress
feat: Add scheduled task to sync RetroAchievements progress
2025-08-31 16:21:46 -03:00
Michael Manganiello
a31a8504c2 feat: Add scheduled task to sync RetroAchievements progress
Add a new scheduled task that syncs RetroAchievements progress for all
users with a RetroAchievements username.

Environment variables:
- `ENABLE_SCHEDULED_RETROACHIEVEMENTS_PROGRESS_SYNC`: Enable or disable
  the task (default: `false`)
- `SCHEDULED_RETROACHIEVEMENTS_PROGRESS_SYNC_CRON`: Cron string to
  schedule the task (default: "0 4 * * *" - daily at 4 AM)
2025-08-31 01:57:26 -03:00
Michael Manganiello
c92bd48d23 Merge pull request #2350 from rommapp/fix/invalidate-cache-for-fixtures
fix: Invalidate fixture cache on file change
2025-08-30 21:26:28 -03:00
Michael Manganiello
2a0b273955 fix: Invalidate fixture cache on file change
The cache for fixture files was being set without a TTL, which meant
that updates to the fixture files were not reflected in the cache.

This change saves the MD5 hash of the fixture file in a different key,
and compares it to the current hash of the file before deciding whether
to update the cache.

Fixes #2347
2025-08-30 20:38:32 -03:00
Michael Manganiello
b2ea84b5bb misc: Create IGDB service adapter
Add a new service adapter for the IGDB API, to separate concerns with
RomM's handler for metadata. This adapter is agnostic to the handler and
only provides methods to interact with the API, and correctly return
typed responses.

The API authorization was also improved to not rely on decorating each
method that makes requests, but instead using an `aiohttp` middleware
to automatically add the required headers to each request.

Utils `mark_expanded` and `mark_list_expanded` where added to help
narrow the types of IGDB's expandable fields when we know they are
expanded, for `mypy` type checking.
2025-08-30 20:21:15 -03:00
Georges-Antoine Assi
382c4e4a25 remove test fle 2025-08-27 16:42:49 -04:00
Georges-Antoine Assi
410c65c544 add flashpoint metadata to roms_metadata 2025-08-27 16:30:03 -04:00
Georges-Antoine Assi
ef2546ec08 fix base handler filename 2025-08-27 12:40:16 -04:00
Georges-Antoine Assi
27928bd75b fix pytests 2025-08-27 11:41:24 -04:00
Georges-Antoine Assi
ee0110699d fix id column type 2025-08-27 11:23:27 -04:00
Georges-Antoine Assi
bf0d864d84 Add flashpoint as a metadata handler 2025-08-27 11:04:13 -04:00
Georges-Antoine Assi
2e690f49bb fix tests 2025-08-26 21:17:27 -04:00
Michael Manganiello
80291f4be1 misc: Move cache initialization to startup script
Guarantee that cache is initialized during startup, and only once,
instead of every time a `MetadataHandler` object is instantiated.

Also, improve logic to determine `fixtures` paths.
2025-08-13 12:26:15 -03:00
Michael Manganiello
00d7815889 fix: Improve performance on asset screenshot retrieval
When retrieving the related screenshot for a `Save` or `State`, we were
retrieving a very heavy representation of the associated `Rom` object,
only to iterate through its screenshots to find the one we needed.

This change modifies the `Save` and `State` models to directly query the
`Screenshot` model, which is much faster and more efficient. The
`DBScreenshotsHandler` has been updated to include a new `filter` method
that will simplify building queries using SQLAlchemy, something we can
extend to other handlers in the future.

Fixes #1925.
2025-08-10 15:33:13 -03:00
Michael Manganiello
ba21cbc1e1 misc: Separate tests folder from backend code
Create separate `tests/` folder for all tests. This will also simplify
not copying tests code into the Docker image.
2025-08-08 12:49:13 -03:00