Documentation
¶
Index ¶
- Constants
- func DecodeSpecifier(specifier string) (c repointerface.Constraint, err error)
- func Fabricate(pkgPath string, name string, version string, environment string, dstDir string) (prefabPath string, blueprintPath string, err error)
- func NameNormalizer(name string) (normalized string)
- type EnvSpec
- type Package
- type PyPIQuery
- type Repo
- func (r *Repo) Fabricate(name string, version repointerface.Version, envs []string, dstDir string) (prefabPaths []string, blueprintPaths []string, fileType string, err error)
- func (r *Repo) FilterEnv(envs []string) (selected []string)
- func (r *Repo) GetEnvSpec() repointerface.EnvSpec
- func (r *Repo) GetEnvs(name string, version repointerface.Version) (envs []string, err error)
- func (r *Repo) GetVersions(name string) (versions []repointerface.Version, err error)
- func (r *Repo) Init(ctx *dcontext.DeployContext) (err error)
- func (r *Repo) SelectEnv(envs []string, envSpec repointerface.EnvSpec) (selected string, err error)
- func (r *Repo) SelectVersion(versions []repointerface.Version) (selected repointerface.Version, err error)
- type Version
Constants ¶
View Source
const Infinity = "z"
View Source
const NegInfinity = ""
since the valid pre/post/dev release strings are "a b c rc alpha beta pre preview post rev r dev", NegInfinity is smaller than each one of them, and Infinity is bigger than each one of them.
View Source
const SOURCE_DISTRIBUTION_ENV_TAG = "sdist"
View Source
const TORCH_BASE_URL = "https://download.pytorch.org/"
Variables ¶
This section is empty.
Functions ¶
func DecodeSpecifier ¶
func DecodeSpecifier(specifier string) (c repointerface.Constraint, err error)
func Fabricate ¶
func Fabricate(pkgPath string, name string, version string, environment string, dstDir string) (prefabPath string, blueprintPath string, err error)
TODO: Decode name, version and environment from package METADATA and WHEEL
func NameNormalizer ¶ added in v0.2.2
Types ¶
type EnvSpec ¶ added in v0.2.2
type EnvSpec struct {
PyVer string `json:"pyVer"` // e.g. "3.10"
LibcVer string `json:"libcVer"` // e.g. "2.36"
Arch string `json:"arch"` // e.g. "amd64"
}
func DecodeEnvSpec ¶ added in v0.2.2
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) GetEnvSpec ¶ added in v0.2.2
func (r *Repo) GetEnvSpec() repointerface.EnvSpec
func (*Repo) GetVersions ¶
func (r *Repo) GetVersions(name string) (versions []repointerface.Version, err error)
func (*Repo) SelectVersion ¶ added in v0.2.2
func (r *Repo) SelectVersion(versions []repointerface.Version) (selected repointerface.Version, err error)
type Version ¶
type Version struct {
Epoch int // Epoch number
Release []int // Release number
Pre string // Pre-release type
PreNum int // Pre-release number
Post string // Post-release type
PostNum int // Post-release number
Dev string // Dev-release type
DevNum int // Dev-release number
Local []string // Local version label
Raw string
}
func ParseVersion ¶
Click to show internal directories.
Click to hide internal directories.