Commit Graph

91 Commits

Author SHA1 Message Date
Georges-Antoine Assi
fc85fcb6a9 fix pytests 2024-09-09 00:01:37 -04:00
Georges-Antoine Assi
1ea1b326d3 move hashes to rom model 2024-08-11 22:38:22 -04:00
Georges-Antoine Assi
56037070fb only calc hashes exlpicit 2024-08-11 19:36:52 -04:00
Georges-Antoine Assi
0139e3a13a fix tests 2024-07-27 16:56:13 -04:00
Georges-Antoine Assi
f01f5ce5b5 trunk fixes 2024-07-27 16:38:57 -04:00
Georges-Antoine Assi
ecc021e824 Merge branch 'master' into calc-file-hashes-roms 2024-07-27 12:17:18 -04:00
Michael Manganiello
aced1f1ff2 misc: Migrate IGDBBaseHandler to async
Convert `IGDBBaseHandler` methods to be asynchronous, and use an `httpx`
async client, instead of `requests` sync client.

This change also removes the direct dependency with `requests`, as the
project no longer uses it, preferring `httpx` instead.
2024-07-26 21:19:01 -03:00
Georges-Antoine Assi
efc0b75cdb Merge branch 'master' into calc-file-hashes-roms 2024-07-25 22:42:46 -04:00
Michael Manganiello
959e896aa3 misc: Replace pytest-vcr dependency with pytest-recording
`pytest-vcr` [1] is no longer maintained (last commit was in 2020), and
`VCR.py` recommends [2] `pytest-recording` instead.

Also, `pytest-vcr` does not correctly support `httpx` [3].

This change also removes unused cassettes.

[1] https://github.com/ktosiek/pytest-vcr
[2] https://vcrpy.readthedocs.io/en/latest/usage.html#pytest-integration
[3] https://github.com/ktosiek/pytest-vcr/issues/46
2024-07-24 12:39:41 -03:00
Michael Manganiello
7c6dfa8e50 feat: Use ContextVar to share httpx AsyncClient instance between requests 2024-07-23 01:29:32 -03:00
Michael Manganiello
6d8a8714f5 misc: Migrate MobyGamesHandler to async
Convert `MobyGamesHandler` methods to be asynchronous, and use an
`httpx` async client, instead of `requests` sync client.
2024-07-22 01:09:36 -03:00
Georges-Antoine Assi
2e91c440e3 Read into mem in chunks 2024-07-16 17:42:25 -04:00
Georges-Antoine Assi
2b2ff875ee Calculate hashes for rom files 2024-07-15 18:27:29 -04:00
Georges-Antoine Assi
7530fdd576 mega refactor of pr 2024-07-01 15:12:07 -04:00
Michael Manganiello
8281d5679b misc: Split database handler logic to get/list entities
The current implementation for some of the database handlers, where the
same method is used to retrieve either a single entity (when an `id` is
passed), a list of entities, or `None`, makes the typing and overall
design more complex.

This change simplifies database handlers, by having two separate methods
where appropiate:

* A method that receives an `id`, and returns either an entity, or `None`.
* A method that optionally receives filters, and returns (depending on
  the current handler implementation) a list of entities, or a `Select`
  object that allows chaining more SQLAlchemy operations.
2024-06-30 13:12:48 -03:00
zurdi
ed67cfff12 fixed unit tests 2024-06-17 18:05:48 +02:00
Georges-Antoine Assi
652047ad66 update test cassettes 2024-06-15 12:18:01 -04:00
Georges-Antoine Assi
a62794ba48 fix scan rom test 2024-05-22 09:47:15 -04:00
Georges-Antoine Assi
2b60402a04 start fixing mypy issues 2024-05-21 19:22:14 -04:00
Georges-Antoine Assi
a7cf0d389a run trunk format on all files 2024-05-21 10:18:13 -04:00
Georges-Antoine Assi
880345f20c ruff-only pre-commit 2024-05-18 12:05:57 -04:00
Georges-Antoine Assi
2749aaee4a rename back to old names 2024-05-05 16:59:30 -04:00
Georges-Antoine Assi
9ad28f3294 more refactoring again 2024-05-05 16:32:40 -04:00
Georges-Antoine Assi
def2608c28 refactor db handlers 2024-05-05 15:46:07 -04:00
Georges-Antoine Assi
1a2c914045 refactor handlers out into own files 2024-05-05 12:45:56 -04:00
Georges-Antoine Assi
fd196165b8 add fake redis for tests 2024-03-26 20:37:38 -04:00
Georges-Antoine Assi
f67b984cbb Hotfix scanning via watcher 2024-02-09 18:16:59 -05:00
Georges-Antoine Assi
b4a48690b0 Merge branch 'master' into asset-refactor 2024-02-06 17:00:01 -05:00
Zurdi
dac6a4c14b clean utils folder 2024-02-06 22:58:06 +01:00
Georges-Antoine Assi
8e6769cd6a Merge branch 'master' into asset-refactor 2024-02-06 16:54:55 -05:00
Zurdi
3de72d075c fixed tests 2024-02-05 11:28:39 +01:00
Georges-Antoine Assi
bf48b9037f simplify example compose 2024-02-02 00:03:30 -05:00
Georges-Antoine Assi
aae717b34e update some conftest 2024-02-01 23:27:33 -05:00
Zurdi
066f640089 fixed tests 2024-02-01 09:48:47 +01:00
Zurdi
37c359fa97 path_cover and url_cover refactored 2024-02-01 00:22:44 +01:00
Georges-Antoine Assi
0ca6d74c26 Add file_name_no_ext column 2024-01-20 15:09:11 -05:00
Zurdi
720a9617bc fixed unit tests 2024-01-19 15:10:01 +01:00
Georges-Antoine Assi
81b5bcf9ba refactor handler names 2024-01-18 14:04:35 -05:00
Georges-Antoine Assi
86b55c68a3 fix circular import + migration 15 downgrade 2024-01-18 13:44:07 -05:00
Georges-Antoine Assi
9495942084 Fix the rest of the tests 2024-01-17 10:57:07 -05:00
Georges-Antoine Assi
7963e243dc Fix batch of test fixes 2024-01-17 10:26:37 -05:00
Zurdi
0af3ffb86f refactor stats and user handlers 2024-01-17 01:43:16 +01:00
Zurdi
77694c6f0e Merge remote-tracking branch 'origin/stats-endpoint' into refactor/backend 2024-01-16 22:25:27 +01:00
Georges-Antoine Assi
33645641b8 Add stats endpoint + refactor rom file size 2024-01-16 11:06:05 -05:00
Zurdi
93f6cb7651 Merge branch 'feature/manage_config_from_ui' into refactor/backend 2024-01-13 02:17:19 +01:00
Zurdi
fb1c02459e added methods to add and remove platforms bindings to config manager 2024-01-11 00:29:41 +01:00
Georges-Antoine Assi
75f94067cc Add basic tests around endpoints and models 2024-01-10 10:00:10 -05:00
Georges-Antoine Assi
cdafd680a0 Merge branch 'master' into romm-55 2024-01-05 15:38:05 -05:00
Georges-Antoine Assi
5f7f860a5c Eliminate 400s on scan when trying to fetch cover but no igdb ID 2024-01-05 14:27:49 -05:00
Georges-Antoine Assi
92759ff0b3 Fix tests 2023-12-30 21:20:59 -05:00