|
| 1 | +# Proposal : Tag-Based Version Management System for DISCOVER Cookbook |
| 2 | + |
| 3 | +## Abstract |
| 4 | + |
| 5 | +This proposal outlines an implementation strategy for a tag-based version management system for the DISCOVER Cookbook following standard documentation versioning practices. The implementation will enable users to seamlessly navigate between different cookbook editions through a simple version selector integrated with the existing Jupyter Book interface, while maintaining the current GitHub Pages infrastructure. |
| 6 | + |
| 7 | +## Detailed description |
| 8 | + |
| 9 | +### Current Architecture Analysis |
| 10 | + |
| 11 | +The DISCOVER Cookbook currently has no formal versioning system: |
| 12 | + |
| 13 | +- Current version is in the main branch, deployed at https://discover-cookbook.numfocus.org |
| 14 | + |
| 15 | +This structure creates several critical challenges: |
| 16 | + |
| 17 | +1. **Hidden Versions**: Users can't tell which version they're viewing or that other versions exist, so they might miss updated recommendations. |
| 18 | + |
| 19 | +2. **Hard to Navigate**: Switching between versions requires typing different URLs or navigating through GitHub, making for a poor user experience. |
| 20 | + |
| 21 | +3. **Content Evolution Opacity**: Users can't easily see how DEI recommendations have changed over time. |
| 22 | + |
| 23 | + |
| 24 | +### Solution Architecture |
| 25 | + |
| 26 | +My implementation will use a tag-based versioning approach : |
| 27 | + |
| 28 | +1. **Tag-Based Version Management:**: |
| 29 | + - Maintain a single active branch (main) |
| 30 | + - Use Git tags to mark specific numeric versions (1.0, 2.0, etc.) |
| 31 | + - Main branch will be labeled as "2.0-dev" (or current version + "-dev") |
| 32 | + - Consider integrating versioneer to display which version is being rendered |
| 33 | + - Deploy each tagged version to its corresponding URL path |
| 34 | + |
| 35 | +2. **URL Structure**: |
| 36 | + - Latest development version: discover-cookbook.numfocus.org/ (main branch as 2.0-dev) |
| 37 | + - Released versions: discover-cookbook.numfocus.org/v1.0/, discover-cookbook.numfocus.org/v2.0/ |
| 38 | + - Version-specific pages: discover-cookbook.numfocus.org/v1.0/04_venue_selection/ |
| 39 | + - Implement redirects from root paths to appropriate versioned paths (e.g., discover-cookbook.numfocus.org/05_venue_selection/ → discover-cookbook.numfocus.org/v1.0/05_venue_selection/) |
| 40 | + |
| 41 | + |
| 42 | +3. **Development Environment**: |
| 43 | + - Create separate scripts for local development and deployment |
| 44 | + - Ensure contributors can iterate on content locally without versioning complexity |
| 45 | + - Local preview will default to development version |
| 46 | + |
| 47 | +4. **Version UI Components**: |
| 48 | + - Simple version selector in an appropriate location within the existing UI |
| 49 | + - Outdated version notification for non-latest versions(via banner at top) |
| 50 | + |
| 51 | +### User Benefits |
| 52 | + |
| 53 | +This implementation delivers significant user experience improvements: |
| 54 | + |
| 55 | +1. **Clear Version Context**: Users immediately know which version they're viewing and what other versions exist. |
| 56 | + |
| 57 | +2. **Accessible Navigation**: Simple method for switching between versions. |
| 58 | + |
| 59 | +3. **Historical Transparency**: Easy access to how DEI recommendations have evolved over time. |
| 60 | + |
| 61 | + |
| 62 | +### User Scenarios |
| 63 | + |
| 64 | +**Scenario 1: Conference Organizer - Version Comparison** |
| 65 | +Sunita is organizing a conference and needs to compare current and previous recommendations: |
| 66 | + |
| 67 | +- She visits discover-cookbook.numfocus.org and sees she's viewing v2.0 |
| 68 | +- She notices the version selector in the navigation |
| 69 | +- She clicks to view v1.0 while viewing the "venue selection" section |
| 70 | +- The system navigates her to the equivalent section in v1.0 |
| 71 | +- She can easily toggle between versions to compare approaches |
| 72 | +<br><br> |
| 73 | + |
| 74 | +<br><br> |
| 75 | + |
| 76 | +**Scenario 2: First-time Visitor - Version Awareness** |
| 77 | +Karan discovers the cookbook through social media: |
| 78 | + |
| 79 | +- He lands on discover-cookbook.numfocus.org (latest version) |
| 80 | +- The version indicator shows he's viewing the current version (v2.0) |
| 81 | +- He's aware previous versions exist through the version selector |
| 82 | +- If he follows an old link to v1.0, he'll see a banner indicating newer content exists |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | +## Implementation |
| 87 | + |
| 88 | +My implementation follows a systematic approach that respects the current project architecture: |
| 89 | + |
| 90 | +### 0. Design Phase |
| 91 | +I will first create detailed design documentation that includes: |
| 92 | + |
| 93 | +- Tag-based versioning schema |
| 94 | +- UI mockups for version selection (minimal changes to existing design) |
| 95 | +- Deployment architecture |
| 96 | + |
| 97 | +### 1. Tag-Based Version Structure |
| 98 | + |
| 99 | +I will implement a approach that: |
| 100 | + |
| 101 | +- Uses Git tags to mark specific versions |
| 102 | +- Creates a simple mapping file to track tagged versions |
| 103 | +- Requires minimal infrastructure changes |
| 104 | + |
| 105 | +### 2. Enhanced GitHub Actions Workflow |
| 106 | + |
| 107 | +I will configure the GitHub Actions workflow to: |
| 108 | + |
| 109 | +- Build and deploy tagged versions to their respective directories |
| 110 | +- Maintain the main branch deployment at the root path |
| 111 | +- Preserve the CNAME file for the custom domain |
| 112 | +### 3. Version Selector UI Component |
| 113 | + |
| 114 | +I will implement an accessible, user-friendly version selector component: |
| 115 | + |
| 116 | +- Integrates with the existing Jupyter Book UI |
| 117 | +- Provides a clear indicator of the current version |
| 118 | +- Offers a simple method to switch to other versions |
| 119 | + |
| 120 | +<br><br> |
| 121 | + |
| 122 | +<br><br> |
| 123 | + |
| 124 | +### 4. Outdated Version Notification Banner |
| 125 | + |
| 126 | +For non-latest versions, I will implement a notification banner: |
| 127 | + |
| 128 | +- Subtle indicator that appears in an unobtrusive location |
| 129 | +- Brief message indicating a newer version exists |
| 130 | +- Link to the equivalent page in the latest version |
| 131 | +- Designed to complement the existing UI without disrupting the user experience |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | +This banner ensures users are immediately aware when viewing outdated content while providing a direct path to the latest version. |
| 137 | + |
| 138 | +### 5. Cross-Version Navigation System |
| 139 | + |
| 140 | +I will develop a simple navigation system between versions: |
| 141 | + |
| 142 | +- Maps common pages across versions |
| 143 | +- Falls back to the main page when direct equivalents aren't available |
| 144 | +- Uses a straightforward URL-based approach |
| 145 | + |
| 146 | +### 6. Integration with Jupyter Book |
| 147 | + |
| 148 | +I will make minimal changes to the Jupyter Book configuration to: |
| 149 | + |
| 150 | +- Load version management components |
| 151 | +- Integrate with the existing theme |
| 152 | +- Preserve current customizations |
| 153 | +- Support the version selector UI |
| 154 | + |
| 155 | +This will involve updating the _config.yml file to include the necessary JavaScript and CSS files while maintaining compatibility with the existing configuration. |
| 156 | + |
| 157 | +### 7. Implementation Dependencies |
| 158 | + |
| 159 | +- **Step 0** (Signed-Off Design) defines the versioning plan using Git tags |
| 160 | +- **Step 1** (Version Architecture) is foundational and must be implemented first |
| 161 | +- **Step 2** (GitHub Actions Workflow) can be developed in parallel with Step 1 |
| 162 | +- **Steps 3-4** (UI Components) depend on Step 1 |
| 163 | +- **Step 5** (Cross-Version Navigation) depends on Steps 1-3 |
| 164 | +- **Step 6** (Jupyter Book Integration) integrates all previous components |
| 165 | + |
| 166 | +### Implementation Timeline |
| 167 | + |
| 168 | +**Phase 1: Foundation & Infrastructure (Weeks 1-3)** |
| 169 | +- Develop version data architecture |
| 170 | +- Configure GitHub Actions workflow |
| 171 | +- Create initial deployment tests |
| 172 | + |
| 173 | +**Phase 2: Core UI Development (Weeks 4-6)** |
| 174 | +- Implement version selector component |
| 175 | +- Create outdated version notification banner |
| 176 | +- Develop basic cross-version navigation |
| 177 | + |
| 178 | +**Phase 3: Testing & Refinement (Weeks 7-9)** |
| 179 | +- Enhance cross-version navigation |
| 180 | +- Implement special case handling |
| 181 | +- Conduct cross-browser testing |
| 182 | +- Verify accessibility compliance |
| 183 | + |
| 184 | +**Phase 4: Refinement & Documentation (Weeks 10-12)** |
| 185 | +- Optimize performance |
| 186 | +- Refine responsive behavior |
| 187 | +- Create technical documentation |
| 188 | +- Prepare user guides |
| 189 | + |
| 190 | +## Websites following a similar approach |
| 191 | +- https://pandas.pydata.org/docs/ |
| 192 | +- https://scikit-learn.org/stable/ |
| 193 | +- https://matplotlib.org/stable/ |
| 194 | + |
| 195 | +## Alternative Approach |
| 196 | + |
| 197 | +I've evaluated several alternative approaches based on thorough analysis of documentation versioning systems, I came to the conclusion that these two approaches are best according to industry standards with minimal changes in repository structure: |
| 198 | + |
| 199 | +### Read the Docs Migration |
| 200 | + |
| 201 | +**Approach**: Migrate from GitHub Pages to Read the Docs platform. |
| 202 | + |
| 203 | +**Advantages**: |
| 204 | +- Built-in versioning system |
| 205 | +- Established version selector UI |
| 206 | + |
| 207 | +**Disadvantages**: |
| 208 | +- Requires significant migration effort |
| 209 | +- Disrupts existing deployment workflow |
| 210 | +- Requires adapting Jupyter Book configuration for RTD |
| 211 | +- Changes contributor workflow |
| 212 | +- This also requires a paid account to run ad free |
| 213 | +- Depends on a more complex service than just hosting static webpages, which can be done on a multitude of services. |
| 214 | + |
| 215 | +## Websites following a similar approach |
| 216 | +- https://jupyter-sphinx.readthedocs.io/en/latest/setup.html |
| 217 | +- https://flask.palletsprojects.com/en/stable/ |
| 218 | +- https://docs.momepy.org/en/stable/ |
| 219 | + |
| 220 | + |
0 commit comments