Reference/API#
ci_watson.artifactory_helpers Module#
Helpers for Artifactory or local big data handling.
Functions#
|
|
|
Find and returns the path to the nearest big datasets. |
|
Acquire requested data from a managed resource to the current directory. |
|
Compare output with "truth" using appropriate diff routine; namely: |
|
Generate pattern, target, and test name for |
|
Write out JSON file to upload results from test to Artifactory storage area. |
Classes#
Exception related to big data access. |
ci_watson.hst_helpers Module#
Helper module for HST tests.
Functions#
|
Return a list of reference filenames, as defined in the primary header of the given input image, necessary for calibration. |
|
Return a list of RAW input files in a given ASN. |
|
Download a CRDS file from HTTP to current directory. |
ci_watson.jwst_helpers Module#
Helper module for JWST tests.
Functions#
|
Ensure CRDS context is a certain level. |
ci_watson.resource_tracker Module#
Resource tracking regtest utilities.
Can be used within module-scoped fixtures (often used to run Steps or Pipelines) or within tests.
For uses where the resource usage occurs within a test:
def test_long_step(resource_tracker, request):
with resource_tracker.track(log=request):
# something that takes memory and time
pass
For a module-scoped fixture the resource tracking can be performed in the fixture but the logging/reporting of the resource usage must occur during a test:
@pytest.fixture(scope="module")
def resource_tracker():
return ResourceTracker()
@pytest.fixture()
def log_tracked_resources(resource_tracker, request):
def callback():
resource_tracker.log(request)
yield callback
@pytest.fixture
def my_long_fixture(resource_tracker):
with resource_tracker.track():
# something that takes memory and time
pass
def test_log_tracked_resources(log_tracked_resources, my_long_fixture):
log_tracked_resources()
Use of the module-scoped fixture has fixture-reuse
considerations similar to the rtdata_module fixture. Having
more than one module scoped fixture that uses resource_tracker
per module is discouraged (as both will use the same ResourceTracker
instance). Parameterization of a fixture using resource_tracker
is supported (same as rtdata_module).
Classes#
Track resources used during track context. |