spliced.experiment package
Submodules
spliced.experiment.base module
- class spliced.experiment.base.Experiment[source]
Bases:
object
A base Experiment holds information for a splice experiment!
- add_splice(result, success=False, splice=None, command=None, different_libs=False, package=None)[source]
Add a splice to the experiment
A splice can either be successful (so it will have libs, binaries, etc) or it can represent a failed state (for any number of reasons)
TODO refactor so we do one splice at a time TODO can we cache the splice setup? # ALSO add cache variable to save cache for smeagle (add to spack experiment)
- init(package, splice, experiment, replace=None, validate=True, splice_versions=None)[source]
Init config variables directly
- property name
- property package
- property package_so_prefix
- predict(names=None, skip=None, predict_type=None)[source]
Given a single named predictor (or a list to skip) make predictions.
- property replace
- property splice
- property splice_so_prefix
- property splice_versions
- class spliced.experiment.base.Splice(package=None, splice=None, experiment=None, replace=None, result=None, success=False, different_libs=False)[source]
Bases:
object
A Splice holds the metadata for a splice, and if successful (or possible) will hold a result. A default splice result is not successful
spliced.experiment.spack module
- class spliced.experiment.spack.SpackDiffExperiment[source]
Bases:
SpackExperiment
The main spack experiment does a diff.
- class spliced.experiment.spack.SpackExperiment[source]
Bases:
Experiment
- concretize(spec_name=None, error_message='spec-concretization-failed', spec=None, different_libs=False)[source]
A shared function to attempt concretization.
- do_install(spec, error_message, name=None, different_libs=False)[source]
Helper function to do an install.
- get_spack_ld_library_paths(original)[source]
Get all of spack’s changes to the LD_LIBRARY_PATH for elfcall
- class spliced.experiment.spack.SpackSpliceExperiment[source]
Bases:
SpackExperiment
- do_splice(splice_name, spec_main, transitive=True)[source]
do the splice, the spliced spec goes into the main spec
- mock_splice(splice_name, replace_name, spec_main)[source]
A mock splice is not possible with spack (it usually means replacing one dependency with another that isn’t an actual dependency) but we can still install the needed specs and then add their libs / binaries for other predictors. A “mock” of different libs means different_libs is set to True on the splice.
- run(*args, **kwargs)[source]
Perform a splice with a SpecA (a specific spec with a binary), and SpecB (the high level spec that is a dependency that we can test across versions).
Arguments: package (specA_name): the name of the main package we are splicing up splice (specB_name): the spec we are removing / switching out replace (specC_name): the spec we are splicing in (replacing with)
For many cases, specB and specC might be the same, but not always.
- spliced.experiment.spack.add_contenders(spec, loc='lib', match=None)[source]
Given a spec, find contender binaries and/or libs