
Migrating Project Structure Versions
Source:vignettes/project-migration-guide.Rmd
project-migration-guide.Rmd
From v5.0.0 to v5.3.0
Introduction
This vignette describes how to migrate from the old project structure to the new structure implemented in PR #692. The new structure provides improved, harmonized, and easier-to-use project organization.
You only need to run the migration if your project was created with esqlabsR v5.2.0 or earlier. It is necessary to run the migration process only once per project.
Key Changes
Folder Structure Changes
- The
Parameters
folder has been renamed toConfigurations
- Population-related files are now stored in
PopulationsCSV
folder
Automatic Migration Support
Backwards Compatibility
The package includes built-in support for automatically handling project configurations from previous versions (v5). When loading an older project configuration file, the package will:
- Automatically detect the older format
- Load and convert the configuration to the new format
- Display a warning message informing you that you’re using an older format
Updating Your Configuration
To update your project configuration to the new format:
- Load your existing configuration:
projectConfig <- createProjectConfiguration("path/to/old/ProjectConfiguration.xlsx")
- Save it in the new format:
projectConfig$save("path/to/new/ProjectConfiguration.xlsx")
This will automatically: - Rename all properties to match the new
structure - Remove deprecated properties (like
compoundPropertiesFile
) - Preserve all your existing paths
and settings
Tip: While the package can read old configuration files, it’s recommended to update to the new format to ensure compatibility with future versions.
Manual Migration Steps
- Update Folder Structure
# Old structure
project/
├── Parameters/
│ └── PopulationParameters.xlsx
└── ...
# New structure
project/
├── Configurations/
│ └── Populations.xlsx
├── PopulationsCSV/
└── ...
- Update Configuration Files
- Rename
PopulationParameters.xlsx
toPopulations.xlsx
- Move configuration files to the new
Configurations
folder - Remove any compound property configurations from project configuration files
Code Updates
Some functions and properties have been renamed, thus project code using previous project structure will need to be updated.
# Old code
projectConfig <- createDefaultProjectConfiguration(...) # Deprecated
projectConfig$populationParamsFile # Old property
# New code
projectConfig <- createProjectConfiguration(...) # New recommended function
projectConfig$populationsFile # New property
Best Practices
- Use the new
createProjectConfiguration()
function instead of the deprecatedcreateDefaultProjectConfiguration()
- Store all configuration files in the
Configurations
folder - Keep population-related CSV files in the
PopulationsCSV
folder