Skip to content
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
Percentnineteen:custom_mapping
Jun 7, 2025
Merged

enable custom mapping in the .env#57
gantoine merged 2 commits intorommapp:mainfrom
Percentnineteen:custom_mapping

Conversation

@Percentnineteen
Copy link
Contributor

@Percentnineteen Percentnineteen commented Jun 6, 2025

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.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR

@gantoine gantoine requested review from Copilot and gantoine June 6, 2025 20:05
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, very clean

Copy link
Member

@gantoine gantoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@gantoine gantoine merged commit a2a9e02 into rommapp:main Jun 7, 2025
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants