Skip to content
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

Using DataPackages for Daytona.io samples management #1564

Open
s-celles opened this issue Dec 24, 2024 · 0 comments
Open

Using DataPackages for Daytona.io samples management #1564

s-celles opened this issue Dec 24, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@s-celles
Copy link
Contributor

Hi,

DataPackages provide a standardized format to describe and share collections of data using JSON metadata. This specification includes schemas for data structure and validation rules, making it ideal for managing development environment samples.

https://frictionlessdata.io/
https://datapackage.org/

Basic Sample Management

A simple DataPackage can list all Daytona samples with their essential metadata like name, description, and repository URL. This approach provides consistent structure and validation while enabling automated tooling integration.

Key benefits include:

  • Standardized sample metadata
  • Built-in validation
  • Tooling support
  • Clear documentation

External Index References

DataPackages can reference other DataPackages through external resources. This enables:

Distribution Benefits

  • Teams maintain their own sample indexes
  • Independent versioning per language/framework
  • Reduced coordination overhead
  • Selective loading of sample collections

Management Benefits

  • Modular organization by language
  • Simplified updates
  • Improved maintainability
  • Team autonomy

Implementation Plan

  1. Define base schema for sample metadata
  2. Add support for external index references
  3. Create validation tooling
  4. Update documentation and workflows
  5. Migrate existing samples

Discussion Points

  • Validation across referenced indexes
  • Version compatibility handling
  • Caching and availability strategy
  • Additional metadata requirements

Examples

  1. Basic Sample Index
{
  "name": "daytona-base-samples",
  "resources": [{
    "name": "base",
    "data": [
      {
        "name": "Python",
        "description": "Develop Python applications.",
        "gitUrl": "https://github.com/daytonaio/sample-python"
      }
    ]
  }]
}
  1. Organized by Framework
{
  "name": "daytona-python-samples",
  "resources": [{
    "name": "python-frameworks",
    "data": [
      {
        "name": "Python/Flask - AI Playlist Generator",
        "type": "flask",
        "description": "Generates playlists based on user emotions"
      },
      {
        "name": "Python/Django - CrisisMonitor", 
        "type": "django",
        "description": "Natural disaster tracking dashboard"
      }
    ]
  }]
}
  1. External Reference Pattern
{
  "name": "daytona-main-index",
  "resources": [
    {
      "name": "python-samples",
      "path": "https://raw.githubusercontent.com/org/python-samples/index.json"
    },
    {
      "name": "nodejs-samples", 
      "path": "https://raw.githubusercontent.com/org/nodejs-samples/index.json"
    }
  ]
}

The structure allows for organized sample discovery and distributed maintenance.

Any opinion?

@s-celles s-celles added the enhancement New feature or request label Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant