project

package
v0.0.84 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const PUBLISH_TIMEOUT = 4 * time.Hour

Variables

View Source
var ProjectEntityDesc = entity.NewEntityDescriptor[ProjectEntity](
	"project",
	"projects",
	func(p *ProjectEntity) string { return p.GetName() },
	func(p *ProjectEntity) string { return p.GetCid() },
)

Functions

func AskForNewProject

func AskForNewProject(projectDetails *AddProjectDetails, existingProjectNames []string) error

func BuildProjectContext added in v0.0.41

func BuildProjectContext(ctx context.Context, projectEntity *ProjectEntity, schemaVersion int) (*hub.ProjectContext, error)

func CopyProject added in v0.0.45

func CopyProject(
	sourceCtx context.Context, sourceProject *ProjectEntity,
	targetCtx context.Context, targetProjectName string,
	exportOptions ExportProjectParams,
) error

func DeleteProject

func DeleteProject(ctx context.Context, project *ProjectEntity) error

func DownloadProject added in v0.0.53

func DownloadProject(ctx context.Context, projectId string) (*http.Response, error)

Not using apiClient because of the response type (file)

func ExportProject added in v0.0.41

func ExportProject(ctx context.Context, projectId string, copyToUrl string, options ExportProjectParams) (*tensorleapapi.Job, error)

func ExportProjectIntoFile added in v0.0.41

func ExportProjectIntoFile(ctx context.Context, project *ProjectEntity, outputDir string, options ExportProjectParams) error

func ImportProject added in v0.0.41

func ImportProject(ctx context.Context, projectName, importUrl string, meta *hub.ProjectMeta) error

func ImportProjectFromFile added in v0.0.45

func ImportProjectFromFile(ctx context.Context, filePath, projectName string) error

func ValidateProjectName added in v0.0.45

func ValidateProjectName(projectName, defaultProjectName string, projects []ProjectEntity) (string, error)

Types

type AddProjectDetails

type AddProjectDetails struct {
	Name        string
	Description string
}

type ExportProjectParams added in v0.0.54

type ExportProjectParams struct {
	NoCache                bool
	ExcludeCalculatedFiles bool
}

type ProjectEntity

type ProjectEntity = tensorleapapi.Project

func AddProject

func AddProject(ctx context.Context, projectDetails *AddProjectDetails) (*ProjectEntity, error)

func AskAndAddProject

func AskAndAddProject(ctx context.Context, projectDetails *AddProjectDetails, projects []ProjectEntity) (*ProjectEntity, error)

func GetProjectFromFlag

func GetProjectFromFlag(ctx context.Context, projectIdFlag string, askForNewProjectFirst bool) (project *ProjectEntity, wasCreated bool, err error)

func GetProjects

func GetProjects(ctx context.Context) ([]ProjectEntity, error)

func SelectOrCreateProject

func SelectOrCreateProject(ctx context.Context, projects []ProjectEntity, askForNewProjectFirst bool) (*ProjectEntity, bool, error)

func SelectProjectsToPublish added in v0.0.41

func SelectProjectsToPublish(ctx context.Context, projectNamesFromArgs []string, allProjectFlag bool) ([]ProjectEntity, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL