Module: RSpec::FlakeClassifier
- Defined in:
- lib/rspec/flake/classifier.rb,
lib/rspec/flake/classifier/cli.rb,
lib/rspec/flake/classifier/version.rb,
lib/rspec/flake/classifier/deflaker.rb,
lib/rspec/flake/classifier/features.rb,
lib/rspec/flake/classifier/formatter.rb,
lib/rspec/flake/classifier/predictor.rb,
lib/rspec/flake/classifier/signature.rb,
lib/rspec/flake/classifier/evaluation.rb,
lib/rspec/flake/classifier/sensitivity.rb,
lib/rspec/flake/classifier/integrations.rb,
lib/rspec/flake/classifier/rerun/result.rb,
lib/rspec/flake/classifier/configuration.rb,
lib/rspec/flake/classifier/probe_evidence.rb,
lib/rspec/flake/classifier/rerun/protocol.rb,
lib/rspec/flake/classifier/classify/result.rb,
lib/rspec/flake/classifier/example_history.rb,
lib/rspec/flake/classifier/classify/context.rb,
lib/rspec/flake/classifier/runtime_controls.rb,
lib/rspec/flake/classifier/coverage_snapshot.rb,
lib/rspec/flake/classifier/store/jsonl_store.rb,
lib/rspec/flake/classifier/classify/classifier.rb,
lib/rspec/flake/classifier/rerun/isolated_runner.rb,
lib/rspec/flake/classifier/rerun/bisect_dependency_search.rb,
sig/rspec/flake/classifier.rbs
Defined Under Namespace
Modules: Classify, Integrations, RSpecIntegration, Rerun, RuntimeControls, Store
Classes: CLI, Configuration, CoverageSnapshot, Deflaker, Error, Evaluation, ExampleHistory, Features, Formatter, JUnitFormatter, Predictor, ProbeEvidence, Sensitivity, Signature
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Method Summary
collapse
Class Method Details
.classify(input = nil, **attributes) ⇒ Classify::Result
46
47
48
|
# File 'lib/rspec/flake/classifier.rb', line 46
def classify(input = nil, **attributes)
Classify::Classifier.new.classify(input, **attributes)
end
|
28
29
30
|
# File 'lib/rspec/flake/classifier.rb', line 28
def configuration
@configuration ||= Configuration.new
end
|
32
33
34
35
36
|
# File 'lib/rspec/flake/classifier.rb', line 32
def configure(rspec_config = nil)
yield(configuration) if block_given?
RSpecIntegration.install(rspec_config, configuration) if rspec_config
configuration
end
|
.investigate(example_id, seed: nil, prior_examples: [], runner: nil) ⇒ Rerun::Investigation
50
51
52
53
54
55
56
|
# File 'lib/rspec/flake/classifier.rb', line 50
def investigate(example_id, seed: nil, prior_examples: [], runner: nil)
runner ||= Rerun::IsolatedRunner.new(command: configuration.rspec_command)
Rerun::Protocol.new(
runner: runner,
same_order_runs: configuration.auto_rerun_attempts
).investigate(example_id, seed: seed, prior_examples: prior_examples)
end
|
.sensitivity(example_id, factors: configuration.sensitivity_factors, seed: nil, runner: nil) ⇒ Sensitivity::Result
58
59
60
61
|
# File 'lib/rspec/flake/classifier.rb', line 58
def sensitivity(example_id, factors: configuration.sensitivity_factors, seed: nil, runner: nil)
runner ||= Rerun::IsolatedRunner.new(command: configuration.rspec_command)
Sensitivity.new(runner: runner).analyze(example_id, factors: factors, seed: seed)
end
|
.signature_for(exception) ⇒ Signature
38
39
40
|
# File 'lib/rspec/flake/classifier.rb', line 38
def signature_for(exception)
Signature.from_exception(exception)
end
|
42
43
44
|
# File 'lib/rspec/flake/classifier.rb', line 42
def store
Store::JSONLStore.new(configuration.store_path)
end
|