Skip to content

Commit 8fc5c7f

Browse files
authored
Merge branch 'main' into iterable_dataset
2 parents eee0540 + fee6355 commit 8fc5c7f

12 files changed

+817
-596
lines changed

.github/workflows/smoke-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ jobs:
3939
pip list
4040
- name: Run unit tests with pytest
4141
run: |
42-
python -m pytest
42+
python -m pytest -m "not slow"

.github/workflows/testing-and-coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3232
- name: Run unit tests with pytest
3333
run: |
34-
python -m pytest --cov=hyrax --cov-report=xml
34+
python -m pytest --cov=hyrax --cov-report=xml -m "not slow"
3535
- name: Upload coverage report to codecov
3636
uses: codecov/codecov-action@v5
3737
with:

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ repos:
5050
- id: xcxc-check
5151
name: Check for note-to-self comments (xcxc)
5252
description: Grep all source files for xcxc which signifies a comment that shouldn't be checked in.
53-
entry: bash -c "[[ $(grep -riI xcxc --exclude .pre-commit-config.yaml --exclude-dir _readthedocs --exclude-dir htmlcov ./* >&2 ; echo $?) == 1 ]]"
53+
entry: bash -c "[[ $(grep -rniI xcxc --exclude .pre-commit-config.yaml --exclude-dir _readthedocs --exclude-dir htmlcov ./* >&2 ; echo $?) == 1 ]]"
5454
language: system
5555
pass_filenames: false
5656
always_run: true
@@ -105,7 +105,7 @@ repos:
105105
- id: pytest-check
106106
name: Run unit tests
107107
description: Run unit tests with pytest.
108-
entry: bash -c "if python -m pytest --co -qq; then python -m pytest --cov=./src --cov-report=html; fi"
108+
entry: bash -c "if python -m pytest --co -qq -m 'not slow'; then python -m pytest --cov=./src --cov-report=html -m 'not slow'; fi"
109109
language: system
110110
pass_filenames: false
111111
always_run: true

pyproject.toml

+10
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ dev = [
6565
"pre-commit", # Used to run checks before finalizing a git commit
6666
"pytest",
6767
"pytest-cov", # Used to report total code coverage
68+
"pytest-env", # Used to set environment variables in testing
6869
"ruff", # Used for static linting of files
6970
]
7071

@@ -81,6 +82,15 @@ write_to = "src/hyrax/_version.py"
8182
[tool.pytest.ini_options]
8283
testpaths = [
8384
"tests",
85+
"src",
86+
"docs",
87+
]
88+
addopts = "--doctest-modules --doctest-glob=*.rst"
89+
env = [
90+
"TQDM_DISABLE=1",
91+
]
92+
markers = [
93+
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
8494
]
8595

8696
[tool.black]

src/hyrax/data_sets/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .data_set_registry import DATA_SET_REGISTRY, HyraxDataset
2+
from .fits_image_dataset import FitsImageDataSet
23
from .hsc_data_set import HSCDataSet
34
from .hyrax_cifar_data_set import HyraxCifarDataSet
45
from .inference_dataset import InferenceDataSet
@@ -7,6 +8,7 @@
78
"DATA_SET_REGISTRY",
89
"HyraxCifarDataSet",
910
"HyraxCifarIterableDataSet",
11+
"FitsImageDataSet",
1012
"HSCDataSet",
1113
"InferenceDataSet",
1214
"Dataset",

0 commit comments

Comments
 (0)