pydeps

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectMarkdownLanguages

func DetectMarkdownLanguages(base util.AbsolutePath) (bool, bool, error)

func DetectMarkdownLanguagesInContent

func DetectMarkdownLanguagesInContent(content []byte) (bool, bool)

func GetNotebookFileInputs

func GetNotebookFileInputs(path util.AbsolutePath) (string, error)

func GetNotebookInputs

func GetNotebookInputs(r io.Reader) (string, error)

func GetQuartoFilePythonCode

func GetQuartoFilePythonCode(path util.AbsolutePath) (string, error)

func GetQuartoPythonCode

func GetQuartoPythonCode(content string) string

func NewDependencyScanner

func NewDependencyScanner(log logging.Logger) *defaultDependencyScanner

func NewImportScanner

func NewImportScanner(log logging.Logger) *defaultImportScanner

func NewPackageMapper

func NewPackageMapper(log logging.Logger) *defaultPackageMapper

func NewProjectImportScanner

func NewProjectImportScanner(log logging.Logger) *defaultProjectImportScanner

Types

type DependencyScanner

type DependencyScanner interface {
	ScanDependencies(base util.AbsolutePath, pythonExecutable string) ([]*PackageSpec, error)
}

type ImportName

type ImportName string

type ImportScanner

type ImportScanner interface {
	ScanImports(code string) []ImportName
}

type MockDependencyScanner

type MockDependencyScanner struct {
	mock.Mock
}

func NewMockDependencyScanner

func NewMockDependencyScanner() *MockDependencyScanner

func (*MockDependencyScanner) ScanDependencies

func (m *MockDependencyScanner) ScanDependencies(base util.AbsolutePath, pythonExecutable string) ([]*PackageSpec, error)

type PackageMap

type PackageMap map[ImportName]*PackageSpec

type PackageMapper

type PackageMapper interface {
	GetPackageMap(pythonExecutable string) (PackageMap, error)
}

type PackageName

type PackageName string

type PackageSpec

type PackageSpec struct {
	Name    PackageName
	Version string
}

func (*PackageSpec) String

func (s *PackageSpec) String() string

type ProjectImportScanner

type ProjectImportScanner interface {
	ScanProjectImports(base util.AbsolutePath) ([]ImportName, error)
}

Jump to

Keyboard shortcuts

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