File Browser Interface

The Rastion platform provides a comprehensive file browser interface that makes it easy to navigate, view, and manage your optimization repositories. The interface is designed to be familiar to developers, with a GitHub-like experience for repository management.

Overview

The file browser is your central hub for managing optimization components, providing intuitive navigation and powerful file management capabilities.

Hierarchical Navigation

Browse through folders and files with intuitive breadcrumb navigation

File Viewing

View code, configurations, and documentation directly in the browser

Upload Interface

Drag-and-drop upload for new repositories and files

Download Options

Download individual files or entire repositories

Interface Components

The navigation bar provides quick access to key functions:

┌─────────────────────────────────────────────────────────┐
│ [Home] > [Repositories] > [username] > [repository-name] │
│                                    [Upload] [Download]   │
└─────────────────────────────────────────────────────────┘
  • Breadcrumb Navigation: Click any level to navigate up the hierarchy
  • Upload Button: Quick access to upload new files or folders
  • Download Button: Download the current folder or repository

File Tree View

The main interface shows your repository structure:

📁 my-optimization-repo/
├── 📄 qubot.py
├── 📄 config.json
├── 📄 requirements.txt
├── 📄 README.md
├── 📁 tests/
│   ├── 📄 test_optimizer.py
│   └── 📄 test_data.json
└── 📁 docs/
    ├── 📄 algorithm.md
    └── 📁 images/
        └── 🖼️ flowchart.png

File Information Panel

When you select a file, detailed information is displayed:

  • File Type: Automatically detected file type with appropriate icon
  • File Size: Size in human-readable format
  • Last Modified: Timestamp of last modification
  • Author: User who last modified the file
  • Actions: View, edit, download, or delete options

Navigate through your repository hierarchy with ease:

  1. Root Level: Start at your repository root
  2. Folder Navigation: Click folder names to enter directories
  3. Breadcrumb Links: Click any breadcrumb to jump to that level
  4. Back Navigation: Use browser back button or breadcrumbs

Search Functionality

Find files and content quickly:

  • File Name Search: Search for files by name
  • Content Search: Search within file contents (text files only)
  • Filter by Type: Filter results by file type
  • Advanced Search: Use regex patterns for complex searches

Sorting and Filtering

Organize your view with sorting and filtering options:

  • Sort by Name: Alphabetical sorting (A-Z or Z-A)
  • Sort by Date: Most recent or oldest first
  • Sort by Size: Largest or smallest first
  • Filter by Type: Show only specific file types

File Operations

Viewing Files

The file browser supports viewing various file types:

Code Files

# Example: qubot.py
from qubots import BaseOptimizer
import ortools

class ORToolsMaxCutOptimizer(BaseOptimizer):
    def __init__(self, **params):
        super().__init__(**params)
        self.time_limit = params.get('time_limit', 300.0)

    def optimize(self, problem):
        # Implementation here
        pass

Configuration Files

{
  "type": "optimizer",
  "entry_point": "qubot",
  "class_name": "ORToolsMaxCutOptimizer",
  "default_params": {
    "time_limit": 300.0,
    "num_search_workers": 0
  }
}

Documentation Files

Markdown files are rendered with full formatting, including:

  • Headers and text formatting
  • Code blocks with syntax highlighting
  • Images and links
  • Tables and lists

Uploading Files

Single File Upload

  1. Click the Upload button
  2. Select Upload File
  3. Choose your file from the file dialog
  4. Confirm the upload location
  5. Click Upload to complete

Folder Upload

  1. Click the Upload button
  2. Select Upload Folder
  3. Choose a folder from your computer
  4. The entire folder structure will be preserved
  5. Review the upload preview
  6. Click Upload All to complete

Drag and Drop

Simply drag files or folders from your computer directly into the browser:

  1. Drag files/folders to the file browser area
  2. Drop when the upload zone is highlighted
  3. Confirm the upload in the dialog
  4. Files will be uploaded to the current directory

Downloading Files

Single File Download

  1. Click on the file you want to download
  2. Click the Download button in the file info panel
  3. The file will be downloaded to your default download location

Repository Download

  1. Navigate to the repository root
  2. Click the Download button in the navigation bar
  3. Choose format: ZIP archive or tar.gz
  4. The entire repository will be packaged and downloaded

Repository Management

Repository Structure

Maintain proper repository structure for Qubots compatibility:

optimization-repository/
├── qubot.py              # Main implementation (required)
├── config.json           # Configuration (required)
├── requirements.txt      # Dependencies (optional)
├── README.md            # Documentation (recommended)
├── tests/               # Test files (optional)
│   └── test_*.py
├── docs/                # Additional documentation (optional)
│   └── *.md
└── examples/            # Usage examples (optional)
    └── example_*.py

File Type Support

The file browser supports various file types:

Code Files

  • Python: .py files with syntax highlighting
  • JSON: .json files with formatting
  • YAML: .yml, .yaml configuration files
  • Text: .txt, .md files with markdown rendering

Data Files

  • CSV: Tabular data with preview
  • Images: .png, .jpg, .svg with thumbnail preview
  • Archives: .zip, .tar.gz with contents listing

Configuration Files

  • Requirements: requirements.txt, pyproject.toml
  • Config: config.json, setup.py
  • Documentation: README.md, LICENSE

Version Control Integration

While the file browser provides basic file management, it integrates with Git for version control:

  • Commit History: View commit history for files
  • Branch Management: Switch between branches
  • Diff Viewer: Compare file versions
  • Merge Conflicts: Resolve conflicts through the interface

Advanced Features

Collaborative Editing

For team repositories, the file browser supports collaborative features:

  • Real-time Editing: Multiple users can edit files simultaneously
  • Change Tracking: See who made what changes and when
  • Comments: Add comments to specific lines of code
  • Review Process: Request and provide code reviews

Integration with Playground

Seamlessly test your repositories in the playground:

  1. Navigate to your repository
  2. Click Test in Playground
  3. The repository will be loaded in the playground interface
  4. Run optimizations and see results immediately

Backup and Sync

Ensure your work is always safe:

  • Automatic Backups: Regular backups of all repositories
  • Sync Status: See sync status with remote repositories
  • Conflict Resolution: Handle sync conflicts gracefully
  • Export Options: Export repositories to external services

Best Practices

Repository Organization

Keep your repositories well-organized:

my-optimizer/
├── qubot.py              # Keep main code clean and documented
├── config.json           # Comprehensive parameter documentation
├── requirements.txt      # Pin dependency versions
├── README.md            # Clear usage instructions
├── tests/               # Include comprehensive tests
├── docs/                # Additional documentation
└── examples/            # Working examples

File Naming

Use clear, descriptive file names:

  • Use lowercase with underscores: my_optimizer.py
  • Include version numbers when appropriate: config_v2.json
  • Use descriptive names: tsp_solver.py not solver.py

Documentation

Maintain good documentation:

  • README.md: Clear overview and usage instructions
  • Inline Comments: Document complex algorithms
  • Parameter Descriptions: Explain all configuration parameters
  • Examples: Provide working examples

Troubleshooting

Common Issues

Next Steps