| title | layout |
|---|---|
Documentation |
default |
As documented in /docs/technical/svn_update_process.md, bcontrol currently uses SVN for updating multiple components:
- Main Code Directory
- Protocols Directory
- Data Files Directory
- Settings Files Directory
- Log Files (weekly archiving)
The SVN update occurs primarily through the update_folder function in runrats.m during protocol loading.
-
Replace SVN with Git/GitHub for Protocol Management
- Move protocol repositories from SVN to GitHub
- Enable versioning and tracking of protocols in a modern VCS
- Facilitate collaboration on protocol development
- Improve protocol review processes
-
Update Codebase to Support Multiple VCS
- Refactor the
update_folderfunction to support both SVN and Git - Eventually migrate all components to Git
- Refactor the
- Analyze all SVN dependencies in the codebase
- Determine which GitHub APIs and libraries will be needed
- Evaluate impact on existing workflows
- Identify necessary MATLAB interfaces for Git operations
- Create GitHub repositories for all existing protocols
- Migrate protocol history from SVN to Git
- Define branching strategy for protocol development
- Update documentation on protocol management
- Create a Git interface class/module similar to existing SVN functions
- Refactor
update_folderto detect repository type (SVN or Git) - Implement Git update functionality
- Add proper error handling for Git operations
- Update configuration to support Git repository URLs
% Pseudo-code for refactored update_folder function
function update_folder(folder_path)
% Detect repository type
if is_git_repository(folder_path)
update_git_repository(folder_path);
elseif is_svn_repository(folder_path)
update_svn_repository(folder_path);
else
% Handle case where folder is not under version control
warning('Folder is not under version control');
end
end- Conduct thorough testing of Git update functionality
- Test with real protocols in a staging environment
- Develop migration guide for lab members
- Plan gradual rollout strategy
- Monitor for issues during transition period
- Determine secure methods for GitHub authentication
- Consider using Personal Access Tokens or deploy keys
- Ensure credentials are stored securely
- Ensure system can still function without internet access
- Implement graceful failure if updates cannot be performed
- Provide Git/GitHub training for lab members
- Document new workflow for protocol development and updates
- Complete migration from SVN to Git for all system components
- Implement CI/CD pipelines for testing protocols
- Add automated validation of protocol changes
- Consider containerization of the environment for consistency
- Phase 1: 1-2 weeks
- Phase 2: 2-3 weeks
- Phase 3: 3-4 weeks
- Phase 4: 2-3 weeks
- Total estimated time: 2-3 months
- GitHub API Documentation: https://docs.github.com/en/rest
- MATLAB Git Integration examples
- Team members with Git expertise