- 
                Notifications
    You must be signed in to change notification settings 
- Fork 65
docs(config): docs for new config system FXC-3298 #2917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
8 files reviewed, 1 comment
| Diff CoverageDiff: origin/develop...HEAD, staged and unstaged changesNo lines with coverage information in this diff. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Hey @FilipeFcp thanks for having a look! I'm not sure, did you fully build the docs? These sections are not empty in the rst but they contain  | 
| Docs will be https://docs.flexcompute.com/projects/tidy3d/en/yaugenst-flex-config-docs/ as soon as it finishes building | 
0d22caa    to
    dcec043      
    Compare
  
    2046110    to
    e5abfa6      
    Compare
  
    e5abfa6    to
    4973ee6      
    Compare
  
    
I split out the docs changes from #2711 to make the diff a bit more manageable.
Greptile Overview
Updated On: 2025-10-22 07:38:00 UTC
Greptile Summary
This PR adds comprehensive documentation for the new unified configuration system in Tidy3D. The changes introduce a dedicated configuration section covering the new
tidy3d.config.configobject, platform-specific file locations, priority rules, profile management, and migration guidance from the legacy~/.tidy3d/configapproach. The documentation updates span multiple files: a new configuration guide atdocs/configuration/index.rst, a migration guide atdocs/configuration/migration.rst, new API reference atdocs/api/configuration.rst, and refactored references indocs/index.rst,docs/install.rst, anddocs/extras/index.rst. These changes support a broader configuration system refactoring (split from PR #2711) that moves from a class-basedTidy3dConfigto a module-levelconfigobject, adopts platform-appropriate config directories (like~/.config/tidy3don Linux/macOS and%APPDATA%\\tidy3don Windows), and introduces profile-based configuration management. The documentation maintains backward compatibility guidance for the deprecatedEnvhelper while encouraging migration to the new API.Important Files Changed
Changed Files
~/.tidy3dto new platform-specific config systemTidy3dConfigclass toconfigobject, plus formatting fixConfidence score: 5/5
Sequence Diagram
sequenceDiagram participant User participant CLI as CLI/Command Line participant ConfigAPI as Configuration API participant ConfigFiles as Config Files (TOML) participant EnvVars as Environment Variables participant Manager as ConfigManager participant Docs as Documentation System User->>CLI: "tidy3d configure --apikey=XXX" CLI->>ConfigAPI: configure(apikey) ConfigAPI->>Manager: get_manager() Manager->>ConfigFiles: Check ~/.config/tidy3d/config.toml ConfigFiles-->>Manager: Load existing config Manager->>ConfigFiles: Write web.api_key ConfigFiles-->>Manager: Confirm save Manager-->>ConfigAPI: Configuration saved ConfigAPI-->>CLI: Success message CLI-->>User: "Configuration complete" User->>User: "import tidy3d as td" User->>ConfigAPI: "from tidy3d.config import config" ConfigAPI->>Manager: Initialize manager Manager->>EnvVars: Check TIDY3D_* variables EnvVars-->>Manager: Return overrides Manager->>ConfigFiles: Read config.toml ConfigFiles-->>Manager: Return base settings Manager->>ConfigFiles: Read profiles/<name>.toml ConfigFiles-->>Manager: Return profile overrides Manager->>Manager: Merge settings (priority order) Manager-->>ConfigAPI: Return unified config User->>ConfigAPI: "config.logging.level = 'DEBUG'" ConfigAPI->>Manager: Update runtime value Manager-->>ConfigAPI: Value updated User->>ConfigAPI: "config.save()" ConfigAPI->>Manager: save() Manager->>Manager: Strip env var overrides Manager->>ConfigFiles: Write profiles/<name>.toml ConfigFiles-->>Manager: Confirm write Manager-->>ConfigAPI: Save complete ConfigAPI-->>User: "Settings persisted" User->>ConfigAPI: "config.switch_profile('dev')" ConfigAPI->>Manager: switch_profile('dev') Manager->>ConfigFiles: Load profiles/dev.toml ConfigFiles-->>Manager: Return dev settings Manager->>Manager: Apply profile settings Manager-->>ConfigAPI: Profile switched ConfigAPI-->>User: "Using 'dev' profile" User->>CLI: "tidy3d config migrate" CLI->>Manager: migrate_legacy_config() Manager->>ConfigFiles: Check ~/.tidy3d/config.toml ConfigFiles-->>Manager: Return legacy config Manager->>ConfigFiles: Copy to ~/.config/tidy3d/ ConfigFiles-->>Manager: Migration complete Manager-->>CLI: Success CLI-->>User: "Migration complete" Docs->>ConfigAPI: Import configuration docs ConfigAPI-->>Docs: "Provide API reference" Docs->>Docs: Generate Sphinx documentation Docs-->>User: "Render docs/configuration/index.rst"