autowisp.tests.test_full_pipeline module

Class Inheritance Diagram

Inheritance diagram of FITSTestCase, H5TestCase, ImageProcessingManager, Namespace, TestFullPipeline

End-to-end pipeline test driven by autowisp.run_pipeline.

Mirrors what the BUI does when a user creates a new project: builds the project’s SQLite database from test_data/test.cfg and test_data/master_config.json via the same helpers the BUI uses (parse_config_overwrites + master_config_json_to_settings + apply_master_config + initialize_database), imports the survey JSON, registers every raw image, runs the full pipeline (calibration through TFA / detrending statistics), and compares the generated artifacts to the expected outputs in test_data/.

class autowisp.tests.test_full_pipeline.TestFullPipeline(methodName='runTest')[source]

Bases: H5TestCase, FITSTestCase

Inheritance diagram of autowisp.tests.test_full_pipeline.TestFullPipeline

Run the full pipeline end-to-end and check every output.

_assert_detrending_stats_match(basename)[source]

Compare an epd / tfa statistics file via pandas.

Matches the comparison rule used by autowisp.tests.test_detrending_stat.TestDetrendingStat.

_assert_dir_fits_match(relative_dir)[source]

Assert every *.fits* in relative_dir matches expected.

_assert_h5_dir_match(relative_dir)[source]

Assert every *.h5 file under relative_dir matches.

_register_photref()[source]

Mimic the BUI’s record_photref_selection for the test photref.

Calls compute_photref_candidates() to obtain the same per-condition batches the BUI would surface to the user, finds the batch containing the test’s chosen photref DR file (set in setUp from test.cfg), registers the file as a single_photref master, and binds every eligible image in the batch via bind_images_to_photref().

setUp()[source]

Bring up a project the same way the BUI does on creation.

AutoWISPTestCase.setUp already handles the processing-dir creation, test.cfg copy, set_project_home, and survey import (against a minimal schema). On top of that we run a full initialize_database(drop_all_tables=True) – mirroring the BUI’s project-creation flow – and re-import the survey since that drops the provenance rows the base class just imported.

test_full_pipeline()[source]

Run the full pipeline and compare every output to expected.

The pipeline runs in two passes. On the first pass it does as much as it can; fit_magnitudes and the downstream lightcurve steps stay pending because no single_photref master has been registered yet. Between the passes the test registers the single photometric reference DR file via the same helpers the BUI uses, after which the second pass picks up fit_magnitudes and everything beyond.