Skip to content

Commit 4febf21

Browse files
authored
Merge pull request #42 from jdkent/fix/be_permissive
[FIX] be permissive
2 parents 7a1921b + df76fe0 commit 4febf21

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

ns_extract/dataset.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ def __post_init__(self):
9898

9999
@dataclass
100100
class ProcessedData:
101-
coordinates: Path = None
101+
coordinates: Optional[Path] = None
102102
text: Path = None
103-
metadata: Path = None
103+
metadata: Optional[Path] = None
104104
raw: Optional[Union["PubgetRaw", "AceRaw"]] = field(default=None)
105105

106106
def __post_init__(self):

tests/test_example_extractor.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def test_text_and_demographics_update(sample_data, mock_demographics, tmp_path):
395395
def test_post_process_only_missing_results(sample_data, mock_demographics, tmp_path):
396396
"""Test post_process='only' gracefully handles missing results."""
397397
demographics_dir = setup_demographics_dir(tmp_path, mock_demographics)
398-
398+
399399
# Create test data with clear transformation differences
400400
test_study_id = list(mock_demographics.keys())[0]
401401
modified_dataset = sample_data.slice([test_study_id])
@@ -409,23 +409,25 @@ def test_post_process_only_missing_results(sample_data, mock_demographics, tmp_p
409409
"pipeline_dir": Path(demographics_dir),
410410
}
411411
}
412-
412+
413413
# Create output dir but don't run pipeline
414414
output_dir = tmp_path / "output"
415415
output_dir.mkdir(parents=True)
416-
416+
417417
# Try post-process only - should log warning but not error
418418
hash_dir = extractor.transform_dataset(
419419
modified_dataset,
420420
output_dir,
421421
post_process="only",
422-
input_pipeline_info=input_pipeline_info
422+
input_pipeline_info=input_pipeline_info,
423423
)
424-
424+
425425
# Check directory exists but no results were created
426426
study_dir = hash_dir / test_study_id
427427
assert not (study_dir / "results.json").exists(), "No results should be created"
428-
assert not (study_dir / "raw_results.json").exists(), "No raw results should be created"
428+
assert not (
429+
study_dir / "raw_results.json"
430+
).exists(), "No raw results should be created"
429431

430432

431433
def test_post_process_and_file_handling(sample_data, mock_demographics, tmp_path):

0 commit comments

Comments
 (0)