This repository was archived by the owner on Jan 9, 2026. It is now read-only.
enable custom mapping in the .env#57
Merged
gantoine merged 2 commits intorommapp:mainfrom Jun 7, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements custom mapping functionality to allow system names used in RomM to be mapped to device-specific directory names via the CUSTOM_MAPS environment variable. Key changes include adding new functions in platform_maps.py to load and initialize the custom map, integrating these mappings into filesystem directory resolution in filesystem.py, and updating the API and template files to support custom mappings.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| RomM/platform_maps.py | Adds functions to load and initialize custom mappings from env var |
| RomM/filesystem.py | Integrates custom mapping checks for resolving platform directory names |
| RomM/env.template | Updates instructions for setting up CUSTOM_MAPS |
| RomM/api.py | Initializes env maps on API calls and adds conditional branches for custom mapping |
Comments suppressed due to low confidence (1)
RomM/api.py:256
- The use of 'pass' in this branch provides no clear action; consider adding a comment to explain its purpose or implementing the intended logic to improve clarity.
if (platform_maps._env_maps and platform_slug in platform_maps._env_platforms and platform_slug not in self._exclude_platforms):
12f5722 to
ea837af
Compare
31c4019 to
a15d4df
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This commit enables custom mapping from the system names used in RomM to the directory name used on the device.
Checklist
Please check all that apply.