Skip to content

Commit c17a7d3

Browse files
authored
Merge pull request #253 from PyAutoLabs/feature/smoke-test-fast
feat: PYAUTO_WORKSPACE_SMALL_DATASETS env var for fast smoke tests
2 parents e27efb5 + 7768667 commit c17a7d3

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

autoarray/mask/mask_2d.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from __future__ import annotations
22
import logging
3+
import os
34
from enum import Enum
45
import numpy as np
56
from pathlib import Path
@@ -359,6 +360,11 @@ def circular(
359360
and visa versa.
360361
"""
361362

363+
if os.environ.get("PYAUTO_WORKSPACE_SMALL_DATASETS") == "1":
364+
if shape_native[0] > 15 or shape_native[1] > 15:
365+
shape_native = (15, 15)
366+
pixel_scales = 0.6
367+
362368
pixel_scales = geometry_util.convert_pixel_scales_2d(pixel_scales=pixel_scales)
363369

364370
mask = mask_2d_util.mask_2d_circular_from(

autoarray/structures/grids/uniform_2d.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from __future__ import annotations
2+
import os
23
import numpy as np
34
from pathlib import Path
45
from typing import List, Optional, Tuple, Union
@@ -486,6 +487,11 @@ def uniform(
486487
origin
487488
The origin of the grid's mask.
488489
"""
490+
if os.environ.get("PYAUTO_WORKSPACE_SMALL_DATASETS") == "1":
491+
if shape_native[0] > 15 or shape_native[1] > 15:
492+
shape_native = (15, 15)
493+
pixel_scales = 0.6
494+
489495
pixel_scales = geometry_util.convert_pixel_scales_2d(pixel_scales=pixel_scales)
490496

491497
grid_slim = grid_2d_util.grid_2d_slim_via_shape_native_from(

0 commit comments

Comments
 (0)