Commit Graph

176 Commits

Author SHA1 Message Date
Georges-Antoine Assi
7241a60ca7 bump pydash 2026-02-16 21:58:10 -05:00
dependabot[bot]
bcdb1a1c74 Bump pillow from 10.4.0 to 12.1.1
Bumps [pillow](https://github.com/python-pillow/Pillow) from 10.4.0 to 12.1.1.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst)
- [Commits](https://github.com/python-pillow/Pillow/compare/10.4.0...12.1.1)

---
updated-dependencies:
- dependency-name: pillow
  dependency-version: 12.1.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-11 16:07:03 +00:00
Michael Manganiello
47c6f4a06b misc: Configure and run deptry (#2859)
`deptry` [1] is a tool to check for unused and missing dependencies in
Python projects.

By running it, we already found that `pydantic` should be added as a
direct dependency, that `types-*` packages can be moved to the `dev`
group, and that `user-agents` is no longer used and can be removed.

Ideally, a future PR can include the `trunk` related configuration to
run `deptry` automatically.

[1] https://deptry.com/
2026-01-03 19:33:40 -03:00
Georges-Antoine Assi
307a3f3dc3 bump joserfc to 1.3.5 2025-12-08 10:13:55 -05:00
Georges-Antoine Assi
6a1a344ba2 add tests for middlewares 2025-11-17 23:40:00 -05:00
Georges-Antoine Assi
551ff72a8a implement csrf middleware directly in repo 2025-11-17 21:12:29 -05:00
Georges-Antoine Assi
9c12ecf516 set backend as project root for ty 2025-11-17 10:14:04 -05:00
Georges-Antoine Assi
c79e2f14ad bump starlette to 0.49.1 2025-11-10 15:56:18 -05:00
Georges-Antoine Assi
c37ea7f923 bump authlib to 1.6.5 2025-10-20 08:47:24 -04:00
Georges-Antoine Assi
9a31135643 bump joserfc to 1.3.4 2025-10-06 09:20:01 -04:00
Jan van Brügge
133251a995 misc: Use proper SPDX identifier for license in pyproject.yaml 2025-10-01 17:33:47 +01:00
Georges-Antoine Assi
08bbb92e3c bump authlib to 1.6 2025-09-29 08:14:44 -04:00
Georges-Antoine Assi
347767e437 Update joserfc to 1.3 to fix CVA 2025-09-08 11:56:50 -04:00
Michael Manganiello
7b1cd8a079 misc: Allow minor upgrades for backend dependencies 2025-09-04 23:31:57 -03:00
Michael Manganiello
652df5d4cd feat: Add OpenTelemetry integration for API service
This change introduces OpenTelemetry dependencies, and uses
`opentelemetry-instrument` auto-instrumentation to allow users to
configure OpenTelemetry settings via environment variables [1].

The only custom environment variable added is
`OTEL_SERVICE_NAME_PREFIX`, which allows users to set a prefix to the
service names included by RomM to differentiate between `api`, `worker`,
and `watcher` services.

The instrumentation of RQ workers and file watcher will be added in
subsequent pull requests.

[1] https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
2025-08-12 09:18:59 -03:00
Georges-Antoine Assi
69079b2a90 Merge branch 'master' into find-best-match 2025-08-08 16:55:39 -04:00
Georges-Antoine Assi
659a3eb104 use jaro-winkler algo 2025-08-08 16:54:26 -04:00
Georges-Antoine Assi
de42333f2f Merge pull request #2232 from rommapp/native-7z-parse
Use native 7z to extract files and calculate hashes
2025-08-08 09:23:29 -04:00
Georges-Antoine Assi
b247a5c5bb small tweaks 2025-08-07 17:39:57 -04:00
Michael Manganiello
76db0ab98c feat: Migrate watcher to use watchfiles library
The `watchfiles` library supports event batching, which allows us to
process multiple filesystem changes in a single run.

This change also avoids database calls in the watcher as much as
possible.
2025-08-07 13:28:49 -03:00
Michael Manganiello
1e6bfffe92 Merge pull request #2229 from rommapp/misc/move-pytest-cov-to-test-extra
misc: Move pytest-cov dependency to test extra
2025-08-07 12:45:33 -03:00
Georges-Antoine Assi
a90bc75b92 Merge branch 'master' into romm-2142 2025-08-07 10:34:19 -04:00
Georges-Antoine Assi
00c9d740c7 Merge pull request #2227 from rommapp/worker-native-process
Migrate worker to native rq process
2025-08-07 10:04:21 -04:00
Michael Manganiello
0f8d0ffecd misc: Move pytest-cov dependency to test extra 2025-08-07 11:00:48 -03:00
Georges-Antoine Assi
c030d10c05 changes from bot review 2025-08-07 09:43:18 -04:00
Georges-Antoine Assi
836e7358c2 fix issues from code review 2025-08-07 09:34:43 -04:00
Michael Manganiello
097818d560 misc: Replace emoji dependency with constants
The `emoji` library has been removed, in favor of using constants for
the few emojis used in the codebase. This reduces memory usage, and
avoids calling `emojize` for Python to discover where to replace emojis
in pre-defined strings.
2025-08-07 09:50:14 -03:00
Michael Manganiello
5dcc1bd31c feat: Migrate scheduler to native RQ process
This change replaces our custom `scheduler.py` script with the
`rqscheduler` command, allowing us to run the RQ scheduler as a
separate, low-memory process, by avoiding the need to maintain
the Python app in memory.

* Remove `scheduler.py` script.
* Move initialization of scheduled tasks to `worker.py`.
* Update `docker/init_scripts/init` to start the `rqscheduler`
  command instead of the custom script.
* Fix scheduled tasks' `func` paths to the new project structure.
* Temporarily use a fork of `rq-scheduler` to support
  username and SSL settings in the `rqscheduler` command.
2025-08-06 19:13:12 -03:00
Georges-Antoine Assi
eb6498da61 custom similarity implementation 2025-08-06 10:27:04 -04:00
Georges-Antoine Assi
d6e80526fc bump joserfc 2025-07-19 21:25:24 -04:00
zurdi
dbe2566fe8 feat: integrate Levenshtein distance for improved fuzzy matching in SGDBBaseHandler 2025-07-15 09:31:04 +00:00
Michael Manganiello
cd9a6e60a3 misc: Upgrade FastAPI to v0.116
The latest minor version `0.116` of FastAPI changes the `standard` extra
to include extra dependencies to deploy to FastAPI Cloud, which we don't
need.

This change moves to the new `standard-no-fastapi-cloud-cli` extra,
which maintains the previous set of dependencies.
2025-07-12 13:31:22 -03:00
Michael Manganiello
a89028d7e4 misc: Upgrade py7zr to v1.0.0 2025-07-12 13:20:22 -03:00
Michael Manganiello
f1474582b9 fix: watchdog: Only subscribe to relevant filesystem events
The `watchdog` observer supports filtering events based on their type,
so unwanted events don't get dispatched.
2025-07-07 00:35:42 -03:00
Georges-Antoine Assi
b797e63fdf augment pytest with coverage 2025-07-05 23:20:52 -04:00
Georges-Antoine Assi
13b6fe2157 add test for updaing launchbox data 2025-07-05 22:04:03 -04:00
Georges-Antoine Assi
d2cd8270b3 start work on code coverage 2025-07-05 19:17:40 -04:00
Michael Manganiello
ea9def4b85 misc: Replace deprecated uvicorn.workers with uvicorn-worker
According to the `uvicorn` docs [1], the `uvicorn.workers.UvicornWorker`
class is deprecated and replaced by the `uvicorn-worker` package [2].

[1] https://www.uvicorn.org/deployment/#gunicorn
[2] https://github.com/Kludex/uvicorn-worker
2025-07-05 12:59:49 -03:00
Michael Manganiello
2a0c328771 misc: Remove Python dependencies not being directly used
We can see in the `uv.lock` changes that we aren't actually removing
anything, but as these dependencies are not being directly accessed,
it's better to rely on direct dependencies only, in case they change
in the future and these indirect dependencies are no longer needed.
2025-07-05 00:11:17 -03:00
Georges-Antoine Assi
e8f8f1621c complete migration to uv 2025-07-04 09:54:04 -04:00
Georges-Antoine Assi
440ed0c954 use migrate-to-uv 2025-07-04 09:31:41 -04:00
Georges-Antoine Assi
15f0f1803e set python version in pyproject 2025-07-04 09:30:00 -04:00
Michael Manganiello
f96adeeaee misc: Upgrade to Python 3.13
Small changes to upgrade Python to version 3.13, and fixes based on a
`pyupgrade` run using the `--py313-plus` flag.
2025-07-03 23:37:00 -03:00
Michael Manganiello
195a1892d0 misc: Improve API docs and annotations for rom endpoints
* Add type annotations for FastAPI header, query, and path parameters.
* Add type annotations for request body content.
* Update docstrings to clarify endpoint functionality, and remove
  unnecessary details.
2025-06-29 11:56:01 -03:00
Georges-Antoine Assi
2e677decea Merge branch 'master' into romm-403 2025-06-09 17:20:17 -04:00
Michael Manganiello
c008cab4d7 misc: Move back to upstream streaming-form-data dependency
The breaking code in `streaming-form-data` has been fixed, and Poetry
also was patched based on @gantoine's proposed fix. This allows us
to use the official releases again instead of a fork.
2025-06-09 15:18:29 -03:00
Michael Manganiello
fe1a9ce2a7 fix: Use aiohttp for RetroAchievements API calls
This change replaces the `httpx` client with `aiohttp` for the
RetroAchievements API service.

The main reason for this change is that `httpx` has an unavoidable log
line with `INFO` level, which includes the request full URL, containing
the user's API key.

`httpx` has had an
[open discussion](https://github.com/encode/httpx/discussions/2765)
regarding this security issue for almost two years.

The change to `aiohttp` is painless, and would allow us to migrate more
of the codebase to it in the future, to avoid leaking sensitive
information in logs.
2025-06-09 09:59:56 -03:00
Georges-Antoine Assi
dcf622ed56 Merge branch 'master' into romm-403 2025-06-08 20:06:44 -04:00
Georges-Antoine Assi
3c2f32053b fix typo + bump redis + change heartbeat keys 2025-06-04 11:34:08 -04:00
Georges-Antoine Assi
ef0d84f589 Merge branch 'master' into romm-403 2025-05-29 09:58:35 -04:00