Migrate configuration from JSON to TOML (closes #58)#306
Merged
SimmerV merged 5 commits intoMeshAddicts:developfrom Mar 7, 2026
Merged
Migrate configuration from JSON to TOML (closes #58)#306SimmerV merged 5 commits intoMeshAddicts:developfrom
SimmerV merged 5 commits intoMeshAddicts:developfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates MeshInfo’s primary configuration format from JSON to TOML while preserving legacy config.json support via fallback loading and deprecation warnings.
Changes:
- Added
config.toml.sampleand updated tests to validate the new sample while keepingconfig.json.samplevalid. - Updated
Config.load()to preferconfig.toml, fall back toconfig.jsonwith a deprecation warning, and adjusted related error/help messaging. - Updated Docker compose mounts, backup behavior, migration-script messaging,
.gitignore, and docs to reference TOML.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
config.py |
Implements TOML-first config loading with JSON fallback and updates related messaging/helpers. |
config.toml.sample |
Adds the canonical sample configuration in TOML format. |
docker-compose.yml |
Mounts config.toml into the container instead of config.json. |
docker-compose-dev.yml |
Mounts config.toml into the dev container instead of config.json. |
memory_data_store.py |
Updates backup routine to include config.toml when present (else config.json). |
scripts/migrate_json_to_postgres.py |
Updates user-facing log messages to reflect TOML/JSON config support. |
tests/test_config_sample_is_valid_json.py |
Adds TOML sample validation and keeps legacy JSON sample validation. |
tests/test_assets_present.py |
Ensures config.toml.sample is treated as a required repo asset. |
README.md |
Updates setup instructions to prefer TOML (with legacy JSON mention). |
POSTGRES.md |
Updates PostgreSQL configuration examples/instructions to TOML. |
.gitignore |
Ignores config.toml in addition to config.json. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
config.toml.sampleas the new primary config format, using Python's built-intomllib(no new dependencies)config.pyto loadconfig.tomlfirst with automatic fallback toconfig.json+ deprecation warning.gitignore, tests, and docs (README, POSTGRES.md)Notes
config.jsondeployments continue to work — they'll see a deprecation warning in logs