depmanagers

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TypePoetry          api.DependencyManagerType = typePoetry("Poetry")
	TypePipenv          api.DependencyManagerType = typePipenv("Pipenv")
	TypeRequirementsTxt api.DependencyManagerType = typeRequirementsTxt("requirements.txt")
	TypeSetupPy         api.DependencyManagerType = typeSetupPy("setup.py")
)

Functions

func Detect

func Detect(project api.Project) api.DependencyManagerList

Detect checks the files in the project directory to detect which dependency manager(s) is / are being used in this project.

Types

type Pipenv

type Pipenv struct {
	Project api.Project
	Pipfile
}

func (Pipenv) Dependencies

func (p Pipenv) Dependencies() []string

func (Pipenv) HasDependency

func (p Pipenv) HasDependency(dependency string) bool

func (Pipenv) HasDevDependency

func (p Pipenv) HasDevDependency(dependency string) bool

func (Pipenv) Type

func (p Pipenv) Type() api.DependencyManagerType

type Pipfile

type Pipfile struct {
	Packages    *toml.Tree `toml:"packages"`
	DevPackages *toml.Tree `toml:"dev-packages"`
}

type Poetry

type Poetry struct {
	Config *PoetryConfig
}

func (Poetry) Dependencies

func (p Poetry) Dependencies() []string

func (Poetry) HasDependency

func (p Poetry) HasDependency(dependency string) bool

func (Poetry) HasDevDependency

func (p Poetry) HasDevDependency(dependency string) bool

func (Poetry) Type

func (p Poetry) Type() api.DependencyManagerType

type PoetryConfig

type PoetryConfig struct {
	Dependencies    *toml.Tree `toml:"dependencies"`
	DevDependencies *toml.Tree `toml:"dev-dependencies"`
	Group           struct {
		Dev struct {
			Dependencies *toml.Tree `toml:"dependencies"`
		} `toml:"dev"`
	} `toml:"group"`
}

type PyProjectTOML

type PyProjectTOML struct {
	Tool struct {
		Black  *toml.Tree    `toml:"black,omitempty"`
		ISort  *toml.Tree    `toml:"isort,omitempty"`
		Poetry *PoetryConfig `toml:"poetry,omitempty"`
	} `toml:"tool"`
	BuildSystem struct {
		BuildBackend string `toml:"build-backend"`
	} `toml:"build-system"`
}

func ReadPyProjectTOML

func ReadPyProjectTOML(dir string) (*PyProjectTOML, error)

type RequirementsTxt

type RequirementsTxt struct {
	Project api.Project
	// contains filtered or unexported fields
}

func (RequirementsTxt) Dependencies

func (p RequirementsTxt) Dependencies() []string

func (RequirementsTxt) HasDependency

func (p RequirementsTxt) HasDependency(dependency string) bool

func (RequirementsTxt) HasDevDependency

func (p RequirementsTxt) HasDevDependency(dependency string) bool

func (RequirementsTxt) Type

type SetupPy

type SetupPy struct {
	Project api.Project
}

func (SetupPy) Dependencies

func (p SetupPy) Dependencies() []string

func (SetupPy) HasDependency

func (p SetupPy) HasDependency(dependency string) bool

func (SetupPy) HasDevDependency

func (p SetupPy) HasDevDependency(dependency string) bool

func (SetupPy) Type

Jump to

Keyboard shortcuts

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